TW-1741: Warning "ignoring return value of ‘int ftruncate" while doing make on xubuntu15.10

- Thanks to Sunil Joshi.
This commit is contained in:
Paul Beckingham 2016-02-28 11:19:29 -05:00
parent eb09df0e6a
commit e220ee884c
10 changed files with 12 additions and 1 deletions

View file

@ -36,6 +36,7 @@
#include <unistd.h>
#include <fcntl.h>
#include <dirent.h>
#include <errno.h>
#include <string.h>
#include <text.h>
#include <util.h>
@ -556,7 +557,8 @@ void File::truncate ()
open ();
if (_fh)
(void) ftruncate (_h, 0);
if (ftruncate (_h, 0))
throw format (STRING_FILE_TRUNCATE, errno, strerror (errno));
}
////////////////////////////////////////////////////////////////////////////////

View file

@ -796,6 +796,7 @@
// File
#define STRING_FILE_PERMS "Taskwarrior hat die erforderlichen Rechte auf '{1}' nicht."
#define STRING_FILE_TRUNCATE "Could not truncate file: {1} {2}"
// helpers
#define STRING_HELPER_PROJECT_CHANGE "The project '{1}' has changed."

View file

@ -794,6 +794,7 @@
// File
#define STRING_FILE_PERMS "Taskwarrior does not have the correct permissions for '{1}'."
#define STRING_FILE_TRUNCATE "Could not truncate file: {1} {2}"
// helpers
#define STRING_HELPER_PROJECT_CHANGE "The project '{1}' has changed."

View file

@ -796,6 +796,7 @@
// File
#define STRING_FILE_PERMS "Taskwarrior ne havas la bezonatan permeson por '{1}'."
#define STRING_FILE_TRUNCATE "Could not truncate file: {1} {2}"
// helpers
#define STRING_HELPER_PROJECT_CHANGE "The project '{1}' has changed."

View file

@ -804,6 +804,7 @@
// File
#define STRING_FILE_PERMS "Taskwarrior no tiene los permisos adecuados para '{1}'."
#define STRING_FILE_TRUNCATE "Could not truncate file: {1} {2}"
// helpers
#define STRING_HELPER_PROJECT_CHANGE "El proyecto '{1}' ha cambiado."

View file

@ -796,6 +796,7 @@
// File
#define STRING_FILE_PERMS "Taskwarrior does not have the correct permissions for '{1}'."
#define STRING_FILE_TRUNCATE "Could not truncate file: {1} {2}"
// helpers
#define STRING_HELPER_PROJECT_CHANGE "The project '{1}' has changed."

View file

@ -795,6 +795,7 @@
// File
#define STRING_FILE_PERMS "Taskwarrior non dispone dei permessi corretti per '{1}'."
#define STRING_FILE_TRUNCATE "Could not truncate file: {1} {2}"
// helpers
#define STRING_HELPER_PROJECT_CHANGE "Il progetto '{1}' è stato modificat."

View file

@ -796,6 +796,7 @@
// File
#define STRING_FILE_PERMS "Taskwarrior does not have the correct permissions for '{1}'."
#define STRING_FILE_TRUNCATE "Could not truncate file: {1} {2}"
// helpers
#define STRING_HELPER_PROJECT_CHANGE "The project '{1}' has changed."

View file

@ -796,6 +796,7 @@
// File
#define STRING_FILE_PERMS "Taskwarrior nie posiada praw dostępu do '{1}'."
#define STRING_FILE_TRUNCATE "Could not truncate file: {1} {2}"
// helpers
#define STRING_HELPER_PROJECT_CHANGE "The project '{1}' has changed."

View file

@ -796,6 +796,7 @@
// File
#define STRING_FILE_PERMS "O taskwarrior não encontrou as permissões corretas em '{1}'."
#define STRING_FILE_TRUNCATE "Could not truncate file: {1} {2}"
// helpers
#define STRING_HELPER_PROJECT_CHANGE "The project '{1}' has changed."