Source-Changes-HG archive

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

[src/trunk]: src/external/mit/xorg/lib/libXaw libXaw: suppress lint warnings ...



details:   https://anonhg.NetBSD.org/src/rev/41baefe00bc8
branches:  trunk
changeset: 368293:41baefe00bc8
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sun Jul 03 14:09:22 2022 +0000

description:
libXaw: suppress lint warnings about pointer casts

Typical example:

TextAction.c(373): warning:
    pointer cast from 'pointer to struct _WidgetRec'
    to 'pointer to struct _TextRec' may be troublesome [247]

diffstat:

 external/mit/xorg/lib/libXaw/Makefile.common |  7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diffs (18 lines):

diff -r 2b434941c1a1 -r 41baefe00bc8 external/mit/xorg/lib/libXaw/Makefile.common
--- a/external/mit/xorg/lib/libXaw/Makefile.common      Sun Jul 03 13:29:28 2022 +0000
+++ b/external/mit/xorg/lib/libXaw/Makefile.common      Sun Jul 03 14:09:22 2022 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile.common,v 1.3 2021/05/30 02:20:09 joerg Exp $
+#      $NetBSD: Makefile.common,v 1.4 2022/07/03 14:09:22 rillig Exp $
 
 CPPFLAGS+=     -DHAVE_WCHAR_H          \
                -DHAVE_WCTYPE_H         \
@@ -22,3 +22,8 @@
 COPTS.Pixmap.c+=       ${${ACTIVE_CC} == "clang":? -Wno-incompatible-pointer-types-discards-qualifiers :}
 COPTS.TextAction.c+=   ${${ACTIVE_CC} == "gcc":? -Wno-discarded-qualifiers :}
 COPTS.TextAction.c+=   ${${ACTIVE_CC} == "clang":? -Wno-incompatible-pointer-types-discards-qualifiers :}
+
+# This warning mostly affects casts between _WidgetRec and _TextRec,
+# which don't have a common type prefix, but their members are compatible
+# nevertheless.
+LINTFLAGS+=    -X 247  # pointer cast from '%s' to '%s' may be troublesome



Home | Main Index | Thread Index | Old Index