[SCM] BOINC packaging branch, master, updated. debian/7.1.21+dfsg-2_exp1-4-g2b58a04
Gianfranco Costamagna
costamagnagianfranco at yahoo.it
Tue Jul 9 13:43:57 UTC 2013
The following commit has been merged in the master branch:
commit 2b58a04fa4290ef57ea8b06cfc3c353182ad1f26
Author: Gianfranco Costamagna <costamagnagianfranco at yahoo.it>
Date: Tue Jul 9 15:43:38 2013 +0200
Little changes on more_clang_warnings.patch, thanks to Alyssa and Steffen
diff --git a/debian/patches/more_clang_warnings.patch b/debian/patches/more_clang_warnings.patch
index 56bb295..a1f0045 100644
--- a/debian/patches/more_clang_warnings.patch
+++ b/debian/patches/more_clang_warnings.patch
@@ -23,7 +23,7 @@
// sanity checks - project and result name must match
//
- if (!parse_str(buf, "<project_master_url>", s, sizeof(s))) {
-+ if (0 == fr || !parse_str(buf, "<project_master_url>", s, sizeof(s))) {
++ if (1 == fr || !parse_str(buf, "<project_master_url>", s, sizeof(s))) {
msg_printf(wup->project, MSG_INTERNAL_ERROR,
"no project URL in task state file"
);
@@ -55,18 +55,18 @@
#else
- fscanf(f, "%d", &num_bits);
+ int fs = fscanf(f, "%d", &num_bits);
-+ if (EOF == fs) return ERR_NULL;
++ if (1 != fs) return ERR_NULL;
key->bits = num_bits;
len = size - sizeof(key->bits);
for (i=0; i<len; i++) {
- fscanf(f, "%2x", &n);
+ fs = fscanf(f, "%2x", &n);
++ if (1 != fs) return ERR_NULL;
key->data[i] = n;
-+ if (EOF == fs) return ERR_NULL;
}
- fscanf(f, ".");
+ fs = fscanf(f, ".");
-+ if (EOF == fs) return ERR_NULL;
++ if (1 != fs) return ERR_NULL;
#endif
return 0;
}
@@ -149,7 +149,7 @@
if (f) {
// ToDo: change this to XML parsing
- fscanf(f, "%d %d %d %d\n", &xpos, &ypos, &width, &height);
-+ if (! fscanf(f, "%d %d %d %d\n", &xpos, &ypos, &width, &height)) {
++ if (4 != fscanf(f, "%d %d %d %d\n", &xpos, &ypos, &width, &height)) {
+ fprintf(stderr,"Coud not parse parameters for xpos, ypos, width, height from glx_info file.\n");
+ }
fclose(f);
@@ -233,7 +233,7 @@
// See the lseek man page for details.
lseek(fd, size-1, SEEK_SET);
- write(fd, "\0", 1);
-+ if (! write(fd, "\0", 1)) {
++ if (-1 == write(fd, "\0", 1)) {
+ close(fd);
+ return ERR_SHMGET;
+ }
--
BOINC packaging
More information about the pkg-boinc-commits
mailing list