From d3b5f56344d8bfcdd6cfb82446af0e5e55ad9ebe Mon Sep 17 00:00:00 2001 From: John Levon Date: Wed, 7 Aug 2019 12:09:20 -0700 Subject: 11528 Makefile.noget can get gone 11529 Use -Wno-maybe-initialized Reviewed by: Peter Tribble Reviewed by: Toomas Soome Approved by: Robert Mustacchi --- usr/src/lib/libc/amd64/Makefile | 2 +- usr/src/lib/libc/i386/Makefile.com | 2 +- usr/src/lib/libc/inc/thr_inlines.h | 6 +++++- usr/src/lib/libc/port/fp/_base_sup.c | 8 ++++++++ usr/src/lib/libc/sparc/Makefile.com | 4 ++-- usr/src/lib/libc/sparcv9/Makefile.com | 4 ++-- 6 files changed, 19 insertions(+), 7 deletions(-) (limited to 'usr/src/lib/libc') diff --git a/usr/src/lib/libc/amd64/Makefile b/usr/src/lib/libc/amd64/Makefile index b981d952c3..d71aebf34a 100644 --- a/usr/src/lib/libc/amd64/Makefile +++ b/usr/src/lib/libc/amd64/Makefile @@ -1027,7 +1027,7 @@ CFLAGS64 += -xinline= CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-switch -CERRWARN += -_gcc=-Wno-uninitialized +CERRWARN += $(CNOWARN_UNINIT) CERRWARN += -_gcc=-Wno-unused-value CERRWARN += -_gcc=-Wno-unused-label CERRWARN += -_gcc=-Wno-unused-variable diff --git a/usr/src/lib/libc/i386/Makefile.com b/usr/src/lib/libc/i386/Makefile.com index 9ae85be490..4eef3b98b7 100644 --- a/usr/src/lib/libc/i386/Makefile.com +++ b/usr/src/lib/libc/i386/Makefile.com @@ -1075,7 +1075,7 @@ CFLAGS += $(XINLINE) CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-switch -CERRWARN += -_gcc=-Wno-uninitialized +CERRWARN += $(CNOWARN_UNINIT) CERRWARN += -_gcc=-Wno-unused-value CERRWARN += -_gcc=-Wno-unused-label CERRWARN += -_gcc=-Wno-unused-variable diff --git a/usr/src/lib/libc/inc/thr_inlines.h b/usr/src/lib/libc/inc/thr_inlines.h index f7cdc6a6bd..1259816e63 100644 --- a/usr/src/lib/libc/inc/thr_inlines.h +++ b/usr/src/lib/libc/inc/thr_inlines.h @@ -24,6 +24,10 @@ * Use is subject to license terms. */ +/* + * Copyright 2019 Joyent, Inc. + */ + #ifndef _THR_INLINES_H #define _THR_INLINES_H @@ -138,7 +142,7 @@ gethrtime(void) /* note: caller-saved registers are trashed */ extern __GNU_INLINE int set_lock_byte(volatile uint8_t *__lockp) { - int __value; + int __value = 0; #if defined(__x86) __asm__ __volatile__( "movl $1, %0\n\t" diff --git a/usr/src/lib/libc/port/fp/_base_sup.c b/usr/src/lib/libc/port/fp/_base_sup.c index 52e258d002..eb6a3fde5e 100644 --- a/usr/src/lib/libc/port/fp/_base_sup.c +++ b/usr/src/lib/libc/port/fp/_base_sup.c @@ -24,6 +24,10 @@ * Use is subject to license terms. */ +/* + * Copyright 2019 Joyent, Inc. + */ + #include "lint.h" #include #include "base_conversion.h" @@ -88,7 +92,11 @@ __base_conversion_set_exception(fp_exception_field_type ef) * to leave it for now because it's still used by Sun's old Fortran * runtime libraries. Today this is a bug; in the days of SunOS 4.x, * when the relevant design decisions were made, it was a feature. + * + * Regardless, on 32-bit, 'quadruple' under GCC is not 128 bits, so it + * uses uninitialized memory... */ +#pragma GCC diagnostic ignored "-Wuninitialized" enum fp_class_type __class_quadruple(quadruple *x) { diff --git a/usr/src/lib/libc/sparc/Makefile.com b/usr/src/lib/libc/sparc/Makefile.com index d70057964b..8904d1d49a 100644 --- a/usr/src/lib/libc/sparc/Makefile.com +++ b/usr/src/lib/libc/sparc/Makefile.com @@ -21,7 +21,7 @@ # # Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved. -# Copyright 2016 Joyent, Inc. +# Copyright 2019 Joyent, Inc. # Copyright (c) 2013, OmniTI Computer Consulting, Inc. All rights reserved. # Copyright 2013 Garrett D'Amore # Copyright 2018 Nexenta Systems, Inc. @@ -1104,7 +1104,7 @@ CFLAGS += -xinline= CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-switch -CERRWARN += -_gcc=-Wno-uninitialized +CERRWARN += $(CNOWARN_UNINIT) CERRWARN += -_gcc=-Wno-unused-value CERRWARN += -_gcc=-Wno-unused-label CERRWARN += -_gcc=-Wno-unused-variable diff --git a/usr/src/lib/libc/sparcv9/Makefile.com b/usr/src/lib/libc/sparcv9/Makefile.com index c295d8d68f..4256560408 100644 --- a/usr/src/lib/libc/sparcv9/Makefile.com +++ b/usr/src/lib/libc/sparcv9/Makefile.com @@ -22,7 +22,7 @@ # # Copyright 2016 Gary Mills # Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved. -# Copyright (c) 2015, Joyent, Inc. All rights reserved. +# Copyright 2019 Joyent, Inc. # Copyright (c) 2013, OmniTI Computer Consulting, Inc. All rights reserved. # Copyright 2013 Garrett D'Amore # Copyright 2018 Nexenta Systems, Inc. @@ -1044,7 +1044,7 @@ CFLAGS64 += -xinline= CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-switch -CERRWARN += -_gcc=-Wno-uninitialized +CERRWARN += $(CNOWARN_UNINIT) CERRWARN += -_gcc=-Wno-unused-value CERRWARN += -_gcc=-Wno-unused-label CERRWARN += -_gcc=-Wno-unused-variable -- cgit v1.2.3