• Arnd Bergmann's avatar
    x86/fpu/math-emu: Fix possible uninitialized variable use · 75e2f0a6
    Arnd Bergmann authored
    When building the kernel with "make EXTRA_CFLAGS=...", this overrides
    the "PARANOID" preprocessor macro defined in arch/x86/math-emu/Makefile,
    and we run into a build warning:
    
      arch/x86/math-emu/reg_compare.c: In function ‘compare_i_st_st’:
      arch/x86/math-emu/reg_compare.c:254:6: error: ‘f’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
    
    This fixes the implementation to work correctly even without the PARANOID
    flag, and also fixes the Makefile to not use the EXTRA_CFLAGS variable
    but instead use the ccflags-y variable in the Makefile that is meant
    for this purpose.
    Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
    Cc: Bill Metzenthen <billm@melbpc.org.au>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Link: http://lkml.kernel.org/r/20170719125310.2487451-3-arnd@arndb.deSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
    75e2f0a6
Makefile 786 Bytes