GCC 7 provides a large number of compiler warnings that we should take advantage of. Here is the set I am testing with:
-Wall -Wextra -Wunused -Wmaybe-uninitialized -Wsign-compare -Wstrict-overflow -fno-strict-aliasing -Wunused-but-set-variable -Walloc-size-larger-than=1024 -Walloc-zero -Walloca -Walloca-larger-than=1024 -Wbool-operation -Wbuiltin-declaration-mismatch -Wdangling-else -Wduplicate-decl-specifier -Wduplicated-branches -Wexpansion-to-defined -Wformat -Wformat-overflow=2 -Wformat-truncation=2 -Wimplicit-fallthrough=5 -Wint-in-bool-context -Wmemset-elt-size -Wpointer-compare -Wrestrict -Wshadow-compatible-local -Wshadow-local -Wshadow=compatible-local -Wshadow=global -Wshadow=local -Wstringop-overflow=4 -Wswitch-unreachable -Wvla-larger-than=1024
1. 2. 3.
Metadata Update from @firstyear: - Issue assigned to firstyear
<img alt="0001-Ticket-49193-gcc7-warning-fixes.patch" src="/389-ds-base/issue/raw/files/17085317b52fa3ce91a3c10cdb5d21c1b71e41079eb1940cf4a8302869067a37-0001-Ticket-49193-gcc7-warning-fixes.patch" />
Metadata Update from @firstyear: - Custom field reviewstatus adjusted to new - Custom field type adjusted to defect
Metadata Update from @firstyear: - Custom field reviewstatus adjusted to review (was: new)
This only fixes format strings (by expanding them to a safe size) and unused parameter warnings.
Ack, but one compiler warning:
../389-ds-base/src/nunc-stans/ns/ns_thrpool.c: In function ‘ns_thrpool_wait’: ../389-ds-base/src/nunc-stans/ns/ns_thrpool.c:1564:20: warning: statement with no effect [-Wunused-value] retval == PR_FAILURE; ~~~~~~~^~~~~~~~~~~~~
Metadata Update from @mreynolds: - Custom field reviewstatus adjusted to ack (was: review)
Fixed the statement with no effect,
commit 9e8aba8 To ssh://git@pagure.io/389-ds-base.git 3129a94..85dcc19 master -> master
Metadata Update from @mreynolds: - Issue close_status updated to: fixed - Issue set to the milestone: 1.3.6.3 - Issue status updated to: Closed (was: Open)
389-ds-base is moving from Pagure to Github. This means that new issues and pull requests will be accepted only in 389-ds-base's github repository.
This issue has been cloned to Github and is available here: - https://github.com/389ds/389-ds-base/issues/2252
If you want to receive further updates on the issue, please navigate to the github issue and click on subscribe button.
subscribe
Thank you for understanding. We apologize for all inconvenience.
Metadata Update from @spichugi: - Issue close_status updated to: wontfix (was: fixed)
Login to comment on this ticket.