Skip to content

Fix or suppress compiler warnings in posix/conformance/interfaces

Joerg Vehlow ltp 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest12 patches 18 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/12posix/pthread_create/15-1: Supress warningtestcases/open_posix_testsuite/conformance/interfaces/pthread_create/15-1.c+1 -01 reply
2/12posix/mq_(timed)send/5-1: Fix error reportingtestcases/open_posix_testsuite/conformance/interfaces/mq_send/5-1.c testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/5-1.c+5 -43 replies
3/12posix/pthread_create/*: Remove unused variabletestcases/open_posix_testsuite/conformance/interfaces/pthread_create/1-5.c testcases/open_posix_testsuite/conformance/interfaces/pthread_create/3-2.c+0 -51 reply
4/12posix/conformance/interfaces: Fix unsued-variable for testfrmwtestcases/open_posix_testsuite/conformance/interfaces/pthread_create/14-1.c testcases/open_posix_testsuite/conformance/interfaces/pthread_create/3-2.c testcases/open_posix_testsuite/conformance/interfaces/pthread_detach/1-2.c +7 more+15 -22 replies
5/12posix/conformance/interfaces: Fix all unused variable warningstestcases/open_posix_testsuite/conformance/interfaces/aio_read/9-1.c testcases/open_posix_testsuite/conformance/interfaces/aio_write/7-1.c testcases/open_posix_testsuite/conformance/interfaces/fork/7-1.c +12 more+16 -283 replies
6/12posix/conformance/interfaces: Fix all unused function warningstestcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setstack/6-1.c testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setstack/7-1.c testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setstacksize/4-1.c +5 more+5 -491 reply
7/12posix/pthread_key_create/2-1: Remove invalid part of testtestcases/open_posix_testsuite/conformance/interfaces/pthread_key_create/2-1.c+0 -71 reply
8/12posix/asctime: Fix potentioal buffer overflowtestcases/open_posix_testsuite/conformance/interfaces/asctime/1-1.c+1 -11 reply
9/12posix/conformance/interfaces/pthread_*_destroy: Suppress nonnull warningtestcases/open_posix_testsuite/conformance/interfaces/pthread_condattr_destroy/4-1.c testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_destroy/4-1.c+6 -01 reply
10/12posix/conformance/interfaces: Fix all sign-compare warningstestcases/open_posix_testsuite/conformance/interfaces/pthread_exit/1-2.c testcases/open_posix_testsuite/conformance/interfaces/pthread_exit/2-2.c testcases/open_posix_testsuite/conformance/interfaces/pthread_exit/3-2.c +6 more+13 -91 reply
11/12posix/conformance/interface/mmap/5-1: Remove invalid statictestcases/open_posix_testsuite/conformance/interfaces/mmap/5-1.c+1 -11 reply
12/12posix/interface/conformance: Fix/supress all unused-result warningstestcases/open_posix_testsuite/conformance/interfaces/clock_getcpuclockid/5-1.c testcases/open_posix_testsuite/conformance/interfaces/fork/7-1.c testcases/open_posix_testsuite/conformance/interfaces/kill/2-2.c +40 more+261 -752 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

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

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

Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp