[LTP] [Patch 00/12] Fix or suppress compiler warnings in posix/conformance/interfaces

Joerg Vehlow lkml@jv-coder.de
Fri Nov 19 08:45:50 CET 2021


Hi,

this set of patches removed all compiler warnings (at least fog gcc10),
for all tests in openposix/conformance/interfaces.
I fixed some real issues in separate patches and a lot of similar problems
in bulk patches.
For two categories of warnings I used pragma diagnostic:
 - nonnull: Two nonnull warnings are triggered, where the test is used
   to explicitly test passing NULL. The only way to fix this warning, is
   to supress it.
 - unused-result for write in signal handlers: There is no good way,
   to handle a failing write-call in a signal handler. Most of the time,
   the test is exited anyway, so supressing the warning seems like the best fix.

While these pragmas are gcc specific IIRC they also work for clang.

Joerg




More information about the ltp mailing list