← Back to team overview

widelands-dev team mailing list archive

[Merge] lp:~widelands-dev/widelands/compiler_warnings into lp:widelands

 

GunChleoc has proposed merging lp:~widelands-dev/widelands/compiler_warnings into lp:widelands.

Requested reviews:
  Widelands Developers (widelands-dev)

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/compiler_warnings/+merge/278240

Fixed compiler warnings.
-- 
Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/compiler_warnings into lp:widelands.
=== modified file 'src/ai/ai_help_structs.h'
--- src/ai/ai_help_structs.h	2015-11-11 09:53:54 +0000
+++ src/ai/ai_help_structs.h	2015-11-21 10:54:08 +0000
@@ -426,8 +426,8 @@
 
 	// used to track amount of wares produced by building
 	uint32_t stocklevel_;
-	int32_t stocklevel_time;  // time when stocklevel_ was last time recalculated
-	int32_t last_dismantle_time_;
+	uint32_t stocklevel_time;  // time when stocklevel_ was last time recalculated
+	uint32_t last_dismantle_time_;
 	int32_t construction_decision_time_;
 
 	uint32_t unoccupied_count_;

=== modified file 'src/economy/cmd_call_economy_balance.cc'
--- src/economy/cmd_call_economy_balance.cc	2015-10-24 15:42:37 +0000
+++ src/economy/cmd_call_economy_balance.cc	2015-11-21 10:54:08 +0000
@@ -31,7 +31,7 @@
 namespace Widelands {
 
 CmdCallEconomyBalance::CmdCallEconomyBalance
-	(int32_t const starttime, Economy * const economy, uint32_t const timerid)
+	(uint32_t const starttime, Economy * const economy, uint32_t const timerid)
 	: GameLogicCommand(starttime)
 {
 	m_flag = economy->get_arbitrary_flag();

=== modified file 'src/economy/cmd_call_economy_balance.h'
--- src/economy/cmd_call_economy_balance.h	2014-09-19 12:54:54 +0000
+++ src/economy/cmd_call_economy_balance.h	2015-11-21 10:54:08 +0000
@@ -33,7 +33,7 @@
 struct CmdCallEconomyBalance : public GameLogicCommand {
 	CmdCallEconomyBalance () : GameLogicCommand(0), m_timerid(0) {} ///< for load and save
 
-	CmdCallEconomyBalance (int32_t starttime, Economy *, uint32_t timerid);
+	CmdCallEconomyBalance (uint32_t starttime, Economy *, uint32_t timerid);
 
 	void execute (Game &) override;
 

=== modified file 'src/logic/bob.cc'
--- src/logic/bob.cc	2015-10-25 08:06:00 +0000
+++ src/logic/bob.cc	2015-11-21 10:54:08 +0000
@@ -760,7 +760,7 @@
 
 void Bob::move_update(Game & game, State &)
 {
-	if (m_walkend <= game.get_gametime()) {
+	if (static_cast<uint32_t>(m_walkend) <= game.get_gametime()) {
 		end_walk();
 		return pop_task(game);
 	} else
@@ -822,7 +822,7 @@
 		spos.y += end.field->get_height() * HEIGHT_FACTOR;
 		spos.y -= start.field->get_height() * HEIGHT_FACTOR;
 
-		assert(m_walkstart <= game.get_gametime());
+		assert(static_cast<uint32_t>(m_walkstart) <= game.get_gametime());
 		assert(m_walkstart < m_walkend);
 		float f =
 			static_cast<float>(game.get_gametime() - m_walkstart)

=== modified file 'src/logic/cmd_calculate_statistics.h'
--- src/logic/cmd_calculate_statistics.h	2015-01-31 16:03:59 +0000
+++ src/logic/cmd_calculate_statistics.h	2015-11-21 10:54:08 +0000
@@ -28,7 +28,7 @@
 
 struct CmdCalculateStatistics : public GameLogicCommand {
 	CmdCalculateStatistics() : GameLogicCommand(0) {} // For savegame loading
-	CmdCalculateStatistics(int32_t const _duetime) :
+	CmdCalculateStatistics(uint32_t const _duetime) :
 		GameLogicCommand(_duetime) {}
 
 	// Write these commands to a file (for savegames)

=== modified file 'src/logic/cmd_delete_message.h'
--- src/logic/cmd_delete_message.h	2014-09-29 12:37:07 +0000
+++ src/logic/cmd_delete_message.h	2015-11-21 10:54:08 +0000
@@ -37,7 +37,7 @@
 /// the savegame.
 struct CmdDeleteMessage : public Command {
 	CmdDeleteMessage
-		(int32_t const t, PlayerNumber const p, MessageId const m)
+		(uint32_t const t, PlayerNumber const p, MessageId const m)
 		: Command(t), player(p), message(m)
 	{}
 

=== modified file 'src/logic/cmd_incorporate.h'
--- src/logic/cmd_incorporate.h	2014-10-03 17:26:18 +0000
+++ src/logic/cmd_incorporate.h	2015-11-21 10:54:08 +0000
@@ -27,7 +27,7 @@
 
 struct CmdIncorporate : public GameLogicCommand {
 	CmdIncorporate() : GameLogicCommand(0), worker(nullptr) {} // For savegame loading
-	CmdIncorporate (int32_t const t, Worker * const w)
+	CmdIncorporate (uint32_t const t, Worker * const w)
 		: GameLogicCommand(t), worker(w)
 	{}
 

=== modified file 'src/logic/cmd_luacoroutine.h'
--- src/logic/cmd_luacoroutine.h	2015-01-31 16:03:59 +0000
+++ src/logic/cmd_luacoroutine.h	2015-11-21 10:54:08 +0000
@@ -29,7 +29,7 @@
 
 struct CmdLuaCoroutine : public GameLogicCommand {
 	CmdLuaCoroutine() : GameLogicCommand(0), m_cr(nullptr) {} // For savegame loading
-	CmdLuaCoroutine(int32_t const _duetime, LuaCoroutine * const cr) :
+	CmdLuaCoroutine(uint32_t const _duetime, LuaCoroutine * const cr) :
 		GameLogicCommand(_duetime), m_cr(cr) {}
 
 	~CmdLuaCoroutine() {

=== modified file 'src/logic/cmd_luascript.h'
--- src/logic/cmd_luascript.h	2014-09-19 12:54:54 +0000
+++ src/logic/cmd_luascript.h	2015-11-21 10:54:08 +0000
@@ -29,7 +29,7 @@
 struct CmdLuaScript : public GameLogicCommand {
 	CmdLuaScript() : GameLogicCommand(0) {} // For savegame loading
 	CmdLuaScript
-		(int32_t const _duetime, const std::string& script) :
+		(uint32_t const _duetime, const std::string& script) :
 		GameLogicCommand(_duetime), script_(script) {}
 
 	// Write these commands to a file (for savegames)

=== modified file 'src/logic/cmd_queue.h'
--- src/logic/cmd_queue.h	2015-11-14 15:58:29 +0000
+++ src/logic/cmd_queue.h	2015-11-21 10:54:08 +0000
@@ -85,17 +85,17 @@
  * the same for all parallel simulation.
  */
 struct Command {
-	Command (const int32_t _duetime) : m_duetime(_duetime) {}
+	Command (const uint32_t _duetime) : m_duetime(_duetime) {}
 	virtual ~Command ();
 
 	virtual void execute (Game &) = 0;
 	virtual uint8_t id() const = 0;
 
-	int32_t duetime() const {return m_duetime;}
-	void set_duetime(int32_t const t) {m_duetime = t;}
+	uint32_t duetime() const {return m_duetime;}
+	void set_duetime(uint32_t const t) {m_duetime = t;}
 
 private:
-	int32_t m_duetime;
+	uint32_t m_duetime;
 };
 
 
@@ -107,7 +107,7 @@
  * for all instances of a game to ensure parallel simulation.
  */
 struct GameLogicCommand : public Command {
-	GameLogicCommand (int32_t const _duetime) : Command(_duetime) {}
+	GameLogicCommand (uint32_t const _duetime) : Command(_duetime) {}
 
 	// Write these commands to a file (for savegames)
 	virtual void write

=== modified file 'src/logic/constructionsite.cc'
--- src/logic/constructionsite.cc	2015-11-11 09:53:54 +0000
+++ src/logic/constructionsite.cc	2015-11-21 10:54:08 +0000
@@ -322,7 +322,6 @@
 void ConstructionSite::draw
 	(const EditorGameBase & game, RenderTarget & dst, const FCoords& coords, const Point& pos)
 {
-	assert(0 <= game.get_gametime());
 	const uint32_t gametime = game.get_gametime();
 	uint32_t tanim = gametime - m_animstart;
 

=== modified file 'src/logic/dismantlesite.cc'
--- src/logic/dismantlesite.cc	2015-11-11 09:53:54 +0000
+++ src/logic/dismantlesite.cc	2015-11-21 10:54:08 +0000
@@ -232,7 +232,6 @@
 void DismantleSite::draw
 	(const EditorGameBase& game, RenderTarget& dst, const FCoords& coords, const Point& pos)
 {
-	assert(0 <= game.get_gametime());
 	const uint32_t gametime = game.get_gametime();
 	uint32_t tanim = gametime - m_animstart;
 

=== modified file 'src/logic/immovable.cc'
--- src/logic/immovable.cc	2015-11-14 15:58:29 +0000
+++ src/logic/immovable.cc	2015-11-21 10:54:08 +0000
@@ -430,7 +430,7 @@
 {
 	BaseImmovable::act(game, data);
 
-	if (m_program_step <= game.get_gametime()) {
+	if (static_cast<uint32_t>(m_program_step) <= game.get_gametime()) {
 		//  Might delete itself!
 		(*m_program)[m_program_ptr].execute(game, *this);
 	}

=== modified file 'src/logic/instances.cc'
--- src/logic/instances.cc	2015-11-02 19:29:03 +0000
+++ src/logic/instances.cc	2015-11-21 10:54:08 +0000
@@ -40,7 +40,7 @@
 namespace Widelands {
 
 CmdDestroyMapObject::CmdDestroyMapObject
-	(int32_t const t, MapObject & o)
+	(uint32_t const t, MapObject & o)
 	: GameLogicCommand(t), obj_serial(o.serial())
 {}
 
@@ -90,7 +90,7 @@
 	fw.unsigned_32(mos.get_object_file_index_or_zero(egbase.objects().get_object(obj_serial)));
 }
 
-CmdAct::CmdAct(int32_t const t, MapObject & o, int32_t const a) :
+CmdAct::CmdAct(uint32_t const t, MapObject & o, int32_t const a) :
 	GameLogicCommand(t), obj_serial(o.serial()), arg(a)
 {}
 

=== modified file 'src/logic/instances.h'
--- src/logic/instances.h	2015-10-21 16:43:30 +0000
+++ src/logic/instances.h	2015-11-21 10:54:08 +0000
@@ -306,15 +306,6 @@
 		HeaderFleet = 11,
 	};
 
-	protected:
-	/**
-	 * MapObjects like trees are reserved by a worker that is walking
-	 * towards them, so that e.g. two lumberjacks don't attempt to
-	 * work on the same tree simultaneously or two hunters try to hunt
-	 * the same animal.
-	 */
-	bool m_reserved_by_worker;
-
 	public:
 
 	/**
@@ -393,6 +384,14 @@
 	Serial                   m_serial;
 	LogSink                * m_logsink;
 
+	/**
+	 * MapObjects like trees are reserved by a worker that is walking
+	 * towards them, so that e.g. two lumberjacks don't attempt to
+	 * work on the same tree simultaneously or two hunters try to hunt
+	 * the same animal.
+	 */
+	bool m_reserved_by_worker;
+
 private:
 	DISALLOW_COPY_AND_ASSIGN(MapObject);
 };
@@ -514,7 +513,7 @@
 
 struct CmdDestroyMapObject : public GameLogicCommand {
 	CmdDestroyMapObject() : GameLogicCommand(0), obj_serial(0) {} ///< For savegame loading
-	CmdDestroyMapObject (int32_t t, MapObject &);
+	CmdDestroyMapObject (uint32_t t, MapObject &);
 	void execute (Game &) override;
 
 	void write(FileWrite &, EditorGameBase &, MapObjectSaver  &) override;
@@ -528,7 +527,7 @@
 
 struct CmdAct : public GameLogicCommand {
 	CmdAct() : GameLogicCommand(0), obj_serial(0), arg(0) {} ///< For savegame loading
-	CmdAct (int32_t t, MapObject &, int32_t a);
+	CmdAct (uint32_t t, MapObject &, int32_t a);
 
 	void execute (Game &) override;
 

=== modified file 'src/logic/playercommand.cc'
--- src/logic/playercommand.cc	2015-11-11 09:52:55 +0000
+++ src/logic/playercommand.cc	2015-11-21 10:54:08 +0000
@@ -93,7 +93,7 @@
 
 /*** class PlayerCommand ***/
 
-PlayerCommand::PlayerCommand (const int32_t time, const PlayerNumber s)
+PlayerCommand::PlayerCommand (const uint32_t time, const PlayerNumber s)
 	: GameLogicCommand (time), m_sender(s), m_cmdserial(0)
 {}
 
@@ -330,7 +330,7 @@
 
 /*** class Cmd_BuildRoad ***/
 
-CmdBuildRoad::CmdBuildRoad (int32_t t, int32_t p, Path & pa) :
+CmdBuildRoad::CmdBuildRoad (uint32_t t, int32_t p, Path & pa) :
 PlayerCommand(t, p),
 path         (&pa),
 start        (pa.get_start()),
@@ -1122,7 +1122,7 @@
 
 /*** class Cmd_SetWarePriority ***/
 CmdSetWarePriority::CmdSetWarePriority
-	(const int32_t _duetime, const PlayerNumber _sender,
+	(const uint32_t _duetime, const PlayerNumber _sender,
 	 PlayerImmovable & imm,
 	 const int32_t type, const DescriptionIndex index, const int32_t priority)
 	:
@@ -1201,7 +1201,7 @@
 
 /*** class Cmd_SetWareMaxFill ***/
 CmdSetWareMaxFill::CmdSetWareMaxFill
-	(const int32_t _duetime, const PlayerNumber _sender,
+	(const uint32_t _duetime, const PlayerNumber _sender,
 	 PlayerImmovable & imm,
 	 const DescriptionIndex index, const uint32_t max_fill)
 	:
@@ -1274,7 +1274,7 @@
 
 
 CmdChangeTargetQuantity::CmdChangeTargetQuantity
-	(const int32_t _duetime, const PlayerNumber _sender,
+	(const uint32_t _duetime, const PlayerNumber _sender,
 	 const uint32_t _economy, const DescriptionIndex _ware_type)
 	:
 	PlayerCommand(_duetime, _sender),
@@ -1319,7 +1319,7 @@
 
 
 CmdSetWareTargetQuantity::CmdSetWareTargetQuantity
-	(const int32_t _duetime, const PlayerNumber _sender,
+	(const uint32_t _duetime, const PlayerNumber _sender,
 	 const uint32_t _economy,
 	 const DescriptionIndex _ware_type,
 	 const uint32_t _permanent)
@@ -1381,7 +1381,7 @@
 
 
 CmdResetWareTargetQuantity::CmdResetWareTargetQuantity
-	(const int32_t _duetime, const PlayerNumber _sender,
+	(const uint32_t _duetime, const PlayerNumber _sender,
 	 const uint32_t _economy,
 	 const DescriptionIndex _ware_type)
 	:
@@ -1437,7 +1437,7 @@
 
 
 CmdSetWorkerTargetQuantity::CmdSetWorkerTargetQuantity
-	(const int32_t _duetime, const PlayerNumber _sender,
+	(const uint32_t _duetime, const PlayerNumber _sender,
 	 const uint32_t _economy,
 	 const DescriptionIndex _ware_type,
 	 const uint32_t _permanent)
@@ -1499,7 +1499,7 @@
 
 
 CmdResetWorkerTargetQuantity::CmdResetWorkerTargetQuantity
-	(const int32_t _duetime, const PlayerNumber _sender,
+	(const uint32_t _duetime, const PlayerNumber _sender,
 	 const uint32_t _economy,
 	 const DescriptionIndex _ware_type)
 	:
@@ -1894,7 +1894,7 @@
 
 /*** struct Cmd_SetStockPolicy ***/
 CmdSetStockPolicy::CmdSetStockPolicy
-	(int32_t time, PlayerNumber p,
+	(uint32_t time, PlayerNumber p,
 	 Warehouse & wh, bool isworker, DescriptionIndex ware,
 	 Warehouse::StockPolicy policy)
 : PlayerCommand(time, p)

=== modified file 'src/logic/playercommand.h'
--- src/logic/playercommand.h	2015-11-11 09:53:54 +0000
+++ src/logic/playercommand.h	2015-11-21 10:54:08 +0000
@@ -44,7 +44,7 @@
  */
 class PlayerCommand : public GameLogicCommand {
 public:
-	PlayerCommand (int32_t time, PlayerNumber);
+	PlayerCommand (uint32_t time, PlayerNumber);
 
 	/// For savegame loading
 	PlayerCommand() : GameLogicCommand(0), m_sender(0), m_cmdserial(0) {}
@@ -68,7 +68,7 @@
 struct CmdBulldoze:public PlayerCommand {
 	CmdBulldoze() : PlayerCommand(), serial(0), recurse(0) {} // For savegame loading
 	CmdBulldoze
-		(const int32_t t, const int32_t p,
+		(const uint32_t t, const int32_t p,
 		 PlayerImmovable & pi,
 		 const bool _recurse = false)
 		: PlayerCommand(t, p), serial(pi.serial()), recurse(_recurse)
@@ -92,7 +92,7 @@
 struct CmdBuild:public PlayerCommand {
 	CmdBuild() : PlayerCommand() {} // For savegame loading
 	CmdBuild
-		(const int32_t        _duetime,
+		(const uint32_t        _duetime,
 		 const int32_t        p,
 		 const Coords         c,
 		 const DescriptionIndex i)
@@ -116,7 +116,7 @@
 
 struct CmdBuildFlag:public PlayerCommand {
 	CmdBuildFlag() : PlayerCommand() {} // For savegame loading
-	CmdBuildFlag (const int32_t t, const int32_t p, const Coords c) :
+	CmdBuildFlag (const uint32_t t, const int32_t p, const Coords c) :
 		PlayerCommand(t, p), coords(c)
 	{}
 
@@ -137,7 +137,7 @@
 struct CmdBuildRoad:public PlayerCommand {
 	CmdBuildRoad() :
 		PlayerCommand(), path(nullptr), start(), nsteps(0), steps(nullptr) {} // For savegame loading
-	CmdBuildRoad (int32_t, int32_t, Path &);
+	CmdBuildRoad (uint32_t, int32_t, Path &);
 	CmdBuildRoad (StreamRead &);
 
 	virtual ~CmdBuildRoad ();
@@ -159,7 +159,7 @@
 
 struct CmdFlagAction : public PlayerCommand {
 	CmdFlagAction() : PlayerCommand(), serial(0) {} // For savegame loading
-	CmdFlagAction (const int32_t t, const int32_t p, const Flag & f) :
+	CmdFlagAction (const uint32_t t, const int32_t p, const Flag & f) :
 		PlayerCommand(t, p), serial(f.serial())
 	{}
 
@@ -180,7 +180,7 @@
 
 struct CmdStartStopBuilding : public PlayerCommand {
 	CmdStartStopBuilding() : PlayerCommand(), serial(0) {} // For savegame loading
-	CmdStartStopBuilding (const int32_t t, const PlayerNumber p, Building & b)
+	CmdStartStopBuilding (const uint32_t t, const PlayerNumber p, Building & b)
 		: PlayerCommand(t, p), serial(b.serial())
 	{}
 
@@ -200,7 +200,7 @@
 
 struct CmdMilitarySiteSetSoldierPreference : public PlayerCommand {
 	CmdMilitarySiteSetSoldierPreference() : PlayerCommand(), serial(0) {} // For savegame loading
-	CmdMilitarySiteSetSoldierPreference (const int32_t t, const PlayerNumber p, Building & b, uint8_t prefs)
+	CmdMilitarySiteSetSoldierPreference (const uint32_t t, const PlayerNumber p, Building & b, uint8_t prefs)
 		: PlayerCommand(t, p), serial(b.serial()), preference(prefs)
 	{}
 
@@ -220,7 +220,7 @@
 };
 struct CmdStartOrCancelExpedition : public PlayerCommand {
 	CmdStartOrCancelExpedition() : PlayerCommand() {} // For savegame loading
-	CmdStartOrCancelExpedition (int32_t const t, PlayerNumber const p, Building & b)
+	CmdStartOrCancelExpedition (uint32_t const t, PlayerNumber const p, Building & b)
 		: PlayerCommand(t, p), serial(b.serial())
 	{}
 
@@ -241,7 +241,7 @@
 struct CmdEnhanceBuilding:public PlayerCommand {
 	CmdEnhanceBuilding() : PlayerCommand(), serial(0) {} // For savegame loading
 	CmdEnhanceBuilding
-		(const int32_t        _duetime,
+		(const uint32_t        _duetime,
 		 const int32_t        p,
 		 Building           & b,
 		 const DescriptionIndex i)
@@ -267,7 +267,7 @@
 struct CmdDismantleBuilding:public PlayerCommand {
 	CmdDismantleBuilding() : PlayerCommand(), serial(0) {} // For savegame loading
 	CmdDismantleBuilding
-		(const int32_t t, const int32_t p,
+		(const uint32_t t, const int32_t p,
 		 PlayerImmovable & pi)
 		: PlayerCommand(t, p), serial(pi.serial())
 	{}
@@ -290,7 +290,7 @@
 struct CmdEvictWorker : public PlayerCommand {
 	CmdEvictWorker() : PlayerCommand(), serial(0) {} // For savegame loading
 	CmdEvictWorker
-		(const int32_t t, const int32_t p,
+		(const uint32_t t, const int32_t p,
 		 Worker & w)
 		: PlayerCommand(t, p), serial(w.serial())
 	{}
@@ -313,7 +313,7 @@
 struct CmdShipScoutDirection : public PlayerCommand {
 	CmdShipScoutDirection() : PlayerCommand(), serial(0) {} // For savegame loading
 	CmdShipScoutDirection
-		(int32_t const t, PlayerNumber const p, Serial s, WalkingDir direction)
+		(uint32_t const t, PlayerNumber const p, Serial s, WalkingDir direction)
 		: PlayerCommand(t, p), serial(s), dir(direction)
 	{}
 
@@ -335,7 +335,7 @@
 struct CmdShipConstructPort : public PlayerCommand {
 	CmdShipConstructPort() : PlayerCommand(), serial(0) {} // For savegame loading
 	CmdShipConstructPort
-		(int32_t const t, PlayerNumber const p, Serial s, Coords c)
+		(uint32_t const t, PlayerNumber const p, Serial s, Coords c)
 		: PlayerCommand(t, p), serial(s), coords(c)
 	{}
 
@@ -357,7 +357,7 @@
 struct CmdShipExploreIsland : public PlayerCommand {
 	CmdShipExploreIsland() : PlayerCommand(), serial(0) {} // For savegame loading
 	CmdShipExploreIsland
-		(int32_t const t, PlayerNumber const p, Serial s, IslandExploreDirection direction)
+		(uint32_t const t, PlayerNumber const p, Serial s, IslandExploreDirection direction)
 		: PlayerCommand(t, p), serial(s), island_explore_direction(direction)
 	{}
 
@@ -379,7 +379,7 @@
 struct CmdShipSink : public PlayerCommand {
 	CmdShipSink() : PlayerCommand(), serial(0) {} // For savegame loading
 	CmdShipSink
-		(int32_t const t, PlayerNumber const p, Serial s)
+		(uint32_t const t, PlayerNumber const p, Serial s)
 		: PlayerCommand(t, p), serial(s)
 	{}
 
@@ -400,7 +400,7 @@
 struct CmdShipCancelExpedition : public PlayerCommand {
 	CmdShipCancelExpedition() : PlayerCommand(), serial(0) {} // For savegame loading
 	CmdShipCancelExpedition
-		(int32_t const t, PlayerNumber const p, Serial s)
+		(uint32_t const t, PlayerNumber const p, Serial s)
 		: PlayerCommand(t, p), serial(s)
 	{}
 
@@ -428,7 +428,7 @@
 		m_priority(0)
 	{}
 	CmdSetWarePriority
-		(int32_t duetime, PlayerNumber sender,
+		(uint32_t duetime, PlayerNumber sender,
 		 PlayerImmovable &,
 		 int32_t type, DescriptionIndex index, int32_t priority);
 
@@ -453,7 +453,7 @@
 struct CmdSetWareMaxFill : public PlayerCommand {
 	CmdSetWareMaxFill() : PlayerCommand(), m_serial(0), m_index(), m_max_fill(0) {} // For savegame loading
 	CmdSetWareMaxFill
-		(int32_t duetime, PlayerNumber,
+		(uint32_t duetime, PlayerNumber,
 		 PlayerImmovable &,
 		 DescriptionIndex, uint32_t maxfill);
 
@@ -477,7 +477,7 @@
 struct CmdChangeTargetQuantity : public PlayerCommand {
 	CmdChangeTargetQuantity() : PlayerCommand(), m_economy(0), m_ware_type() {} //  For savegame loading.
 	CmdChangeTargetQuantity
-		(int32_t duetime, PlayerNumber sender,
+		(uint32_t duetime, PlayerNumber sender,
 		 uint32_t economy, DescriptionIndex index);
 
 	//  Write/Read these commands to/from a file (for savegames).
@@ -501,7 +501,7 @@
 struct CmdSetWareTargetQuantity : public CmdChangeTargetQuantity {
 	CmdSetWareTargetQuantity() : CmdChangeTargetQuantity(), m_permanent(0) {}
 	CmdSetWareTargetQuantity
-		(int32_t duetime, PlayerNumber sender,
+		(uint32_t duetime, PlayerNumber sender,
 		 uint32_t economy, DescriptionIndex index,
 		 uint32_t permanent);
 
@@ -523,7 +523,7 @@
 struct CmdResetWareTargetQuantity : public CmdChangeTargetQuantity {
 	CmdResetWareTargetQuantity() : CmdChangeTargetQuantity() {}
 	CmdResetWareTargetQuantity
-		(int32_t duetime, PlayerNumber sender,
+		(uint32_t duetime, PlayerNumber sender,
 		 uint32_t economy, DescriptionIndex index);
 
 	//  Write/Read these commands to/from a file (for savegames).
@@ -541,7 +541,7 @@
 struct CmdSetWorkerTargetQuantity : public CmdChangeTargetQuantity {
 	CmdSetWorkerTargetQuantity() : CmdChangeTargetQuantity(), m_permanent(0) {}
 	CmdSetWorkerTargetQuantity
-		(int32_t duetime, PlayerNumber sender,
+		(uint32_t duetime, PlayerNumber sender,
 		 uint32_t economy, DescriptionIndex index,
 		 uint32_t permanent);
 
@@ -563,7 +563,7 @@
 struct CmdResetWorkerTargetQuantity : public CmdChangeTargetQuantity {
 	CmdResetWorkerTargetQuantity() : CmdChangeTargetQuantity() {}
 	CmdResetWorkerTargetQuantity
-		(int32_t duetime, PlayerNumber sender,
+		(uint32_t duetime, PlayerNumber sender,
 		 uint32_t economy, DescriptionIndex index);
 
 	//  Write/Read these commands to/from a file (for savegames).
@@ -581,7 +581,7 @@
 struct CmdChangeTrainingOptions : public PlayerCommand {
 	CmdChangeTrainingOptions() : PlayerCommand(), serial(0), attribute(0), value(0) {} // For savegame loading
 	CmdChangeTrainingOptions
-		(const int32_t    t,
+		(const uint32_t    t,
 		 const PlayerNumber p,
 		 TrainingSite &   ts,
 		 const int32_t    at,
@@ -609,7 +609,7 @@
 struct CmdDropSoldier : public PlayerCommand {
 	CmdDropSoldier () : PlayerCommand(), serial(0), soldier(0) {} //  for savegames
 	CmdDropSoldier
-		(const int32_t    t,
+		(const uint32_t    t,
 		 const int32_t    p,
 		 Building &       b,
 		 const int32_t    _soldier)
@@ -635,7 +635,7 @@
 struct CmdChangeSoldierCapacity : public PlayerCommand {
 	CmdChangeSoldierCapacity () : PlayerCommand(), serial(0), val(0) {} //  for savegames
 	CmdChangeSoldierCapacity
-		(const int32_t t, const int32_t p, Building & b, const int32_t i)
+		(const uint32_t t, const int32_t p, Building & b, const int32_t i)
 		: PlayerCommand(t, p), serial(b.serial()), val(i)
 	{}
 
@@ -658,7 +658,7 @@
 /////////////TESTING STUFF
 struct CmdEnemyFlagAction : public PlayerCommand {
 	CmdEnemyFlagAction() : PlayerCommand(), serial(0), number(0) {} // For savegame loading
-	CmdEnemyFlagAction(int32_t t, int32_t p, const Flag& f, uint32_t num)
+	CmdEnemyFlagAction(uint32_t t, int32_t p, const Flag& f, uint32_t num)
 	   : PlayerCommand(t, p), serial(f.serial()), number(num) {
 	}
 
@@ -733,7 +733,7 @@
  */
 struct CmdSetStockPolicy : PlayerCommand {
 	CmdSetStockPolicy
-		(int32_t time, PlayerNumber p,
+		(uint32_t time, PlayerNumber p,
 		 Warehouse & wh, bool isworker, DescriptionIndex ware,
 		 Warehouse::StockPolicy policy);
 

=== modified file 'src/logic/replay_game_controller.h'
--- src/logic/replay_game_controller.h	2015-03-01 09:21:20 +0000
+++ src/logic/replay_game_controller.h	2015-11-21 10:54:08 +0000
@@ -46,7 +46,7 @@
 
 private:
 	struct CmdReplayEnd : public Widelands::Command {
-		CmdReplayEnd (int32_t const _duetime) : Widelands::Command(_duetime) {}
+		CmdReplayEnd (uint32_t const _duetime) : Widelands::Command(_duetime) {}
 		virtual void execute (Widelands::Game & game);
 		virtual uint8_t id() const;
 	};

=== modified file 'src/logic/soldier.cc'
--- src/logic/soldier.cc	2015-10-25 08:06:00 +0000
+++ src/logic/soldier.cc	2015-11-21 10:54:08 +0000
@@ -487,7 +487,7 @@
 			static_cast<float>(game.get_gametime() - m_combat_walkstart)
 			/
 			(m_combat_walkend - m_combat_walkstart);
-		assert(m_combat_walkstart <= game.get_gametime());
+		assert(static_cast<uint32_t>(m_combat_walkstart) <= game.get_gametime());
 		assert(m_combat_walkstart < m_combat_walkend);
 
 		if (f < 0)
@@ -1590,7 +1590,7 @@
 		signal_handled();
 	}
 
-	if (state.ivar1 > game.get_gametime())
+	if (static_cast<uint32_t>(state.ivar1) > game.get_gametime())
 		return schedule_act(game, state.ivar1 - game.get_gametime());
 
 	// When task updated, dead is near!

=== modified file 'src/logic/worker.cc'
--- src/logic/worker.cc	2015-11-11 09:56:22 +0000
+++ src/logic/worker.cc	2015-11-21 10:54:08 +0000
@@ -2613,7 +2613,7 @@
 		}
 	}
 
-	if (state.ivar1 < game.get_gametime()) { //  time to die?
+	if (static_cast<uint32_t>(state.ivar1) < game.get_gametime()) { //  time to die?
 		molog("[fugitive]: die\n");
 		return schedule_destroy(game);
 	}

=== modified file 'src/network/netclient.cc'
--- src/network/netclient.cc	2015-11-08 17:31:06 +0000
+++ src/network/netclient.cc	2015-11-21 10:54:08 +0000
@@ -82,7 +82,7 @@
 	bool server_is_waiting;
 
 	/// Data for the last time message we sent.
-	int32_t lasttimestamp;
+	uint32_t lasttimestamp;
 	uint32_t lasttimestamp_realtime;
 
 	/// The real target speed, in milliseconds per second.
@@ -253,7 +253,7 @@
 
 		if
 			(d->server_is_waiting &&
-			 d->game->get_gametime() == d->time.networktime())
+			 d->game->get_gametime() == static_cast<uint32_t>(d->time.networktime()))
 		{
 			send_time();
 			d->server_is_waiting = false;

=== modified file 'src/network/nethost.cc'
--- src/network/nethost.cc	2015-11-08 17:31:06 +0000
+++ src/network/nethost.cc	2015-11-21 10:54:08 +0000
@@ -2458,7 +2458,7 @@
 
 void NetHost::syncreport()
 {
-	assert(d->game->get_gametime() == d->syncreport_time);
+	assert(d->game->get_gametime() == static_cast<uint32_t>(d->syncreport_time));
 
 	d->syncreport = d->game->get_sync_hash();
 	d->syncreport_arrived = true;

=== modified file 'src/network/network.cc'
--- src/network/network.cc	2015-11-08 17:31:06 +0000
+++ src/network/network.cc	2015-11-21 10:54:08 +0000
@@ -24,7 +24,7 @@
 
 
 
-CmdNetCheckSync::CmdNetCheckSync(int32_t const dt, SyncCallback * const cb) :
+CmdNetCheckSync::CmdNetCheckSync(uint32_t const dt, SyncCallback * const cb) :
 Command (dt), m_callback(cb)
 {}
 

=== modified file 'src/network/network.h'
--- src/network/network.h	2015-11-08 17:31:06 +0000
+++ src/network/network.h	2015-11-21 10:54:08 +0000
@@ -45,7 +45,7 @@
  * to schedule taking a synchronization hash.
  */
 struct CmdNetCheckSync : public Widelands::Command {
-	CmdNetCheckSync (int32_t dt, SyncCallback *);
+	CmdNetCheckSync (uint32_t dt, SyncCallback *);
 
 	void execute (Widelands::Game &) override;
 


Follow ups