> Gesendet: Dienstag, 09. Juli 2013 um 00:36 Uhr > Von: "David Anderson" <da...@ssl.berkeley.edu> > An: "Gianfranco Costamagna" <costamagnagianfra...@yahoo.it> > Cc: "boinc_dev@ssl.berkeley.edu" <boinc_dev@ssl.berkeley.edu> > Betreff: Re: [boinc_dev] addressing some clang warnings > > Are these changes all thoroughly tested? > -- David
By eye they look fine in the sense that they should not disturb today's regular operation. The patches did their best in embedding themselves to the respective error handling philosophy of the surrounding code and just added a (void) if it was felt that an error did not want to be detected at all. I just skimmed through it again, the one here 145 --- a/api/graphics2_unix.cpp 146 +++ b/api/graphics2_unix.cpp 147 @@ -191,7 +191,9 @@ 148 FILE *f = boinc_fopen("gfx_info", "r"); 149 if (f) { 150 // ToDo: change this to XML parsing 151 - fscanf(f, "%d %d %d %d\n", &xpos, &ypos, &width, &height); 152 + if (! fscanf(f, "%d %d %d %d\n", &xpos, &ypos, &width, &height)) { 153 + fprintf(stderr,"Coud not parse parameters for xpos, ypos, width, height from glx_info file.\n"); 154 + } 155 fclose(f); 156 } 157 is not strict enough, which again is better than not checking at all. It should check if the return value of fscanf is != 4 (if I have counted right). The patch already ships with the latest Debian/Ubuntu package and I am not aware of any disturbance to be reported because of it. Cheers, Steffen > > On 08-Jul-2013 8:51 AM, Gianfranco Costamagna wrote: > > Hi David et all, > > > > The following patch address many clang warnings. > > > > > > Other people can see the patch here > > http://anonscm.debian.org/gitweb/?p=pkg-boinc/boinc.git;a=blob;f=debian/patches/more_clang_warnings.patch;h=56bb29543205bdb06e295f5bdc4d3e914dfb96dc;hb=HEAD > > > > The patch is from Steffen Moeller. > > > > thanks > > > > Gianfranco > > > _______________________________________________ > boinc_dev mailing list > boinc_dev@ssl.berkeley.edu > http://lists.ssl.berkeley.edu/mailman/listinfo/boinc_dev > To unsubscribe, visit the above URL and > (near bottom of page) enter your email address. > _______________________________________________ boinc_dev mailing list boinc_dev@ssl.berkeley.edu http://lists.ssl.berkeley.edu/mailman/listinfo/boinc_dev To unsubscribe, visit the above URL and (near bottom of page) enter your email address.