Source-Changes-HG archive

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

[src/trunk]: src/external/mit/xorg/server/drivers/xf86-video-xgi Use -Wno-arr...



details:   https://anonhg.NetBSD.org/src/rev/3bb588039598
branches:  trunk
changeset: 782736:3bb588039598
user:      apb <apb%NetBSD.org@localhost>
date:      Sun Nov 18 08:24:02 2012 +0000

description:
Use -Wno-array-bounds when building two files that read past the end of
an array.  It's not clear how to fix the real bug.  This hack allows
the build to complete with clang.

diffstat:

 external/mit/xorg/server/drivers/xf86-video-xgi/Makefile |  17 +++++++++++++++-
 1 files changed, 16 insertions(+), 1 deletions(-)

diffs (29 lines):

diff -r 1035f19f14a5 -r 3bb588039598 external/mit/xorg/server/drivers/xf86-video-xgi/Makefile
--- a/external/mit/xorg/server/drivers/xf86-video-xgi/Makefile  Sun Nov 18 00:06:56 2012 +0000
+++ b/external/mit/xorg/server/drivers/xf86-video-xgi/Makefile  Sun Nov 18 08:24:02 2012 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.1 2012/07/19 19:21:50 macallan Exp $
+#      $NetBSD: Makefile,v 1.2 2012/11/18 08:24:02 apb Exp $
 
 DRIVER=                xf86-video-xgi
 DRIVER_NAME=   xgi_drv
@@ -16,4 +16,19 @@
 # for now, I'd like to see this thing work first
 CPPFLAGS+=     -DHAVE_UNISTD_H -Wno-deprecated-declarations
 
+# vb_struct.h contains this declaration:
+#
+#      typedef struct _XGI_CRT1TableStruct
+#      {
+#        UCHAR CR[15];
+#      } XGI_CRT1TableStruct;
+#
+# but code in init.c and vb_setmode.c reads elements beyond the end of
+# the array and writes the result into hardware registers.  It's not
+# clear how to fix this, so just disable the -Warray-bounds warning to
+# allow the build to complete.
+#
+COPTS.init.c=          -Wno-array-bounds
+COPTS.vb_setmode.c=    -Wno-array-bounds
+
 .include "../Makefile.xf86-driver"



Home | Main Index | Thread Index | Old Index