diff options
| author | Ingo Molnar <[email protected]> | 2016-03-08 10:09:53 +0000 |
|---|---|---|
| committer | Ingo Molnar <[email protected]> | 2016-03-08 10:09:53 +0000 |
| commit | 6436257b491cc0d456c39330dfc22126148d5ed7 (patch) | |
| tree | 4e3f4a1da9f88e429c95b7ea5661390fc611e836 /net/switchdev/switchdev.c | |
| parent | Merge branch 'fortglx/4.6/time' of https://git.linaro.org/people/john.stultz/... (diff) | |
| download | kernel-6436257b491cc0d456c39330dfc22126148d5ed7.tar.gz kernel-6436257b491cc0d456c39330dfc22126148d5ed7.zip | |
time/timekeeping: Work around false positive GCC warning
Newer GCC versions trigger the following warning:
kernel/time/timekeeping.c: In function ‘get_device_system_crosststamp’:
kernel/time/timekeeping.c:987:5: warning: ‘clock_was_set_seq’ may be used uninitialized in this function [-Wmaybe-uninitialized]
if (discontinuity) {
^
kernel/time/timekeeping.c:1045:15: note: ‘clock_was_set_seq’ was declared here
unsigned int clock_was_set_seq;
^
GCC clearly is unable to recognize that the 'do_interp' boolean tracks
the initialization status of 'clock_was_set_seq'.
The GCC version used was:
gcc version 5.3.1 20151207 (Red Hat 5.3.1-2) (GCC)
Work it around by initializing clock_was_set_seq to 0. Compilers that
are able to recognize the code flow will eliminate the unnecessary
initialization.
Acked-by: Thomas Gleixner <[email protected]>
Cc: John Stultz <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: [email protected]
Signed-off-by: Ingo Molnar <[email protected]>
Diffstat (limited to 'net/switchdev/switchdev.c')
0 files changed, 0 insertions, 0 deletions
