On 16-07-2012 03:45, T.J. Yang wrote:
The compiler warnings are less but there are still 99 compiler warnings regarding to "function not checked on returned result"
Example: ignoring return value of ‘freopen’, declared with attribute warn_unused_result [-Wunused-result]
I only get 94, depends on compiler versions I guess. There are some valid warnings, but they haven't been blindly ignored.
52 of those warnings come from re-opening the logfile after a log-rotation. If it fails, the only consequence is that logging stops. The problem here is: What can you do if you no longer have a logfile ? Should xymon abort? That would just be weird, because we cannot tell the user why Xymon stopped (there is no logfile, remember?)
24 are from calls to "fgets". Some of these are valid, but happen only in extreme situations - and some are just ignorable, e.g. when scanning the history files looking for where to start reading fgets() is used to skip to the next line, so we really don't care about the data being read.
And the rest is a mixed bag of calls.
I'll work to reduce that number, but it just wasn't a priority right now.
Regards, Henrik