Source-Changes-HG archive

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

[src/trunk]: src/sys/fs/msdosfs avoid an uninit warning with GCC 9.



details:   https://anonhg.NetBSD.org/src/rev/5049326ab705
branches:  trunk
changeset: 938367:5049326ab705
user:      mrg <mrg%NetBSD.org@localhost>
date:      Mon Sep 07 01:35:25 2020 +0000

description:
avoid an uninit warning with GCC 9.

diffstat:

 sys/fs/msdosfs/msdosfs_fat.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (26 lines):

diff -r e85c2bbd47be -r 5049326ab705 sys/fs/msdosfs/msdosfs_fat.c
--- a/sys/fs/msdosfs/msdosfs_fat.c      Mon Sep 07 01:15:25 2020 +0000
+++ b/sys/fs/msdosfs/msdosfs_fat.c      Mon Sep 07 01:35:25 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: msdosfs_fat.c,v 1.34 2018/09/03 16:29:34 riastradh Exp $       */
+/*     $NetBSD: msdosfs_fat.c,v 1.35 2020/09/07 01:35:25 mrg Exp $     */
 
 /*-
  * Copyright (C) 1994, 1995, 1997 Wolfgang Solfrank.
@@ -52,7 +52,7 @@
 #endif
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: msdosfs_fat.c,v 1.34 2018/09/03 16:29:34 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: msdosfs_fat.c,v 1.35 2020/09/07 01:35:25 mrg Exp $");
 
 /*
  * kernel include files.
@@ -895,6 +895,7 @@
        u_long bn, bo, bsize, byteoffset;
        u_long readcn, lbn = -1;
 
+       bn = 0; /* XXXgcc */
        while (cluster >= CLUST_FIRST && cluster <= pmp->pm_maxcluster) {
                byteoffset = FATOFS(pmp, cluster);
                fatblock(pmp, byteoffset, &bn, &bsize, &bo);



Home | Main Index | Thread Index | Old Index