Index: trunk/src/VBox/Devices/EFI/DevSmc.cpp
===================================================================
--- trunk/src/VBox/Devices/EFI/DevSmc.cpp	(revision 63458)
+++ trunk/src/VBox/Devices/EFI/DevSmc.cpp	(revision 63459)
@@ -1388,5 +1388,7 @@
     /* Fend off unsupported versions. */
     if (   uVersion != SMC_SAVED_STATE_VERSION
+#if SMC_SAVED_STATE_VERSION != SMC_SAVED_STATE_VERSION_BAKA
         && uVersion != SMC_SAVED_STATE_VERSION_BAKA
+#endif
         && uVersion != SMC_SAVED_STATE_VERSION_BAKA + 1)
         return VERR_SSM_UNSUPPORTED_DATA_UNIT_VERSION;
Index: trunk/src/VBox/Devices/Network/slirp/ip_icmp.c
===================================================================
--- trunk/src/VBox/Devices/Network/slirp/ip_icmp.c	(revision 63458)
+++ trunk/src/VBox/Devices/Network/slirp/ip_icmp.c	(revision 63459)
@@ -64,5 +64,7 @@
 /* The message sent when emulating PING */
 /* Be nice and tell them it's just a psuedo-ping packet */
+#if 0
 static const char icmp_ping_msg[] = "This is a psuedo-PING packet used by Slirp to emulate ICMP ECHO-REQUEST packets.\n";
+#endif
 
 /* list of actions for icmp_error() on RX of an icmp message */
Index: trunk/src/VBox/Devices/USB/linux/USBProxyDevice-linux.cpp
===================================================================
--- trunk/src/VBox/Devices/USB/linux/USBProxyDevice-linux.cpp	(revision 63458)
+++ trunk/src/VBox/Devices/USB/linux/USBProxyDevice-linux.cpp	(revision 63459)
@@ -1504,7 +1504,14 @@
             for (i = 0; i < pUrb->cIsocPkts; i++)
             {
+#if RT_GNUC_PREREQ(4, 6)
+# pragma GCC diagnostic push
+# pragma GCC diagnostic ignored "-Warray-bounds"
+#endif
                 pUrbLnx->KUrb.iso_frame_desc[i].length = pUrb->aIsocPkts[i].cb;
                 pUrbLnx->KUrb.iso_frame_desc[i].actual_length = 0;
                 pUrbLnx->KUrb.iso_frame_desc[i].status = 0x7fff;
+#if RT_GNUC_PREREQ(4, 6)
+# pragma GCC diagnostic pop
+#endif
             }
             break;
@@ -1823,8 +1830,15 @@
                 for (i = 0, off = 0; i < pUrb->cIsocPkts; i++)
                 {
+#if RT_GNUC_PREREQ(4, 6)
+# pragma GCC diagnostic push
+# pragma GCC diagnostic ignored "-Warray-bounds"
+#endif
                     pUrb->aIsocPkts[i].enmStatus = vusbProxyLinuxStatusToVUsbStatus(pUrbLnx->KUrb.iso_frame_desc[i].status);
                     Assert(pUrb->aIsocPkts[i].off == off);
                     pUrb->aIsocPkts[i].cb = pUrbLnx->KUrb.iso_frame_desc[i].actual_length;
                     off += pUrbLnx->KUrb.iso_frame_desc[i].length;
+#if RT_GNUC_PREREQ(4, 6)
+# pragma GCC diagnostic pop
+#endif
                 }
             }
Index: trunk/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_cc.c
===================================================================
--- trunk/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_cc.c	(revision 63458)
+++ trunk/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_cc.c	(revision 63459)
@@ -2167,4 +2167,5 @@
 		yybegin(YYS_CLAUSE);
 
+	rv = NULL;
 	if ((err = setjmp(yypcb->pcb_jmpbuf)) != 0)
 		goto out;
Index: trunk/src/VBox/GuestHost/OpenGL/state_tracker/state_program.c
===================================================================
--- trunk/src/VBox/GuestHost/OpenGL/state_tracker/state_program.c	(revision 63458)
+++ trunk/src/VBox/GuestHost/OpenGL/state_tracker/state_program.c	(revision 63459)
@@ -1285,5 +1285,9 @@
         }
     }
-    else if (target == GL_VERTEX_PROGRAM_ARB || target == GL_VERTEX_PROGRAM_NV) {
+    else if (   target == GL_VERTEX_PROGRAM_ARB
+#if GL_VERTEX_PROGRAM_ARB != GL_VERTEX_PROGRAM_NV
+             || target == GL_VERTEX_PROGRAM_NV
+#endif
+            ) {
         prog = p->currentVertexProgram;
         if (index >= g->limits.maxVertexProgramLocalParams) {
@@ -1639,5 +1643,9 @@
         params[3] = p->fragmentParameters[index][3];
     }
-    else if (target == GL_VERTEX_PROGRAM_ARB || target == GL_VERTEX_PROGRAM_NV) {
+    else if (   target == GL_VERTEX_PROGRAM_ARB
+#if GL_VERTEX_PROGRAM_ARB != GL_VERTEX_PROGRAM_NV
+             || target == GL_VERTEX_PROGRAM_NV
+#endif
+             ) {
         if (index >= g->limits.maxVertexProgramEnvParams) {
             crStateError(__LINE__, __FILE__, GL_INVALID_VALUE,
@@ -1694,5 +1702,9 @@
         DIRTY(pb->fragmentEnvParameters, g->neg_bitid);
     }
-    else if (target == GL_VERTEX_PROGRAM_ARB || target == GL_VERTEX_PROGRAM_NV) {
+    else if (   target == GL_VERTEX_PROGRAM_ARB
+#if GL_VERTEX_PROGRAM_ARB != GL_VERTEX_PROGRAM_NV
+             || target == GL_VERTEX_PROGRAM_NV
+#endif
+             ) {
         if (index >= g->limits.maxVertexProgramEnvParams) {
             crStateError(__LINE__, __FILE__, GL_INVALID_VALUE,
Index: trunk/src/VBox/Main/include/DisplayImpl.h
===================================================================
--- trunk/src/VBox/Main/include/DisplayImpl.h	(revision 63458)
+++ trunk/src/VBox/Main/include/DisplayImpl.h	(revision 63459)
@@ -528,7 +528,9 @@
 
 /* helper function, code in DisplayResampleImage.cpp */
+#if 0
 void gdImageCopyResampled(uint8_t *dst, uint8_t *src,
                             int dstX, int dstY, int srcX, int srcY,
                             int dstW, int dstH, int srcW, int srcH);
+#endif
 
 void BitmapScale32(uint8_t *dst, int dstW, int dstH,
Index: trunk/src/VBox/Main/src-all/DisplayResampleImage.cpp
===================================================================
--- trunk/src/VBox/Main/src-all/DisplayResampleImage.cpp	(revision 63458)
+++ trunk/src/VBox/Main/src-all/DisplayResampleImage.cpp	(revision 63459)
@@ -82,4 +82,5 @@
         (b))
 
+#if 0 /* unused */
 void gdImageCopyResampled (uint8_t *dst,
                       uint8_t *src,
@@ -195,4 +196,5 @@
     }
 }
+#endif
 
 /* Fast integer implementation for 32 bpp bitmap scaling.
