Source-Changes-HG archive

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

[src/trunk]: src note 'm68k {u,}int64_t used uninitialized' bug.



details:   https://anonhg.NetBSD.org/src/rev/f93bbf03aedc
branches:  trunk
changeset: 554427:f93bbf03aedc
user:      cl <cl%NetBSD.org@localhost>
date:      Tue Oct 28 02:01:46 2003 +0000

description:
note 'm68k {u,}int64_t used uninitialized' bug.
add reference to gcc bug report.
mark all (known) occurrences.

diffstat:

 doc/HACKS           |  15 ++++++++++++++-
 sys/dev/ata/wd.c    |   6 +++---
 sys/dev/scsipi/sd.c |   6 +++---
 sys/nfs/nfs_serv.c  |   5 +++--
 4 files changed, 23 insertions(+), 9 deletions(-)

diffs (106 lines):

diff -r 7456a86195a4 -r f93bbf03aedc doc/HACKS
--- a/doc/HACKS Tue Oct 28 01:58:23 2003 +0000
+++ b/doc/HACKS Tue Oct 28 02:01:46 2003 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: HACKS,v 1.15 2003/10/27 08:07:58 wiz Exp $
+# $NetBSD: HACKS,v 1.16 2003/10/28 02:01:46 cl Exp $
 #
 # This file is intended to document workarounds for currently unsolved
 # (mostly) compiler bugs.
@@ -227,3 +227,16 @@
        There is no way to disable just this warning, so -Wno-error is
        turned on for this file.
 kcah
+
+hack   gcc 3.3.2 m68k {u,}int64_t uninitialized bug
+cdate  Tue Oct 28 02:46:46 CET 2003
+who    cl
+port   MACHINE_ARCH == m68k
+file   sys/dev/scsipi/sd.c : 1.212 : 686
+file   sys/dev/ata/wd.c : 1.265 : 483
+file   sys/nfs/nfs_serv.c : 1.84 : 3290
+descr
+       gcc incorrectly reports {u,}int64_t variables as used uninitialized.
+       Work around by adding explicit initializers.
+       gcc bug report at http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12792
+kcah
diff -r 7456a86195a4 -r f93bbf03aedc sys/dev/ata/wd.c
--- a/sys/dev/ata/wd.c  Tue Oct 28 01:58:23 2003 +0000
+++ b/sys/dev/ata/wd.c  Tue Oct 28 02:01:46 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: wd.c,v 1.264 2003/10/27 23:06:15 fredb Exp $ */
+/*     $NetBSD: wd.c,v 1.265 2003/10/28 02:01:46 cl Exp $ */
 
 /*
  * Copyright (c) 1998, 2001 Manuel Bouyer.  All rights reserved.
@@ -66,7 +66,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wd.c,v 1.264 2003/10/27 23:06:15 fredb Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wd.c,v 1.265 2003/10/28 02:01:46 cl Exp $");
 
 #ifndef WDCDEBUG
 #define WDCDEBUG
@@ -480,7 +480,7 @@
        daddr_t blkno;
        int s;
 
-       blkno = 0;              /* XXX to appease gcc3 */
+       blkno = 0;              /* XXX to appease gcc3 m68k */
 
        WDCDEBUG_PRINT(("wdstrategy (%s)\n", wd->sc_dev.dv_xname),
            DEBUG_XFERS);
diff -r 7456a86195a4 -r f93bbf03aedc sys/dev/scsipi/sd.c
--- a/sys/dev/scsipi/sd.c       Tue Oct 28 01:58:23 2003 +0000
+++ b/sys/dev/scsipi/sd.c       Tue Oct 28 02:01:46 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sd.c,v 1.211 2003/10/27 23:03:05 fredb Exp $   */
+/*     $NetBSD: sd.c,v 1.212 2003/10/28 02:01:46 cl Exp $      */
 
 /*-
  * Copyright (c) 1998, 2003 The NetBSD Foundation, Inc.
@@ -54,7 +54,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sd.c,v 1.211 2003/10/27 23:03:05 fredb Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sd.c,v 1.212 2003/10/28 02:01:46 cl Exp $");
 
 #include "opt_scsi.h"
 #include "opt_bufq.h"
@@ -683,7 +683,7 @@
        int s;
        boolean_t sector_aligned;
 
-       blkno = 0;              /* XXX to appease gcc3 */       
+       blkno = 0;              /* XXX to appease gcc3 m68k */
 
        SC_DEBUG(sd->sc_periph, SCSIPI_DB2, ("sdstrategy "));
        SC_DEBUG(sd->sc_periph, SCSIPI_DB1,
diff -r 7456a86195a4 -r f93bbf03aedc sys/nfs/nfs_serv.c
--- a/sys/nfs/nfs_serv.c        Tue Oct 28 01:58:23 2003 +0000
+++ b/sys/nfs/nfs_serv.c        Tue Oct 28 02:01:46 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: nfs_serv.c,v 1.83 2003/10/20 13:53:47 yamt Exp $       */
+/*     $NetBSD: nfs_serv.c,v 1.84 2003/10/28 02:01:46 cl Exp $ */
 
 /*
  * Copyright (c) 1989, 1993
@@ -55,7 +55,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nfs_serv.c,v 1.83 2003/10/20 13:53:47 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nfs_serv.c,v 1.84 2003/10/28 02:01:46 cl Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -3287,6 +3287,7 @@
                return (0);
        nfsm_build(sfp, struct nfs_statfs *, NFSX_STATFS(v3));
        if (v3) {
+               tval = 0;       /* XXX: gcc m68k */
                tval = (u_quad_t)((quad_t)sf->f_blocks * (quad_t)sf->f_bsize);
                txdr_hyper(tval, &sfp->sf_tbytes);
                tval = (u_quad_t)((quad_t)sf->f_bfree * (quad_t)sf->f_bsize);



Home | Main Index | Thread Index | Old Index