Page MenuHomeFreeBSD

rtld-elf/i386: silence gcc warnings
AbandonedPublic

Authored by rlibby on Dec 13 2018, 7:13 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sep 25 2023, 6:54 AM
Unknown Object (File)
Aug 24 2023, 2:21 AM
Unknown Object (File)
Aug 11 2023, 8:23 PM
Unknown Object (File)
Jun 26 2023, 11:07 PM
Unknown Object (File)
Jun 15 2023, 7:08 PM
Unknown Object (File)
Jun 14 2023, 1:35 PM
Unknown Object (File)
Jan 17 2023, 1:43 AM
Unknown Object (File)
Jan 12 2023, 6:51 AM

Details

Summary

r340842 reprise, for i386 this time. The WARNS level was raised
recently. Unfortunately gcc 6.5 is not able to track whether some
variables are initialized across a series of switch statements in
reloc_non_plt and issues false positive warnings.

Test Plan

make CROSS_TOOLCHAIN=amd64-gcc TARGET=amd64 buildworld

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 21553
Build 20859: arc lint + arc unit

Event Timeline

@cem pointed out to me r340842 & r340843. @kib would you prefer we just
did the same to i386 as was done to amd64?

@cem pointed out to me r340842 & r340843. @kib would you prefer we just
did the same to i386 as was done to amd64?

Sure, I do not see why i386 should be different. Put it other way, my opinion is that it is more useful to keep the warning enabled.

Silence warnings in code instead of disabling the warning.

rlibby retitled this revision from rtld-elf: -Wno-error=maybe-uninitialized for gcc to rtld-elf/i386: silence gcc warnings.Dec 13 2018, 10:42 PM
rlibby edited the summary of this revision. (Show Details)

Might as well apply a similar fix to aarch64/reloc.c, which does something sort of similar (symval). Other archs look different enough not to produce the same warning. (aarch64's use may be simpler enough that the warning is not produced, either, but I have not tried it.)

This revision is now accepted and ready to land.Dec 13 2018, 11:02 PM
rlibby added a subscriber: vangyzen.

Equivalent patch was done in r343672 by @vangyzen .