Sophie

Sophie

distrib > Mandriva > 2010.2 > i586 > media > contrib-release-src > by-pkgid > 6407662e393f36a88e2ed8d6fdfe7c84 > files > 2

netpanzer-0.8.2-3mdv2010.0.src.rpm

diff -Naur --exclude '*~' netpanzer-0.8.2/src/Lib/Util/Log.cpp netpanzer-0.8.2-fix-format-errors/src/Lib/Util/Log.cpp
--- netpanzer-0.8.2/src/Lib/Util/Log.cpp	2007-06-16 11:14:10.000000000 +0200
+++ netpanzer-0.8.2-fix-format-errors/src/Lib/Util/Log.cpp	2009-04-13 16:49:26.000000000 +0200
@@ -154,7 +154,7 @@
     strcat(buf, "\n");
     
     if (m_logLevel >= priority) {
-        fprintf(stderr, buf);
+        fprintf(stderr, "%s", buf);
     }
     
     if (m_logfile != 0) {
diff -Naur --exclude '*~' netpanzer-0.8.2/src/NetPanzer/Classes/Network/GameControlNetMessage.hpp netpanzer-0.8.2-fix-format-errors/src/NetPanzer/Classes/Network/GameControlNetMessage.hpp
--- netpanzer-0.8.2/src/NetPanzer/Classes/Network/GameControlNetMessage.hpp	2007-05-26 08:36:15.000000000 +0200
+++ netpanzer-0.8.2-fix-format-errors/src/NetPanzer/Classes/Network/GameControlNetMessage.hpp	2009-04-13 16:56:52.000000000 +0200
@@ -38,7 +38,7 @@
 
     void set(const char* newmap_name)
     {
-        snprintf(map_name, sizeof(map_name), newmap_name);
+        snprintf(map_name, sizeof(map_name), "%s", newmap_name);
     }
 
     GameControlCycleMap()
diff -Naur --exclude '*~' netpanzer-0.8.2/src/NetPanzer/Classes/WorldInputCmdProcessor.cpp netpanzer-0.8.2-fix-format-errors/src/NetPanzer/Classes/WorldInputCmdProcessor.cpp
--- netpanzer-0.8.2/src/NetPanzer/Classes/WorldInputCmdProcessor.cpp	2007-06-14 17:43:20.000000000 +0200
+++ netpanzer-0.8.2-fix-format-errors/src/NetPanzer/Classes/WorldInputCmdProcessor.cpp	2009-04-13 16:47:12.000000000 +0200
@@ -355,7 +355,7 @@
                 setSelectionList(n);
                 std::stringstream s;
                 s << "Group " << n << " Created";
-                ConsoleInterface::postMessage( s.str().c_str() );
+                ConsoleInterface::postMessage("%s", s.str().c_str() );
                 continue;
             }
             if(alt_status == true) {
diff -Naur --exclude '*~' netpanzer-0.8.2/src/NetPanzer/Interfaces/GameControlRulesDaemon.cpp netpanzer-0.8.2-fix-format-errors/src/NetPanzer/Interfaces/GameControlRulesDaemon.cpp
--- netpanzer-0.8.2/src/NetPanzer/Interfaces/GameControlRulesDaemon.cpp	2007-05-26 08:36:00.000000000 +0200
+++ netpanzer-0.8.2-fix-format-errors/src/NetPanzer/Interfaces/GameControlRulesDaemon.cpp	2009-04-13 16:47:30.000000000 +0200
@@ -379,7 +379,7 @@
     GameControlCycleMap *cycle_map_mesg;
 
     cycle_map_mesg = (GameControlCycleMap *) message;
-    snprintf(map_cycle_fsm_client_map_name, 256, cycle_map_mesg->map_name);
+    snprintf(map_cycle_fsm_client_map_name, 256, "%s",cycle_map_mesg->map_name);
     map_cycle_fsm_client_state = _map_cycle_client_start_map_load;
 }
 
diff -Naur --exclude '*~' netpanzer-0.8.2/src/NetPanzer/Interfaces/GameManager.cpp netpanzer-0.8.2-fix-format-errors/src/NetPanzer/Interfaces/GameManager.cpp
--- netpanzer-0.8.2/src/NetPanzer/Interfaces/GameManager.cpp	2007-05-26 08:36:00.000000000 +0200
+++ netpanzer-0.8.2-fix-format-errors/src/NetPanzer/Interfaces/GameManager.cpp	2009-04-13 16:43:09.000000000 +0200
@@ -457,7 +457,7 @@
 
     game_setup->setMaxPlayers(gameconfig->maxplayers);
     game_setup->setMaxUnits(gameconfig->maxunits);
-    snprintf(game_setup->map_name, 32, gameconfig->map.c_str()); 
+    snprintf(game_setup->map_name, 32, "%s", gameconfig->map.c_str()); 
     game_setup->setCloudCoverage(gameconfig->cloudcoverage);
     game_setup->setWindSpeed(gameconfig->windspeed);
     game_setup->setGameType(gameconfig->gametype);
diff -Naur --exclude '*~' netpanzer-0.8.2/src/NetPanzer/Interfaces/PlayerGameManager.cpp netpanzer-0.8.2-fix-format-errors/src/NetPanzer/Interfaces/PlayerGameManager.cpp
--- netpanzer-0.8.2/src/NetPanzer/Interfaces/PlayerGameManager.cpp	2007-05-26 10:40:24.000000000 +0200
+++ netpanzer-0.8.2-fix-format-errors/src/NetPanzer/Interfaces/PlayerGameManager.cpp	2009-04-13 16:34:30.000000000 +0200
@@ -382,7 +382,7 @@
         GameManager::startGameMapLoad(mapname, 20);
     } catch(std::exception& e) {
         LOGGER.warning("Error while loading map '%s':", mapname);
-        LOGGER.warning(e.what());
+        LOGGER.warning("%s",e.what());
         progressView->toggleMainMenu();
         return;
     }
diff -Naur --exclude '*~' netpanzer-0.8.2/src/NetPanzer/Particles/ParticleInterface.cpp netpanzer-0.8.2-fix-format-errors/src/NetPanzer/Particles/ParticleInterface.cpp
--- netpanzer-0.8.2/src/NetPanzer/Particles/ParticleInterface.cpp	2007-06-14 17:44:21.000000000 +0200
+++ netpanzer-0.8.2-fix-format-errors/src/NetPanzer/Particles/ParticleInterface.cpp	2009-04-13 16:47:58.000000000 +0200
@@ -543,7 +543,7 @@
     if (gDrawExplosionParticleCount) {
         char strBuf[256];
         sprintf(strBuf, "%d", e.particleCount);
-        ConsoleInterface::postMessage(strBuf);
+        ConsoleInterface::postMessage("%s",strBuf);
     }
 
     float hitPointScale = 1.0f;
@@ -703,7 +703,7 @@
     if (gDrawExplosionParticleCount) {
         char strBuf[256];
         sprintf(strBuf, "%d", e.particleCount);
-        ConsoleInterface::postMessage(strBuf);
+        ConsoleInterface::postMessage("%s",strBuf);
     }
 
     float attackScale = 1.0f;
diff -Naur --exclude '*~' netpanzer-0.8.2/src/NetPanzer/Views/MainMenu/MenuTemplateView.cpp netpanzer-0.8.2-fix-format-errors/src/NetPanzer/Views/MainMenu/MenuTemplateView.cpp
--- netpanzer-0.8.2/src/NetPanzer/Views/MainMenu/MenuTemplateView.cpp	2007-05-26 08:36:53.000000000 +0200
+++ netpanzer-0.8.2-fix-format-errors/src/NetPanzer/Views/MainMenu/MenuTemplateView.cpp	2009-04-13 16:49:09.000000000 +0200
@@ -239,7 +239,7 @@
 void MenuTemplateView::doActivate()
 {
     // Make the activating view active, redo this please!
-    sprintf(currentView, searchName);
+    sprintf(currentView, "%s", searchName);
     Desktop::setActiveView(searchName);
 
     loadBackgroundSurface();
diff -Naur --exclude '*~' netpanzer-0.8.2/src/NetPanzer/Views/MainMenu/Multi/GetSessionView.cpp netpanzer-0.8.2-fix-format-errors/src/NetPanzer/Views/MainMenu/Multi/GetSessionView.cpp
--- netpanzer-0.8.2/src/NetPanzer/Views/MainMenu/Multi/GetSessionView.cpp	2007-06-05 17:08:21.000000000 +0200
+++ netpanzer-0.8.2-fix-format-errors/src/NetPanzer/Views/MainMenu/Multi/GetSessionView.cpp	2009-04-13 16:48:56.000000000 +0200
@@ -186,7 +186,7 @@
 {
     MenuTemplateView::doActivate();
 
-    sprintf(currentMultiView, searchName);
+    sprintf(currentMultiView, "%s", searchName);
 
 } // end GetSessionView::doActivate
 
diff -Naur --exclude '*~' netpanzer-0.8.2/src/NetPanzer/Views/MainMenu/Multi/HostJoinTemplateView.cpp netpanzer-0.8.2-fix-format-errors/src/NetPanzer/Views/MainMenu/Multi/HostJoinTemplateView.cpp
--- netpanzer-0.8.2/src/NetPanzer/Views/MainMenu/Multi/HostJoinTemplateView.cpp	2007-05-26 08:36:47.000000000 +0200
+++ netpanzer-0.8.2-fix-format-errors/src/NetPanzer/Views/MainMenu/Multi/HostJoinTemplateView.cpp	2009-04-13 16:48:30.000000000 +0200
@@ -135,7 +135,7 @@
 {
     MenuTemplateView::doActivate();
 
-    sprintf(currentMultiView, searchName);
+    sprintf(currentMultiView, "%s", searchName);
 } // end doActivate
 
 // loadBackgroundSurface