Last active
August 18, 2017 14:41
-
-
Save mutcianm/cd7676e529b256870f5d83fbf2dc1e86 to your computer and use it in GitHub Desktop.
rbdoom-arch-compilation-fix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/neo/CMakeLists.txt b/neo/CMakeLists.txt | |
index de4ae52..03acbc3 100644 | |
--- a/neo/CMakeLists.txt | |
+++ b/neo/CMakeLists.txt | |
@@ -71,8 +71,8 @@ endif() | |
if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID STREQUAL "Clang") | |
add_definitions(-pipe) | |
#add_definitions(-Wall) | |
- add_definitions(-Werror=format-security) | |
- add_definitions(-Werror=format) | |
+ #add_definitions(-Werror=format-security) | |
+ #add_definitions(-Werror=format) | |
if(CPU_TYPE) | |
add_definitions(-DCPUSTRING="${CPU_TYPE}") | |
endif() | |
diff --git a/neo/idlib/StrStatic.h b/neo/idlib/StrStatic.h | |
index 4fdb52d..0f1c939 100644 | |
--- a/neo/idlib/StrStatic.h | |
+++ b/neo/idlib/StrStatic.h | |
@@ -97,7 +97,7 @@ public: | |
{ | |
buffer[ 0 ] = '\0'; | |
SetStaticBuffer( buffer, _size_ ); | |
- idStr::operator=( b ); | |
+ idStr::operator=( idStr( b ) ); | |
} | |
ID_INLINE explicit idStrStatic( const char c ) : | |
@@ -105,7 +105,7 @@ public: | |
{ | |
buffer[ 0 ] = '\0'; | |
SetStaticBuffer( buffer, _size_ ); | |
- idStr::operator=( c ); | |
+ idStr::operator=( idStr( c ) ); | |
} | |
ID_INLINE explicit idStrStatic( const int i ) : | |
@@ -113,7 +113,7 @@ public: | |
{ | |
buffer[ 0 ] = '\0'; | |
SetStaticBuffer( buffer, _size_ ); | |
- idStr::operator=( i ); | |
+ idStr::operator=( idStr( i ) ); | |
} | |
ID_INLINE explicit idStrStatic( const unsigned u ) : | |
@@ -121,7 +121,7 @@ public: | |
{ | |
buffer[ 0 ] = '\0'; | |
SetStaticBuffer( buffer, _size_ ); | |
- idStr::operator=( u ); | |
+ idStr::operator=( idStr( u ) ); | |
} | |
ID_INLINE explicit idStrStatic( const float f ) : | |
@@ -129,7 +129,7 @@ public: | |
{ | |
buffer[ 0 ] = '\0'; | |
SetStaticBuffer( buffer, _size_ ); | |
- idStr::operator=( f ); | |
+ idStr::operator=( idStr( f ) ); | |
} | |
private: | |
diff --git a/neo/tools/compilers/dmap/dmap.cpp b/neo/tools/compilers/dmap/dmap.cpp | |
index 655e881..9eef3e3 100644 | |
--- a/neo/tools/compilers/dmap/dmap.cpp | |
+++ b/neo/tools/compilers/dmap/dmap.cpp | |
@@ -390,7 +390,7 @@ void Dmap( const idCmdArgs& args ) | |
// if this isn't a regioned map, delete the last saved region map | |
if( passedName.Right( 4 ) != ".reg" ) | |
{ | |
- sprintf( path, "%s.reg", dmapGlobals.mapFileBase ); | |
+ idStr::snPrintf( path, sizeof( path ), "%s.reg", dmapGlobals.mapFileBase ); | |
fileSystem->RemoveFile( path ); | |
} | |
else | |
@@ -402,7 +402,7 @@ void Dmap( const idCmdArgs& args ) | |
passedName = stripped; | |
// delete any old line leak files | |
- sprintf( path, "%s.lin", dmapGlobals.mapFileBase ); | |
+ idStr::snPrintf( path, sizeof( path ), "%s.lin", dmapGlobals.mapFileBase ); | |
fileSystem->RemoveFile( path ); | |
// delete any old generated binary proc files |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment