note 'm68k {u,}int64_t used uninitialized' bug.

add reference to gcc bug report.
mark all (known) occurrences.
This commit is contained in:
cl 2003-10-28 02:01:46 +00:00
parent 375b04dc77
commit b8d68ee313
4 changed files with 23 additions and 9 deletions

View File

@ -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 @@ descr
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

View File

@ -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 @@ wdstrategy(struct buf *bp)
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);

View File

@ -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 @@ sdstrategy(bp)
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,

View File

@ -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 @@ nfsrv_statfs(nfsd, slp, procp, mrq)
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);