From c5b717254c78f48d4a3a6e2d9a86b835cdb9f330 Mon Sep 17 00:00:00 2001 From: Pan7 Date: Wed, 17 Aug 2016 08:45:14 +0200 Subject: [PATCH 1/2] Fix compiling warning for wad --- plugins/vfswad/vfs.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/vfswad/vfs.cpp b/plugins/vfswad/vfs.cpp index e9a17be3..a378b9f2 100644 --- a/plugins/vfswad/vfs.cpp +++ b/plugins/vfswad/vfs.cpp @@ -119,9 +119,7 @@ int vfsBuildShortPathName( const char* pPath, char* pBuffer, int nBufferLen ){ strcpy( pBuffer, pPath ); // Use long filename } return nResult; -#endif - -#if defined ( __linux__ ) || defined ( __APPLE__ ) +#elif defined ( __linux__ ) || defined ( __APPLE__ ) // remove /../ from directories const char *scr = pPath; char *dst = pBuffer; @@ -142,6 +140,8 @@ int vfsBuildShortPathName( const char* pPath, char* pBuffer, int nBufferLen ){ *dst = 0; return strlen( pBuffer ); +#else +#error "unsupported platform" #endif } From a342e2d1d19573cb912e8fe2ce6d470fecf877b0 Mon Sep 17 00:00:00 2001 From: Pan7 Date: Sat, 20 Aug 2016 06:59:43 +0200 Subject: [PATCH 2/2] Fix for uninitialized var warning --- libs/picomodel/pm_mdc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/picomodel/pm_mdc.c b/libs/picomodel/pm_mdc.c index 2e4849fb..396cadc9 100644 --- a/libs/picomodel/pm_mdc.c +++ b/libs/picomodel/pm_mdc.c @@ -52,7 +52,7 @@ #define MDC_DIST_SCALE 0.05f /* mdc decoding normal table */ -double mdcNormals[ 256 ][ 3 ] = +const double mdcNormals[ 256 ][ 3 ] = { { 1.000000, 0.000000, 0.000000 }, { 0.980785, 0.195090, 0.000000 },