diff --git a/src/d_main.c b/src/d_main.c
index 96167ac0bb265f98a3e1c55b00f8c8b8b0d2db94..21b10de0a1a059e95c828c38ccb8bf40c787f341 100644
--- a/src/d_main.c
+++ b/src/d_main.c
@@ -629,6 +629,7 @@ static void D_Display(void)
 			V_DrawThinString(80, 40, V_MONOSPACE | V_BLUEMAP, s);
 			if (rendermode == render_opengl) // OpenGL specific stats
 			{
+#ifdef HWRENDER
 				snprintf(s, sizeof s - 1, "nsrt %d", rs_hw_nodesorttime / divisor);
 				V_DrawThinString(30, 40, V_MONOSPACE | V_YELLOWMAP, s);
 				snprintf(s, sizeof s - 1, "ndrw %d", rs_hw_nodedrawtime / divisor);
@@ -661,6 +662,7 @@ static void D_Display(void)
 					snprintf(s, sizeof s - 1, "ncol %d", rs_hw_numcolors);
 					V_DrawThinString(185, 30, V_MONOSPACE | V_PURPLEMAP, s);
 				}
+#endif
 			}
 			else // software specific stats
 			{
diff --git a/src/sdl/i_video.c b/src/sdl/i_video.c
index 01194a02fa00e1ecb4bb2af51e078fa1d6e0980b..5c5b6119c60824541156a28188d6cdb96d82ff16 100644
--- a/src/sdl/i_video.c
+++ b/src/sdl/i_video.c
@@ -1478,6 +1478,7 @@ static SDL_bool Impl_CreateContext(void)
 
 void VID_CheckGLLoaded(rendermode_t oldrender)
 {
+	(void)oldrender;
 #ifdef HWRENDER
 	if (vid_opengl_state == -1) // Well, it didn't work the first time anyway.
 	{