From owner-freebsd-current Thu Jul 10 10:55:17 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id KAA14842 for current-outgoing; Thu, 10 Jul 1997 10:55:17 -0700 (PDT) Received: from pahtoh.cwu.edu (root@pahtoh.cwu.edu [198.104.65.27]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id KAA14826; Thu, 10 Jul 1997 10:54:57 -0700 (PDT) Received: from opus.cts.cwu.edu (skynyrd@opus.cts.cwu.edu [198.104.92.71]) by pahtoh.cwu.edu (8.8.5/8.8.5) with ESMTP id KAA17938; Thu, 10 Jul 1997 10:54:40 -0700 (PDT) Received: from localhost (skynyrd@localhost) by opus.cts.cwu.edu (8.8.6/8.8.5) with SMTP id KAA17454; Thu, 10 Jul 1997 10:54:40 -0700 (PDT) Date: Thu, 10 Jul 1997 10:54:39 -0700 (PDT) From: Chris Timmons To: charnier@freebsd.org cc: freebsd-current@freebsd.org Subject: global broken Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-current@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Revision 1.3 of usr.bin/global/gctags/ctags.c changed the copyright string to be read only. An interesting bit of cruft further down in the file writes to the now const data. Compiler warnings and run-time bus errors follow: The change: RCS file: /home/ncvs//src/usr.bin/global/gctags/ctags.c,v retrieving revision 1.2 retrieving revision 1.3 diff -r1.2 -r1.3 35c35 < static char copyright[] = --- > static const char copyright[] = The compiler warning: cc -g -O -I/usr/src/usr.bin/global/gctags -DGTAGS -DBUGFIX -DMODIFY -DYACC -c /usr/src/usr.bin/global/gctags/ctags.c /usr/src/usr.bin/global/gctags/ctags.c: In function `main': /usr/src/usr.bin/global/gctags/ctags.c:112: warning: assignment of read-only location The bus error Program received signal SIGBUS, Bus error. main (argc=3, argv=0xefbfd758) at /usr/src/usr.bin/global/gctags/ctags.c:112 112 copyright[0] = copyright[0]; /* to satisfy compiler */ (gdb) FIX: IMHO since we are maintaining this on a vendor branch we should just remove the silly line 112 and the #ifdef LINT that surrounds it. -Chris