Closed ingowald closed 7 years ago
Thanks for working on this! But this doesn't look right:
#define AssertResult(desired,expr) { int rc = expr; assert(rc == rc); }
Firstly, it would be great to only have this defined once and then include where necessary instead of having it defined in two places.
Secondly, checking for rc == rc
will always succeed. You probably want to instead check whether desired == rc
.
absolutely correct. Didn't want tools/ppm to include any new header files so replicate the macro, but next pull request will include internal.h instead. the assert of course was an oversight. my fault.
Existing release contained several instances of code that produced warnings on gcc - missing 'const' in const char *-type strings, non-checked return values of fread, fscan, etc. This diff fixes those for c++ (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609; for which it now compiles in cmake/release without any warnings.