Source-Changes-HG archive

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

[src/trunk]: src/lib/libc/gmon libc: suppress lint warning for namespacing mi...



details:   https://anonhg.NetBSD.org/src/rev/fe695e3bc7d7
branches:  trunk
changeset: 985533:fe695e3bc7d7
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sun Aug 29 16:44:16 2021 +0000

description:
libc: suppress lint warning for namespacing mismatch for _mcount

This is the last remaining instance of lint warning 215, which is about
implicitly defined functions.  Since C99, these implicit declarations
have not been allowed anymore.

diffstat:

 lib/libc/gmon/Makefile.inc |  13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)

diffs (27 lines):

diff -r 3ea4f0986cd4 -r fe695e3bc7d7 lib/libc/gmon/Makefile.inc
--- a/lib/libc/gmon/Makefile.inc        Sun Aug 29 16:17:08 2021 +0000
+++ b/lib/libc/gmon/Makefile.inc        Sun Aug 29 16:44:16 2021 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile.inc,v 1.15 2021/05/30 02:24:05 joerg Exp $
+#      $NetBSD: Makefile.inc,v 1.16 2021/08/29 16:44:16 rillig Exp $
 #      @(#)Makefile.inc        8.1 (Berkeley) 6/4/93
 
 # gmon sources
@@ -18,6 +18,17 @@
 COPTS.mcount.c+=${${ACTIVE_CXX} == "gcc":? -Wa,--no-warn :}
 .endif
 
+.if ${MACHINE_CPU} == "i386"
+# lint1 says:
+# mcount.c(285): warning: function '_mcount' implicitly declared to return int
+#
+# lint2 says:
+# _mcount used( common/lib/libc/gmon/mcount.c(285) ), but not defined
+#
+# The correct fix is probably to have a consistent underscore in both places.
+LINTFLAGS.mcount.c+=   -X 215
+.endif
+
 .if (${MACHINE_CPU} == "i386" || ${MACHINE_CPU} == "x86_64") && \
     ${HAVE_GCC:U0} >= 6
 # The usage of __builtin_frame_address(1) should be OK.



Home | Main Index | Thread Index | Old Index