Module Name: src
Committed By: nonaka
Date: Thu Feb 16 03:53:20 UTC 2017
Modified Files:
src/sys/arch/x86/x86: efi.c
Log Message:
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
To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/x86/x86/efi.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/x86/x86/efi.c
diff -u src/sys/arch/x86/x86/efi.c:1.8 src/sys/arch/x86/x86/efi.c:1.9
--- src/sys/arch/x86/x86/efi.c:1.8 Tue Feb 14 13:29:09 2017
+++ src/sys/arch/x86/x86/efi.c Thu Feb 16 03:53:20 2017
@@ -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 @@ efi_get_e820memmap(void)
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;