Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/cddl/osnet/lib/libdtrace external/cddl/osnet: Supre...



details:   https://anonhg.NetBSD.org/src/rev/8acfd6feabde
branches:  trunk
changeset: 849868:8acfd6feabde
user:      fox <fox%NetBSD.org@localhost>
date:      Tue Mar 17 00:50:12 2020 +0000

description:
external/cddl/osnet: Supress -Werror=maybe-uninitialized error in libdtrace.

It looks like this is a false positive, since the section of code triggering the error

external/cddl/osnet/dist/lib/libdtrace/common/dt_proc.c:400:42:

is only accessed after "err" is initialized.

Error was reported when build.sh was run with MKLIBCSANITIZER=yes flag.

Reviewed by: kamil@

diffstat:

 external/cddl/osnet/lib/libdtrace/Makefile |  8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diffs (22 lines):

diff -r 6d63cebb2cbe -r 8acfd6feabde external/cddl/osnet/lib/libdtrace/Makefile
--- a/external/cddl/osnet/lib/libdtrace/Makefile        Tue Mar 17 00:30:17 2020 +0000
+++ b/external/cddl/osnet/lib/libdtrace/Makefile        Tue Mar 17 00:50:12 2020 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.26 2019/12/03 22:10:56 jmcneill Exp $
+#      $NetBSD: Makefile,v 1.27 2020/03/17 00:50:12 fox Exp $
 
 # $FreeBSD: head/cddl/lib/libdtrace/Makefile 314654 2017-03-04 11:30:04Z ngie $
 
@@ -94,6 +94,12 @@
 COPTS.dt_pid.c         += ${${ACTIVE_CC} == "gcc" :? -Wno-unused-but-set-variable :}
 COPTS.dt_isadep.c      += -Wno-unused-variable
 
+.if (${MKLIBCSANITIZER:Uno} == "yes")
+.if (${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} == 8)
+COPTS.dt_proc.c+=      -Wno-maybe-uninitialized
+.endif
+.endif
+
 .if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64"
 CPPFLAGS+=     -I${OPENSOLARIS_SYS_DISTDIR}/uts/intel
 CPPFLAGS+=     -I${.CURDIR}/../../dev/dtrace/x86



Home | Main Index | Thread Index | Old Index