[colobot] 365/390: Fixing some warnings

Didier Raboud odyx at moszumanska.debian.org
Fri Jun 12 14:22:05 UTC 2015


This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch upstream/latest
in repository colobot.

commit 3a1dffd8df9ac141e189ffbe23516540e54a28b3
Author: Tomasz Kapuściński <tomaszkax86 at gmail.com>
Date:   Tue May 19 17:15:08 2015 +0200

    Fixing some warnings
---
 src/graphics/engine/engine.cpp | 2 +-
 src/object/brain.cpp           | 3 ++-
 src/script/scriptfunc.cpp      | 2 +-
 3 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/graphics/engine/engine.cpp b/src/graphics/engine/engine.cpp
index bdd454e..e839dc0 100644
--- a/src/graphics/engine/engine.cpp
+++ b/src/graphics/engine/engine.cpp
@@ -3636,7 +3636,7 @@ void CEngine::RenderShadowMap()
     // If no shadow map texture exists, create it
     if (m_shadowMap.id == 0)
     {
-        int width, height;
+        int width = 256, height = 256;
 
         int depth = m_app->GetInstance().GetVideoConfig().depthSize;
 
diff --git a/src/object/brain.cpp b/src/object/brain.cpp
index 55303d0..238a629 100644
--- a/src/object/brain.cpp
+++ b/src/object/brain.cpp
@@ -361,7 +361,8 @@ bool CBrain::EventProcess(const Event &event)
             }
             SetSelScript(m_selScript);
 
-            StartEditScript(newProgram, "");
+            char text[] = "";
+            StartEditScript(newProgram, text);
 
             std::string res;
             GetResource(RES_TEXT, RT_STUDIO_CLONED, res);
diff --git a/src/script/scriptfunc.cpp b/src/script/scriptfunc.cpp
index 8ffa6a0..945839c 100644
--- a/src/script/scriptfunc.cpp
+++ b/src/script/scriptfunc.cpp
@@ -3626,7 +3626,7 @@ bool CScriptFunctions::rfread (CBotVar* pThis, CBotVar* pVar, CBotVar* pResult,
     int     i;
     for ( i = 0 ; i < 2000 ; i++ ) chaine[i] = 0;
     
-    fgets(chaine, 1999, pFile);
+    (void) fgets(chaine, 1999, pFile);
     
     for ( i = 0 ; i < 2000 ; i++ ) if (chaine[i] == '\n') chaine[i] = 0;
     

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/colobot.git



More information about the Pkg-games-commits mailing list