diff --git a/src/cmdlib.cpp b/src/cmdlib.cpp index 557c80cf8..b3c406ee0 100644 --- a/src/cmdlib.cpp +++ b/src/cmdlib.cpp @@ -957,7 +957,7 @@ void ScanDirectory(TArray &list, const char *dirpath) } } -#elif defined(__sun) || defined(linux) +#elif defined(__sun) || defined(__linux__) //========================================================================== // diff --git a/src/gl/data/gl_portaldata.cpp b/src/gl/data/gl_portaldata.cpp index 11989b4a7..676f6a630 100644 --- a/src/gl/data/gl_portaldata.cpp +++ b/src/gl/data/gl_portaldata.cpp @@ -223,7 +223,7 @@ struct FCoverageBuilder { FCoverageVertex *v1 = &shape[i]; FCoverageVertex *v2 = &shape[(i+1) % shape.Size()]; - FCoverageLine vl = { *v1, *v2 }; + FCoverageLine vl = {{*v1, *v2}}; double dist_v1 = PartitionDistance(v1, bsp); double dist_v2 = PartitionDistance(v2, bsp); diff --git a/src/gl/data/gl_setup.cpp b/src/gl/data/gl_setup.cpp index d822ac440..342f58fa1 100644 --- a/src/gl/data/gl_setup.cpp +++ b/src/gl/data/gl_setup.cpp @@ -130,7 +130,7 @@ static int MergeMapSections(int num) cvertex_t vt; // first step: Set mapsection for all vertex positions. - for(DWORD i=0;iSubsector->mapsection; @@ -142,7 +142,7 @@ static int MergeMapSections(int num) } // second step: Check if any seg references more than one mapsection, either by subsector or by vertex - for(DWORD i=0;iSubsector->mapsection; @@ -733,4 +733,4 @@ CCMD(listmapsections) } } } -} \ No newline at end of file +} diff --git a/src/gl/scene/gl_portal.cpp b/src/gl/scene/gl_portal.cpp index 95ab7b567..3d9c8627d 100644 --- a/src/gl/scene/gl_portal.cpp +++ b/src/gl/scene/gl_portal.cpp @@ -781,7 +781,7 @@ void GLPlaneMirrorPortal::DrawContents() gl.Enable(GL_CLIP_PLANE0+renderdepth); // This only works properly for non-sloped planes so don't bother with the math. //double d[4]={origin->a/65536., origin->c/65536., origin->b/65536., FIXED2FLOAT(origin->d)}; - double d[4]={0, PlaneMirrorMode, 0, FIXED2FLOAT(origin->d)}; + double d[4]={0, static_cast(PlaneMirrorMode), 0, FIXED2FLOAT(origin->d)}; gl.ClipPlane(GL_CLIP_PLANE0+renderdepth, d); GLRenderer->DrawScene(); diff --git a/src/gl/system/gl_interface.cpp b/src/gl/system/gl_interface.cpp index 6789c2c20..964f623d7 100644 --- a/src/gl/system/gl_interface.cpp +++ b/src/gl/system/gl_interface.cpp @@ -44,7 +44,7 @@ #include "i_system.h" #include "gl/system/gl_cvars.h" -#if defined (unix) || defined (__APPLE__) +#if defined (__unix__) || defined (__APPLE__) #include #define wglGetProcAddress(x) (*SDL_GL_GetProcAddress)(x) #endif @@ -210,7 +210,7 @@ void gl_LoadExtensions() // Don't even start if it's lower than 1.4 if (strcmp(version, "1.4") < 0) { - I_FatalError("Unsupported OpenGL version.\nAt least GL 1.4 is required to run "GAMENAME".\n"); + I_FatalError("Unsupported OpenGL version.\nAt least GL 1.4 is required to run " GAMENAME ".\n"); } // This loads any function pointers and flags that require a vaild render context to diff --git a/src/gl/textures/gl_material.cpp b/src/gl/textures/gl_material.cpp index 53d01a3b9..f2d31ee0c 100644 --- a/src/gl/textures/gl_material.cpp +++ b/src/gl/textures/gl_material.cpp @@ -430,7 +430,7 @@ const FHardwareTexture *FGLTexture::Bind(int texunit, int cm, int clampmode, int if (!hwtex->Bind(texunit, cm, translation)) { - int w, h; + int w=0, h=0; // Create this texture unsigned char * buffer = NULL; diff --git a/src/sdl/sdlglvideo.cpp b/src/sdl/sdlglvideo.cpp index 868cf0afc..649989e6d 100644 --- a/src/sdl/sdlglvideo.cpp +++ b/src/sdl/sdlglvideo.cpp @@ -56,7 +56,7 @@ EXTERN_CVAR (Int, vid_renderer) CUSTOM_CVAR(Int, gl_vid_multisample, 0, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_NOINITCALL ) { - Printf("This won't take effect until "GAMENAME" is restarted.\n"); + Printf("This won't take effect until " GAMENAME " is restarted.\n"); } // PRIVATE DATA DEFINITIONS ------------------------------------------------