Feb. 28, 2017
11:19 p.m.
On 02/28/2017 11:34 AM, Andreas Stieger wrote:
would you not say that less warnings would make the real ones stand out better?
Sure, but using appropriate compiler options should also generate less warnings, and that should be a better solution. The idea is to avoid contorting C code merely to pacify a compiler that's configured to be too picky. The proposed code: #ifdef ALL_STATE gmtptr = malloc(sizeof *gmtptr); if (gmtptr) #endif gmtload(gmtptr); is hard to read, since the C preprocessor nesting is not consistent with the preprocessed nesting. Readability is more important than silencing false positives.