diff --git a/src/hardware/r_opengl/r_opengl.c b/src/hardware/r_opengl/r_opengl.c
index c009d3459395bec3f50e5595882968a9daa46393..ec99eb307d747a145f390343b7c938a36215f0b1 100644
--- a/src/hardware/r_opengl/r_opengl.c
+++ b/src/hardware/r_opengl/r_opengl.c
@@ -1404,7 +1404,7 @@ EXPORT void HWRAPI(DrawPolygon) (FSurfaceInfo  *pSurf,
 
 typedef struct vbo_vertex_s
 {
-	float x, y, z;
+	double x, y, z;
 	float u, v;
 	unsigned char r, g, b, a;
 } vbo_vertex_t;
@@ -1448,17 +1448,17 @@ static INT32 lasttex = -1;
 
 static void SkyVertex(vbo_vertex_t *vbo, int r, int c)
 {
-	const float radians = (M_PIl / 180.0f);
-	const float scale = 10000.0f;
+	const double radians = (M_PIl / 180.0f);
+	const double scale = 10000.0f;
 	const float maxSideAngle = 60.0f;
 
 	float topAngle = (c / (float)columns * 360.0f);
 	float sideAngle = (maxSideAngle * (rows - r) / rows);
-	float height = sin(sideAngle * radians);
-	float realRadius = scale * cos(sideAngle * radians);
-	float x = realRadius * cos(topAngle * radians);
-	float y = (!yflip) ? scale * height : -scale * height;
-	float z = realRadius * sin(topAngle * radians);
+	double height = sin(sideAngle * radians);
+	double realRadius = scale * cos(sideAngle * radians);
+	double x = realRadius * cos(topAngle * radians);
+	double y = (!yflip) ? scale * height : -scale * height;
+	double z = realRadius * sin(topAngle * radians);
 	float timesRepeat = (4 * (256.0f / texw));
 	if (fpclassify(timesRepeat) == FP_ZERO)
 		timesRepeat = 1.0f;
diff --git a/src/m_menu.c b/src/m_menu.c
index edba61f30f4db47d750394494e21cb6ba1a18882..2a8a34426f53f99d403ab102691715f9f9b41f28 100644
--- a/src/m_menu.c
+++ b/src/m_menu.c
@@ -5361,7 +5361,7 @@ static void M_DrawNightsAttackBackground(void)
 	M_DrawNightsAttackMountains();
 
 	// back top foreground patch
-	x = -(ntsatkdrawtimer%backtopwidth);
+	x = 0-(ntsatkdrawtimer%backtopwidth);
 	V_DrawScaledPatch(x, y, V_SNAPTOTOP|V_SNAPTOLEFT, backtopfg);
 	for (i = 0; i < 3; i++)
 	{
@@ -5372,7 +5372,7 @@ static void M_DrawNightsAttackBackground(void)
 	}
 
 	// front top foreground patch
-	x = -((ntsatkdrawtimer*2)%fronttopwidth);
+	x = 0-((ntsatkdrawtimer*2)%fronttopwidth);
 	V_DrawScaledPatch(x, y, V_SNAPTOTOP|V_SNAPTOLEFT, fronttopfg);
 	for (i = 0; i < 3; i++)
 	{
@@ -5383,7 +5383,7 @@ static void M_DrawNightsAttackBackground(void)
 	}
 
 	// back bottom foreground patch
-	x = -(ntsatkdrawtimer%backbottomwidth);
+	x = 0-(ntsatkdrawtimer%backbottomwidth);
 	y = BASEVIDHEIGHT - backbottomheight;
 	V_DrawScaledPatch(x, y, V_SNAPTOBOTTOM|V_SNAPTOLEFT, backbottomfg);
 	for (i = 0; i < 3; i++)
@@ -5395,7 +5395,7 @@ static void M_DrawNightsAttackBackground(void)
 	}
 
 	// front bottom foreground patch
-	x = -((ntsatkdrawtimer*2)%frontbottomwidth);
+	x = 0-((ntsatkdrawtimer*2)%frontbottomwidth);
 	y = BASEVIDHEIGHT - frontbottomheight;
 	V_DrawScaledPatch(x, y, V_SNAPTOBOTTOM|V_SNAPTOLEFT, frontbottomfg);
 	for (i = 0; i < 3; i++)
diff --git a/src/p_mobj.c b/src/p_mobj.c
index 0ec3d7cc1a4b8e9b78125451a125889ec07be9c1..42c5234dfee916b820eb397219de658865510808 100644
--- a/src/p_mobj.c
+++ b/src/p_mobj.c
@@ -4652,7 +4652,7 @@ static void P_Boss3Thinker(mobj_t *mobj)
 			{
 				UINT8 i, numtospawn = 24;
 				angle_t ang = 0, interval = FixedAngle((360 << FRACBITS) / numtospawn);
-				mobj_t *shock, *sfirst = NULL, *sprev = NULL;
+				mobj_t *shock = NULL, *sfirst = NULL, *sprev = NULL;
 
 				mobj->movecount = mobj->health+1;
 				mobj->movefactor = -512*FRACUNIT;
diff --git a/src/r_patch.c b/src/r_patch.c
index 639f682fd07b1c839ebd585bc7398072480d17b3..9dcf59024bb0e8e618d601b78535ce8bf2101f2b 100644
--- a/src/r_patch.c
+++ b/src/r_patch.c
@@ -786,8 +786,8 @@ static void R_ParseSpriteInfoFrame(spriteinfo_t *info)
 {
 	char *sprinfoToken;
 	size_t sprinfoTokenLength;
-	char *frameChar;
-	UINT8 frameFrame;
+	char *frameChar = NULL;
+	UINT8 frameFrame = -1;
 #ifdef ROTSPRITE
 	INT16 frameXPivot = 0;
 	INT16 frameYPivot = 0;