Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#13 14 files trigger warning on compile, modified versions attached

v1.0 (example)
open
nobody
None
5
2013-06-11
2013-06-11
dan
No

There seem to be 14 source files that trigger warnings in compilation. I believe these are all due to ignoring the return value of functions returning a value (per gcc version 4.6.3, this is reported because of the -Wunused-result flag).

So i've attached a tar of fixes to those files. Actually, there are 16 files in the tar. I modified misc.c to include a wrapper for the system() call, which emits an error and returns a 0-1 status, rather than repeat the same code so often. Aside from system(), other ignored return values come from fgets() and getcwd(,), and perhaps others (don't recall atm).

I believe these changes are reasonable, or at least plausible.

It looks like there may have been an effort to silence the compiler about getcwd(,) using a cast --- (void)getcwd(,). This is in fileBrowser.c, and doesn't seem to silence the compiler, and is inconsistent with the usage of getcwd(,) in graphic.c. So i modified fileBrowser.c to be more like graphic.c.

The result of using these files is, at least for me, a clean compile with no warning messages.

I'm posting the tar here just in case anybody else would like a clean compile (which i think may be useful for baselining).

1 Attachments

Discussion