Current-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
gcc 4.8 vs x86 kernels w/o genfb
amd64/i386 kernels that omit "genfb" (NGENFB == 0) fail to build:
[...]
--- consinit.o ---
/x/current/src/sys/arch/x86/x86/consinit.c: In function 'consinit':
/x/current/src/sys/arch/x86/x86/consinit.c:150:35: error: variable 'fbinfo' set
but not used [-Werror=unused-but-set-variable]
const struct btinfo_framebuffer *fbinfo;
^
cc1: all warnings being treated as errors
*** [consinit.o] Error code 1
nbmake: stopped in /d0/build/current/obj/amd64/sys/arch/amd64/compile/SCRAPPY
1 error
Some use-case reorganization gives:
+Index: sys/arch/x86/x86/consinit.c
+===================================================================
+RCS file: /cvsroot/src/sys/arch/x86/x86/consinit.c,v
+retrieving revision 1.26
+diff -u -b -r1.26 consinit.c
+--- sys/arch/x86/x86/consinit.c 26 Jan 2014 15:49:25 -0000 1.26
++++ sys/arch/x86/x86/consinit.c 12 Mar 2014 11:17:07 -0000
+@@ -147,7 +147,6 @@
+ consinit(void)
+ {
+ const struct btinfo_console *consinfo;
+- const struct btinfo_framebuffer *fbinfo;
+ static int initted;
+ #if (NCOM > 0)
+ int rv;
+@@ -163,11 +162,12 @@
+ #endif
+ consinfo = &default_consinfo;
+
+- fbinfo = lookup_bootinfo(BTINFO_FRAMEBUFFER);
+-
+ if (!strcmp(consinfo->devname, "pc")) {
+ int error;
+ #if (NGENFB > 0)
++ const struct btinfo_framebuffer *fbinfo;
++
++ fbinfo = lookup_bootinfo(BTINFO_FRAMEBUFFER);
+ if (fbinfo && fbinfo->physaddr > 0) {
+ if (x86_genfb_cnattach() == -1) {
+ initted = 0; /* defer */
--
|/"\ John D. Baker, KN5UKS NetBSD Darwin/MacOS X
|\ / jdbaker[snail]mylinuxisp[flyspeck]com OpenBSD FreeBSD
| X No HTML/proprietary data in email. BSD just sits there and works!
|/ \ GPGkeyID: D703 4A7E 479F 63F8 D3F4 BD99 9572 8F23 E4AD 1645
Home |
Main Index |
Thread Index |
Old Index