From 027d66f9d03580ec2ab92ba39f27800f98a7aca5 Mon Sep 17 00:00:00 2001 From: "C.W. Betts" Date: Thu, 26 Jun 2014 21:41:40 -0600 Subject: [PATCH] Fix some warnings discovered via Clang/Xcode. --- Aquaria/Main.cpp | 4 ++-- Aquaria/ScriptInterface.cpp | 2 +- BBGE/Emitter.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Aquaria/Main.cpp b/Aquaria/Main.cpp index ed237b8..be7141e 100644 --- a/Aquaria/Main.cpp +++ b/Aquaria/Main.cpp @@ -40,9 +40,9 @@ static void MakeRan(void) #endif } +#if defined(BBGE_BUILD_WINDOWS) static void StartAQConfig() { -#if defined(BBGE_BUILD_WINDOWS) if (!exists("ran", false, true)) { MakeRan(); @@ -53,8 +53,8 @@ static void StartAQConfig() } } remove("ran"); -#endif } +#endif static void CheckConfig(void) { diff --git a/Aquaria/ScriptInterface.cpp b/Aquaria/ScriptInterface.cpp index 18d96c8..04950c5 100644 --- a/Aquaria/ScriptInterface.cpp +++ b/Aquaria/ScriptInterface.cpp @@ -2426,7 +2426,7 @@ static size_t _shotFilter(lua_State *L) const DamageType dt = lua_isnumber(L, 5) ? (DamageType)lua_tointeger(L, 5) : DT_NONE; const float sqrRadius = radius * radius; - float distsq; + float distsq = 0; const bool skipRadiusCheck = radius <= 0; size_t added = 0; for(Shot::Shots::iterator it = Shot::shots.begin(); it != Shot::shots.end(); ++it) diff --git a/BBGE/Emitter.cpp b/BBGE/Emitter.cpp index dc855cf..b647c49 100644 --- a/BBGE/Emitter.cpp +++ b/BBGE/Emitter.cpp @@ -155,7 +155,7 @@ void Emitter::onUpdate(float dt) } int spawnCount; - float spawnPerc; + float spawnPerc = 0; if (data.justOne) { if (data.didOne)