From fd701dc5d90a829a05afd2224b215bd40262c699 Mon Sep 17 00:00:00 2001 From: janwas Date: Tue, 22 Jun 2004 13:22:46 +0000 Subject: [PATCH] more L4 warnings stomped This was SVN commit r585. --- source/graphics/TextureManager.cpp | 2 +- source/lib/cpu.h | 2 +- source/lib/gfx.h | 2 +- source/lib/lib.h | 4 ++-- source/lib/sysdep/win/wdbg.cpp | 2 +- source/lib/sysdep/win/wdll.cpp | 4 ++-- source/lib/sysdep/win/wdll.h | 2 +- source/maths/scripting/JSInterface_Vector3D.cpp | 2 +- source/maths/scripting/JSInterface_Vector3D.h | 2 +- source/simulation/scripting/JSInterface_BaseEntity.h | 2 +- source/simulation/scripting/JSInterface_Entity.h | 2 +- source/terrain/terrainMain.cpp | 1 - 12 files changed, 13 insertions(+), 14 deletions(-) diff --git a/source/graphics/TextureManager.cpp b/source/graphics/TextureManager.cpp index d30024e6c1..1e4f242cda 100755 --- a/source/graphics/TextureManager.cpp +++ b/source/graphics/TextureManager.cpp @@ -9,7 +9,7 @@ #include "CLogger.h" -const char* SupportedTextureFormats[] = { ".png", ".dds", ".tga", ".bmp" }; +static const char* SupportedTextureFormats[] = { ".png", ".dds", ".tga", ".bmp" }; diff --git a/source/lib/cpu.h b/source/lib/cpu.h index 55ce516154..fc274746ea 100755 --- a/source/lib/cpu.h +++ b/source/lib/cpu.h @@ -15,4 +15,4 @@ extern int cpu_smp; #ifdef __cplusplus } -#endif \ No newline at end of file +#endif diff --git a/source/lib/gfx.h b/source/lib/gfx.h index be276083ba..eb27c46837 100755 --- a/source/lib/gfx.h +++ b/source/lib/gfx.h @@ -14,4 +14,4 @@ extern char gfx_drv_ver[64]; // default: "" // attempt to detect graphics card without OpenGL (in case ogl init fails, // or we want more detailed info). gfx_card[] is unchanged on failure. -extern void get_gfx_info(); \ No newline at end of file +extern void get_gfx_info(); diff --git a/source/lib/lib.h b/source/lib/lib.h index 67b4f8213f..672bb66b89 100755 --- a/source/lib/lib.h +++ b/source/lib/lib.h @@ -141,10 +141,10 @@ enum LibError // more descriptive error message, but may cause a struct redefinition // warning if used from the same line in different files. -#define cassert(expr) struct UID__ { int CASSERT_FAILURE: (expr); }; +#define cassert(expr) struct UID__ { int CASSERT_FAILURE: (expr); } // less helpful error message, but redefinition doesn't trigger warnings. -#define cassert2(expr) extern char CASSERT_FAILURE[1][(expr)]; +#define cassert2(expr) extern char CASSERT_FAILURE[1][(expr)] // note: alternative method in C++: specialize a struct only for true; // using it will raise 'incomplete type' errors if instantiated with false. diff --git a/source/lib/sysdep/win/wdbg.cpp b/source/lib/sysdep/win/wdbg.cpp index 41faa6cc5c..e274ef68d9 100755 --- a/source/lib/sysdep/win/wdbg.cpp +++ b/source/lib/sysdep/win/wdbg.cpp @@ -73,7 +73,7 @@ BasicType; // can't skip the dbghelp.h function prototypes, so we need to // name the function pointers differently (prepend _). Grr. // -#define FUNC(ret, name, params) ret (WINAPI *_##name) params; +#define FUNC(ret, name, params) static ret (WINAPI *_##name) params; #include "dbghelp_funcs.h" #undef FUNC diff --git a/source/lib/sysdep/win/wdll.cpp b/source/lib/sysdep/win/wdll.cpp index 53ab985af8..633c1fad81 100755 --- a/source/lib/sysdep/win/wdll.cpp +++ b/source/lib/sysdep/win/wdll.cpp @@ -34,7 +34,7 @@ typedef struct ImgDelayDescr { typedef const ImgDelayDescr * PCImgDelayDescr; enum DLAttr { // Delay Load Attributes - dlattrRva = 0x1, // RVAs are used instead of pointers + dlattrRva = 0x1 // RVAs are used instead of pointers // Having this set indicates a VC7.0 // and above delay load descriptor. }; @@ -54,7 +54,7 @@ enum { // returning a valid HMODULE dliFailGetProc, // failed to get proc address, fix it by // returning a valid FARPROC - dliNoteEndProcessing, // called after all processing is done, no + dliNoteEndProcessing // called after all processing is done, no // no bypass possible at this point except // by longjmp()/throw()/RaiseException. }; diff --git a/source/lib/sysdep/win/wdll.h b/source/lib/sysdep/win/wdll.h index 98636c164c..c77823e3e1 100755 --- a/source/lib/sysdep/win/wdll.h +++ b/source/lib/sysdep/win/wdll.h @@ -17,4 +17,4 @@ struct DllLoadNotify }; #define WDLL_LOAD_NOTIFY(dll_name, func)\ - static DllLoadNotify func##_NOTIFY(dll_name, func); + static DllLoadNotify func##_NOTIFY(dll_name, func) diff --git a/source/maths/scripting/JSInterface_Vector3D.cpp b/source/maths/scripting/JSInterface_Vector3D.cpp index d103940489..ad15c46899 100755 --- a/source/maths/scripting/JSInterface_Vector3D.cpp +++ b/source/maths/scripting/JSInterface_Vector3D.cpp @@ -99,7 +99,7 @@ JSBool JSI_Vector3D::setProperty( JSContext* cx, JSObject* obj, jsval id, jsval* if( vectorInfo->owner && vectorInfo->updateFn ) ( (vectorInfo->owner)->*(vectorInfo->updateFn) )(); return( JS_TRUE ); - return( JS_FALSE ); + return( JS_FALSE ); // janwas: which one is it? :) } JSBool JSI_Vector3D::construct( JSContext* cx, JSObject* obj, uintN argc, jsval* argv, jsval* rval ) diff --git a/source/maths/scripting/JSInterface_Vector3D.h b/source/maths/scripting/JSInterface_Vector3D.h index 556dbc4606..9693b880c3 100755 --- a/source/maths/scripting/JSInterface_Vector3D.h +++ b/source/maths/scripting/JSInterface_Vector3D.h @@ -44,7 +44,7 @@ namespace JSI_Vector3D void finalize( JSContext* cx, JSObject* obj ); JSBool construct( JSContext* cx, JSObject* obj, uintN argc, jsval* argv, jsval* rval ); void init(); -}; +} #endif diff --git a/source/simulation/scripting/JSInterface_BaseEntity.h b/source/simulation/scripting/JSInterface_BaseEntity.h index 9fe0b410cb..f1098ef75a 100755 --- a/source/simulation/scripting/JSInterface_BaseEntity.h +++ b/source/simulation/scripting/JSInterface_BaseEntity.h @@ -25,6 +25,6 @@ namespace JSI_BaseEntity JSBool setProperty( JSContext* cx, JSObject* obj, jsval id, jsval* vp ); void finalize( JSContext* cx, JSObject* obj ); void init(); -}; +} #endif diff --git a/source/simulation/scripting/JSInterface_Entity.h b/source/simulation/scripting/JSInterface_Entity.h index a6177fb4a4..0c5b535c09 100755 --- a/source/simulation/scripting/JSInterface_Entity.h +++ b/source/simulation/scripting/JSInterface_Entity.h @@ -26,6 +26,6 @@ namespace JSI_Entity JSBool construct( JSContext* cx, JSObject* obj, unsigned int argc, jsval* argv, jsval* rval ); void finalize( JSContext* cx, JSObject* obj ); void init(); -}; +} #endif diff --git a/source/terrain/terrainMain.cpp b/source/terrain/terrainMain.cpp index 567fc80427..d2b8d8a7d3 100755 --- a/source/terrain/terrainMain.cpp +++ b/source/terrain/terrainMain.cpp @@ -30,7 +30,6 @@ CLightEnv g_LightEnv; float g_CameraZoom = 10; -const int NUM_ALPHA_MAPS = 13; const float ViewScrollSpeed = 60; const float ViewRotateSensitivity = 0.002f; const float ViewDragSensitivity = 0.5f;