[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[SCM] libgnokii and core programs branch, master, updated. rel_0_6_29-43
From: |
Daniele Forsi |
Subject: |
[SCM] libgnokii and core programs branch, master, updated. rel_0_6_29-432-gdc50c42 |
Date: |
Sun, 20 Jan 2013 17:26:56 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "libgnokii and core programs".
The branch, master has been updated
via dc50c42ed8552e2e5efbe16601c27360d11e7c5c (commit)
from 0bfa48454f679e634827946870ae100b585c3320 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/gnokii.git/commit/?id=dc50c42ed8552e2e5efbe16601c27360d11e7c5c
commit dc50c42ed8552e2e5efbe16601c27360d11e7c5c
Author: Daniele Forsi <address@hidden>
Date: Sun Jan 20 18:12:08 2013 +0100
Fix warnings when compiling with clang
The return value of fwrite() is a size_t so it can't be negative.
Fixes:
gnokii/gnokii-file.c:279:45: warning: comparison of unsigned expression < 0
is always false [-Wtautological-compare]
if (fwrite(fi.file, fi.file_length, 1, f) < 0) {
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
gnokii/gnokii-file.c:334:46: warning: comparison of unsigned expression < 0
is always false [-Wtautological-compare]
if (fwrite(fi.file, fi.file_length, 1, f) < 0) {
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
gnokii/gnokii-file.c:385:65: warning: comparison of unsigned expression < 0
is always false [-Wtautological-compare]
if (fwrite(data->file->file,
data->file->file_length, 1, f) < 0) {
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
3 warnings generated.
diff --git a/gnokii/gnokii-file.c b/gnokii/gnokii-file.c
index 6cf4ea2..013be47 100644
--- a/gnokii/gnokii-file.c
+++ b/gnokii/gnokii-file.c
@@ -276,7 +276,7 @@ gn_error getfile(int argc, char *argv[], gn_data *data,
struct gn_statemachine *
fprintf(stderr, _("Can't open file %s for writing!\n"),
filename2);
return GN_ERR_FAILED;
}
- if (fwrite(fi.file, fi.file_length, 1, f) < 0) {
+ if (fwrite(fi.file, fi.file_length, 1, f) < 1) {
fprintf(stderr, _("Failed to write to file %s.\n"),
filename2);
error = GN_ERR_FAILED;
}
@@ -331,7 +331,7 @@ gn_error getfilebyid(int argc, char *argv[], gn_data *data,
struct gn_statemachi
fprintf(stderr, _("Can't open file %s for
writing!\n"), filename2);
return GN_ERR_FAILED;
}
- if (fwrite(fi.file, fi.file_length, 1, f) < 0) {
+ if (fwrite(fi.file, fi.file_length, 1, f) < 1) {
fprintf(stderr, _("Failed to write to file
%s.\n"), filename2);
error = GN_ERR_FAILED;
}
@@ -382,7 +382,7 @@ gn_error getallfiles(char *path, gn_data *data, struct
gn_statemachine *state)
fprintf(stderr, _("Can't open file %s
for writing!\n"), filename2);
return GN_ERR_FAILED;
}
- if (fwrite(data->file->file,
data->file->file_length, 1, f) < 0) {
+ if (fwrite(data->file->file,
data->file->file_length, 1, f) < 1) {
fprintf(stderr, _("Failed to write to
file %s.\n"), filename2);
fclose(f);
return GN_ERR_FAILED;
-----------------------------------------------------------------------
Summary of changes:
gnokii/gnokii-file.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
hooks/post-receive
--
libgnokii and core programs
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [SCM] libgnokii and core programs branch, master, updated. rel_0_6_29-432-gdc50c42,
Daniele Forsi <=