]> git.rm.cloudns.org Git - xonotic/netradiant.git/commitdiff
Remove -Wno-int-conversion
authorTimePath <andrew.hardaker1995@gmail.com>
Mon, 7 Aug 2017 08:29:13 +0000 (18:29 +1000)
committerTimePath <andrew.hardaker1995@gmail.com>
Mon, 7 Aug 2017 08:29:13 +0000 (18:29 +1000)
CMakeLists.txt
tools/quake3/q3data/md3lib.c
tools/quake3/q3data/p3dlib.c

index 65b7e26acf38703d517016b82fa380bc0fd7daf1..64f0f9da31ad0e5d210f6f6820773fcf60293f0c 100644 (file)
@@ -95,7 +95,6 @@ addflags("-Wno-unused-variable")
 addflags("-Wno-unused-parameter")
 addflags("-Wno-missing-field-initializers")
 
-addflags_c("-Wno-int-conversion")
 addflags_c("-Wno-pointer-to-int-cast")
 addflags_c("-Wno-incompatible-pointer-types")
 
index f78390efe33beef821c08c59865394a5b8ead5db..b4c7d93f4e454a56abb5e55fd6d05f6a55fa6bb1 100644 (file)
@@ -26,7 +26,9 @@
 #include "md3lib.h"
 
 #if defined ( __linux__ ) || defined ( __APPLE__ )
-#define filelength Q_filelength
+#define filelength(f) Q_filelength(f)
+#else
+#define filelength(f) filelength(fileno(f))
 #endif
 
 /*
@@ -149,8 +151,8 @@ void MD3_Dump( const char *filename ){
                Error( "Unable to open '%s'\n", filename );
        }
 
-       fileSize = filelength( fileno( fp ) );
-       _buffer = malloc( filelength( fileno( fp ) ) );
+       fileSize = filelength( fp );
+       _buffer = malloc( fileSize );
        fread( _buffer, fileSize, 1, fp );
        fclose( fp );
 
index 0b228e2fad9a439039719a03eea366d726598465..9de836146daac869e3927fc4e1eeb574b157ae1a 100644 (file)
 #if defined ( __linux__ ) || defined ( __APPLE__ )
        #include "cmdlib.h"
        #define _strcmpi Q_stricmp
-       #define filelength Q_filelength
        #define strlwr strlower
+       #define filelength(f) Q_filelength(f)
+#else
+       #define filelength(f) filelength(fileno(f))
 #endif
 typedef struct
 {
@@ -68,7 +70,7 @@ int P3DLoad( const char *filename ){
 
        memset( &p3d, 0, sizeof( p3d ) );
 
-       p3d.len = filelength( fileno( fp ) );
+       p3d.len = filelength( fp );
 
        p3d.curpos = p3d.buffer = malloc( p3d.len );