Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/x86/x86 Quell maybe-uninitialized false positives f...



details:   https://anonhg.NetBSD.org/src/rev/3a75a7c067b3
branches:  trunk
changeset: 821739:3a75a7c067b3
user:      nonaka <nonaka%NetBSD.org@localhost>
date:      Thu Feb 16 03:53:20 2017 +0000

description:
Quell maybe-uninitialized false positives from gcc -Os.

reported by John D. Baker at current-users@.
http://mail-index.netbsd.org/current-users/2017/02/15/msg031132.html

diffstat:

 sys/arch/x86/x86/efi.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (28 lines):

diff -r 18f3ac769ee8 -r 3a75a7c067b3 sys/arch/x86/x86/efi.c
--- a/sys/arch/x86/x86/efi.c    Thu Feb 16 03:47:23 2017 +0000
+++ b/sys/arch/x86/x86/efi.c    Thu Feb 16 03:53:20 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: efi.c,v 1.8 2017/02/14 13:29:09 nonaka Exp $   */
+/*     $NetBSD: efi.c,v 1.9 2017/02/16 03:53:20 nonaka Exp $   */
 
 /*-
  * Copyright (c) 2016 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: efi.c,v 1.8 2017/02/14 13:29:09 nonaka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: efi.c,v 1.9 2017/02/16 03:53:20 nonaka Exp $");
 
 #include <sys/kmem.h>
 #include <sys/param.h>
@@ -368,7 +368,8 @@
        struct bi_memmap_entry *entry;
        struct efi_md *md;
        uint64_t addr, size;
-       uint64_t start_addr, end_addr;
+       uint64_t start_addr = 0;        /* XXX gcc -Os: maybe-uninitialized */
+       uint64_t end_addr = 0;          /* XXX gcc -Os: maybe-uninitialized */
        uint32_t i;
        int n, type, seg_type = -1;
 



Home | Main Index | Thread Index | Old Index