From 3a1dffd8df9ac141e189ffbe23516540e54a28b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Kapu=C5=9Bci=C5=84ski?= Date: Tue, 19 May 2015 17:15:08 +0200 Subject: [PATCH] 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 bdd454ed..e839dc00 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 55303d0a..238a6296 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 8ffa6a00..945839c8 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;