diff --git a/engine/client/cl_screen.c b/engine/client/cl_screen.c
index 6e9bf68ec..5275d26f5 100644
--- a/engine/client/cl_screen.c
+++ b/engine/client/cl_screen.c
@@ -292,7 +292,7 @@ void SCR_StringToRGB (char *rgbstring, float *rgb, float rgbinputscale)
 	} // i contains the crosshair color
 }
 
-// SCR_StringToPalIndex: takes in "<index>" or "<r> <g> <b>" and converts to a 
+// SCR_StringToPalIndex: takes in "<index>" or "<r> <g> <b>" and converts to a
 // Quake palette index
 int SCR_StringToPalIndex (char *rgbstring, float rgbinputscale)
 {
@@ -474,7 +474,7 @@ void SCR_DrawCenterString (vrect_t *rect, cprint_t *p)
 	else
 	{
 		if (linecount <= 4)
-		{	
+		{
 			//small messages appear above and away from the crosshair
 			y = (bottom-top - Font_CharHeight()*linecount) * 0.35 + top;
 		}
@@ -484,7 +484,7 @@ void SCR_DrawCenterString (vrect_t *rect, cprint_t *p)
 			y = (bottom-top - Font_CharHeight()*linecount) * 0.5 + top;
 		}
 	}
-	
+
 	if (p->flags & CPRINT_BACKGROUND)
 	{	//hexen2 style plaque.
 		int px, py, pw;
@@ -945,7 +945,7 @@ void SCR_CalcRefdef (void)
 	{
 		full = true;
 		size = 100.0;
-	} 
+	}
 	else
 		size = scr_viewsize.value;
 
@@ -974,7 +974,7 @@ void SCR_CalcRefdef (void)
 	{
   		if (r_refdef.vrect.height > vid.height - sb_lines)
   			r_refdef.vrect.height = vid.height - sb_lines;
-	} 
+	}
 	else if (r_refdef.vrect.height > vid.height)
 			r_refdef.vrect.height = vid.height;
 
@@ -1002,7 +1002,7 @@ void SCR_CalcRefdef (void)
 	else if (r_refdef.fov_x > 170)
 		r_refdef.fov_x = 170;
 
-	
+
 	r_refdef.fov_y = CalcFov (r_refdef.fov_x, r_refdef.vrect.width, r_refdef.vrect.height);
 
 
@@ -1356,7 +1356,7 @@ void SCR_DrawGameClock(void)
 		return;
 
 	flags = (show_gameclock.value-1);
-	if (flags & 1) 
+	if (flags & 1)
 		timelimit = 60 * atof(Info_ValueForKey(cl.serverinfo, "timelimit"));
 	else
 		timelimit = 0;
@@ -1478,7 +1478,7 @@ void SCR_DrawLoading (void)
 				Draw_FillRGB(x+sizex, y, 192-sizex, 16, 1.0, 0.0, 0.0);
 			}
 
-			Draw_FunString(x+8, y+4, va("Loading %s... %i%%", 
+			Draw_FunString(x+8, y+4, va("Loading %s... %i%%",
 				(loading_stage == LS_SERVER) ? "server" : "client",
 				current_loading_size * 100 / total_loading_size));
 
@@ -1533,19 +1533,19 @@ void SCR_DrawLoading (void)
 		unsigned int fcount;
 		unsigned int tsize;
 		qboolean sizeextra;
-		
+
 		x = vid.width/2 - 160;
 
 		CL_GetDownloadSizes(&fcount, &tsize, &sizeextra);
 		//downloading files?
 		if (cls.downloadmethod)
-			Draw_FunString(x+8, y+4, va("Downloading %s... %i%%", 
+			Draw_FunString(x+8, y+4, va("Downloading %s... %i%%",
 				cls.downloadlocalname,
 				cls.downloadpercent));
 
 		if (tsize > 1024*1024*16)
 		{
-			Draw_FunString(x+8, y+8+4, va("%5ukbps %8umb%s remaining (%i files)", 
+			Draw_FunString(x+8, y+8+4, va("%5ukbps %8umb%s remaining (%i files)",
 				(unsigned int)(CL_DownloadRate()/1000.0f),
 				tsize/(1024*1024),
 				sizeextra?"+":"",
@@ -1553,7 +1553,7 @@ void SCR_DrawLoading (void)
 		}
 		else
 		{
-			Draw_FunString(x+8, y+8+4, va("%5ukbps %8ukb%s remaining (%i files)", 
+			Draw_FunString(x+8, y+8+4, va("%5ukbps %8ukb%s remaining (%i files)",
 				(unsigned int)(CL_DownloadRate()/1000.0f),
 				tsize/1024,
 				sizeextra?"+":"",
@@ -1572,7 +1572,7 @@ void SCR_DrawLoading (void)
 		dots[1] = '.';
 		dots[2] = '.';
 		dots[(int)realtime & 3] = 0;
-		Draw_FunString(x, y+4, va("Connecting to: %s%s", s, dots)); 
+		Draw_FunString(x, y+4, va("Connecting to: %s%s", s, dots));
 	}
 }
 
@@ -1742,8 +1742,8 @@ typedef struct _TargaHeader {
 } TargaHeader;
 
 
-#ifdef AVAIL_JPEGLIB
-void screenshotJPEG(char *filename, int compression, qbyte *screendata, int screenwidth, int screenheight);
+#if defined(AVAIL_JPEGLIB) && !defined(NO_JPEG)
+	void screenshotJPEG(char *filename, int compression, qbyte *screendata, int screenwidth, int screenheight);
 #endif
 #ifdef AVAIL_PNGLIB
 int Image_WritePNG (char *filename, int compression, qbyte *pixels, int width, int height);
@@ -2261,7 +2261,7 @@ void SCR_DrawTwoDimensional(int uimenu, qboolean nohud)
 #ifdef MENU_DAT
 	MP_Draw();
 #endif
-	
+
 	if (key_dest == key_console)
 		SCR_DrawConsole (false);
 
diff --git a/engine/client/pr_csqc.c b/engine/client/pr_csqc.c
index a26b3cf4d..99069a4b5 100644
--- a/engine/client/pr_csqc.c
+++ b/engine/client/pr_csqc.c
@@ -111,7 +111,9 @@ typedef enum
 	VF_CL_VIEWANGLES_Y = 35,
 	VF_CL_VIEWANGLES_Z = 36,
 
+#ifndef MINGW
 #pragma message("FIXME: add cshift")
+#endif
 
 	//33-36 used by DP...
 	VF_PERSPECTIVE = 200,
@@ -1216,7 +1218,9 @@ static void PF_R_GetViewFlag(progfuncs_t *prinst, struct globalvars_s *pr_global
 		*r = r_refdef.fov_y;
 		break;
 
+#ifndef MINGW
 #pragma message("fixme: AFOV not retrievable")
+#endif
 	case VF_AFOV:
 		*r = r_refdef.fov_x;
 		break;
diff --git a/engine/gl/gl_shader.c b/engine/gl/gl_shader.c
index a824e4514..1b045c011 100644
--- a/engine/gl/gl_shader.c
+++ b/engine/gl/gl_shader.c
@@ -8,7 +8,7 @@ of the License, or (at your option) any later version.
 
 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
 See the GNU General Public License for more details.
 
@@ -90,13 +90,13 @@ char *COM_ParseExt (char **data_p, qboolean nl)
 	data = *data_p;
 	len = 0;
 	com_token[0] = 0;
-	
+
 	if (!data)
 	{
 		*data_p = NULL;
 		return "";
 	}
-		
+
 // skip whitespace
 skipwhite:
 	while ((c = *data) <= ' ')
@@ -235,7 +235,9 @@ static qboolean Shader_EvaluateCondition(char **ptr)
 		else if (!Q_stricmp(token, "normalmap") )
 			conditiontrue = conditiontrue == !!gl_bump.value;
 
+#ifndef MINGW
 #pragma message("shader fixme")
+#endif
 		else if (!Q_stricmp(token, "diffuse") )
 			conditiontrue = conditiontrue == true;
 		else if (!Q_stricmp(token, "specular") )
@@ -299,7 +301,7 @@ static char *Shader_ParseString ( char **ptr )
 
 	token = COM_ParseExt ( ptr, false );
 	Q_strlwr ( token );
-	
+
 	return token;
 }
 
@@ -315,7 +317,7 @@ static char *Shader_ParseSensString ( char **ptr )
 	}
 
 	token = COM_ParseExt ( ptr, false );
-	
+
 	return token;
 }
 
@@ -645,7 +647,7 @@ static void Shader_FogParms ( shader_t *shader, shaderpass_t *pass, char **ptr )
 	shader->fog_color[0] = FloatToByte ( fcolor[0] );
 	shader->fog_color[1] = FloatToByte ( fcolor[1] );
 	shader->fog_color[2] = FloatToByte ( fcolor[2] );
-	shader->fog_color[3] = 255;	
+	shader->fog_color[3] = 255;
 	shader->fog_dist = Shader_ParseFloat ( ptr );
 
 	if ( shader->fog_dist <= 0.0f ) {
@@ -1697,7 +1699,7 @@ static void Shader_MakeCache ( char *path )
 }
 
 char *Shader_Skip ( char *ptr )
-{	
+{
 	char *tok;
     int brace_count;
 
@@ -1706,7 +1708,7 @@ char *Shader_Skip ( char *ptr )
 
 	if (!ptr)
 		return NULL;
-    
+
 	if ( tok[0] != '{' )
 	{
 		tok = COM_ParseExt ( &ptr, true );
@@ -1907,7 +1909,7 @@ void Shader_Readpass (shader_t *shader, char **ptr)
 		ignore = false;
 		pass = &shader->passes[shader->numpasses++];
 	}
-	
+
     // Set defaults
     pass->flags = 0;
     pass->anim_frames[0] = r_nulltex;
@@ -1956,7 +1958,7 @@ void Shader_Readpass (shader_t *shader, char **ptr)
 		}
 	}
 
-	// check some things 
+	// check some things
 	if ( ignore )
 	{
 		Shader_Free ( shader );
@@ -2046,7 +2048,7 @@ void Shader_SetPassFlush (shaderpass_t *pass, shaderpass_t *pass2)
 
 	if (pass2->rgbgen != RGB_GEN_IDENTITY || pass2->alphagen != ALPHA_GEN_IDENTITY)
 		return;
-	if (pass->rgbgen != RGB_GEN_IDENTITY || pass->alphagen != ALPHA_GEN_IDENTITY) 
+	if (pass->rgbgen != RGB_GEN_IDENTITY || pass->alphagen != ALPHA_GEN_IDENTITY)
 		return;
 
 	/*if its alphatest, don't merge with anything other than lightmap*/
@@ -2069,7 +2071,7 @@ void Shader_SetPassFlush (shaderpass_t *pass, shaderpass_t *pass2)
 				pass->numMergedPasses++;
 			}
 		}
-		else if (pass->blendmode == GL_ADD && 
+		else if (pass->blendmode == GL_ADD &&
 			pass2->blendmode == GL_ADD && config_env_add)
 		{
 			pass->numMergedPasses++;
@@ -2088,7 +2090,7 @@ void Shader_SetFeatures ( shader_t *s )
 	shaderpass_t *pass;
 
 	s->features = MF_NONE;
-	
+
 	for (i = 0, trnormals = true; i < s->numdeforms; i++)
 	{
 		switch (s->deforms[i].type)
@@ -2269,7 +2271,7 @@ void Shader_Finish (shader_t *s)
 				if (pass->flags & SHADER_PASS_LIGHTMAP)
 					break;
 			}
-			
+
 			if ( i == s->numpasses -1 )
 			{
 				s->numpasses--;
@@ -2282,7 +2284,7 @@ void Shader_Finish (shader_t *s)
 				}
 				s->numpasses--;
 			}
-			
+
 			if ( s->passes[0].numtcmods )
 			{
 				pass = s->passes;
@@ -2291,10 +2293,10 @@ void Shader_Finish (shader_t *s)
 					if ( !pass->numtcmods )
 						break;
 				}
-				
+
 				memcpy ( &s->passes[0], pass, sizeof(shaderpass_t) );
 			}
-			
+
 			s->passes[0].rgbgen = RGB_GEN_VERTEX;
 			s->passes[0].alphagen = ALPHA_GEN_IDENTITY;
 			s->passes[0].blendmode = 0;
@@ -2332,8 +2334,8 @@ done:;
 			}
 
 			if (pass->rgbgen == RGB_GEN_UNKNOWN)
-			{ 
-				if (!s->fog_dist && !(pass->flags & SHADER_PASS_LIGHTMAP)) 
+			{
+				if (!s->fog_dist && !(pass->flags & SHADER_PASS_LIGHTMAP))
 					pass->rgbgen = RGB_GEN_IDENTITY_LIGHTING;
 				else
 					pass->rgbgen = RGB_GEN_IDENTITY;
@@ -2359,7 +2361,7 @@ done:;
 		for (j = 0; j < s->numpasses; j++, sp++)
 		{
 			if (sp->rgbgen == RGB_GEN_UNKNOWN)
-			{ 
+			{
 				sp->rgbgen = RGB_GEN_IDENTITY;
 			}
 
@@ -2445,7 +2447,7 @@ void Shader_UpdateRegistration (void)
 		{
 			if (pass->flags & SHADER_PASS_ANIMMAP)
 			{
-				for (l = 0; l < pass->anim_numframes; l++) 
+				for (l = 0; l < pass->anim_numframes; l++)
 				{
 					if (pass->anim_frames[l])
 						pass->anim_frames[l]->registration_sequence = registration_sequence;
@@ -2460,7 +2462,7 @@ void Shader_UpdateRegistration (void)
 			{
 				if ( pass->anim_frames[0] )
 					pass->anim_frames[0]->registration_sequence = registration_sequence;
-			} 
+			}
 		}
 	}
 }
@@ -3062,7 +3064,7 @@ void Shader_DefaultBSPFlare(char *shortname, shader_t *s, const void *args)
 }
 void Shader_DefaultSkin(char *shortname, shader_t *s, const void *args)
 {
-	Shader_DefaultScript(shortname, s, 
+	Shader_DefaultScript(shortname, s,
 		"{\n"
 			"{\n"
 				"map $diffuse\n"
@@ -3117,7 +3119,7 @@ void Shader_DefaultSkinShell(char *shortname, shader_t *s, const void *args)
 }
 void Shader_Default2D(char *shortname, shader_t *s, const void *genargs)
 {
-	Shader_DefaultScript(shortname, s, 
+	Shader_DefaultScript(shortname, s,
 		"{\n"
 			"nomipmaps\n"
 			"{\n"
@@ -3435,7 +3437,7 @@ cin_t *R_ShaderFindCinematic(char *name)
 #endif
 }
 
-shader_t *R_RegisterPic (char *name) 
+shader_t *R_RegisterPic (char *name)
 {
 	return &r_shaders[R_LoadShader (name, Shader_Default2D, NULL)];
 }