Issues found by Cppcheck 1.79

src/io/streamwrite.h:88: (warning) Redundant assignment of 'y' to itself.
src/third_party/gettext/gettext.h:183: (style) The scope of the variable 'translation' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced:
void f(int x) { int i = 0; if (x) { // it's safe to move 'int i = 0;' here for (int n = 0; n < 10; ++n) { // it is possible but not safe to move 'int i = 0;' here do_something(&i); } } } When you see this message it is always safe to reduce the variable scope 1 level. src/third_party/gettext/gettext.h:221: (style) The scope of the variable 'translation' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced:
void f(int x) { int i = 0; if (x) { // it's safe to move 'int i = 0;' here for (int n = 0; n < 10; ++n) { // it is possible but not safe to move 'int i = 0;' here do_something(&i); } } } When you see this message it is always safe to reduce the variable scope 1 level. src/logic/field.h:58: (style) The struct 'Field' does not have a constructor although it has private member variables. Member variables of builtin types are left uninitialized when the class is instantiated. That may cause bugs or undefined behavior.
src/graphic/texture_atlas.h:83: (warning) Member variable 'Block::node' is not initialized in the constructor.
src/economy/shippingitem.h:61: (style) The struct 'Loader' does not have a constructor although it has private member variables. Member variables of builtin types are left uninitialized when the class is instantiated. That may cause bugs or undefined behavior.
src/base/md5.h:77: (warning) Member variable 'MD5Checksum < StreamWrite >::sum' is not initialized in the constructor.
src/logic/findnode.h:69: (style) Value of pointer 'capsule', which points to allocated memory, is copied in copy constructor instead of allocating new memory.
src/logic/findimmovable.h:66: (style) Value of pointer 'capsule', which points to allocated memory, is copied in copy constructor instead of allocating new memory.
src/economy/trackptr.h:41: (style) class 'Trackable' does not have a copy constructor which is recommended since the class contains a pointer to allocated memory.
src/scripting/lua_coroutine.h:50: (style) Class 'LuaCoroutine' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/scripting/lua_errors.h:29: (style) Class 'LuaError' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/scripting/lua_errors.h:34: (style) Class 'LuaScriptNotExistingError' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/scripting/lua_table.h:36: (style) Class 'LuaTableKeyError' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/ai/ai_hints.h:37: (style) Struct 'BuildingHints' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/graphic/color.h:58: (style) Struct 'RGBAColor' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/logic/cmd_queue.h:72: (style) Struct 'Command' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/logic/cmd_queue.h:98: (style) Struct 'GameLogicCommand' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/logic/cmd_queue.h:133: (style) Class 'CmdQueue' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/logic/map_objects/map_object.h:256: (style) Class 'MapObject' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/logic/map_objects/map_object.h:494: (style) Struct 'ObjectPointer' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/logic/map_objects/map_object.h:532: (style) Struct 'OPtr' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/logic/map_objects/immovable.h:84: (style) Struct 'BaseImmovable' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/logic/map_objects/immovable.h:332: (style) Struct 'PlayerImmovable' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/logic/path.h:46: (style) Struct 'Path' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/logic/path.h:48: (style) Struct 'Path' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/logic/path.h:88: (style) Struct 'CoordPath' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/logic/findnode.h:83: (style) Struct 'FindNode' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/logic/findnode.h:56: (style) Struct 'Capsule' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/logic/findnode.h:94: (style) Struct 'FindNodeCaps' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/logic/findnode.h:135: (style) Struct 'FindNodeSize' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/logic/findnode.h:148: (style) Struct 'FindNodeImmovableSize' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/logic/findnode.h:159: (style) Struct 'FindNodeImmovableAttribute' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/logic/findnode.h:170: (style) Struct 'FindNodeResource' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/logic/findnode.h:196: (style) Struct 'FindNodeShore' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/base/i18n.h:46: (style) Struct 'Textdomain' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/logic/findimmovable.h:80: (style) Struct 'FindImmovable' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/logic/findimmovable.h:53: (style) Struct 'Capsule' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/logic/findimmovable.h:104: (style) Struct 'FindImmovableType' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/logic/findimmovable.h:113: (style) Struct 'FindImmovableAttribute' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/logic/findimmovable.h:128: (style) Struct 'FindImmovablePlayerMilitarySite' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/logic/findimmovable.h:142: (style) Struct 'FindImmovableByDescr' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/logic/findimmovable.h:150: (style) Struct 'FindFlagOf' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/logic/objective.h:35: (style) Class 'Objective' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/io/fileread.h:40: (style) Struct 'Pos' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/io/filewrite.h:39: (style) Struct 'Pos' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/logic/map_objects/bob.h:352: (style) Class 'Bob' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/logic/map_objects/bob.h:204: (style) Struct 'State' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/logic/map_objects/tribes/bill_of_materials.h:33: (style) Struct 'WareRange' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/graphic/texture_atlas.h:71: (style) Struct 'Node' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/logic/map_objects/tribes/building.h:224: (style) Class 'Building' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/logic/editor_game_base.h:84: (style) Class 'EditorGameBase' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/scripting/logic.h:34: (style) Class 'LuaEditorInterface' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/scripting/logic.h:45: (style) Class 'LuaGameInterface' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/logic/map_objects/checkstep.h:75: (style) Struct 'CheckStep' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/logic/map_objects/checkstep.h:51: (style) Struct 'Capsule' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/logic/map_objects/checkstep.h:122: (style) Struct 'CheckStepDefault' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/economy/shippingitem.h:47: (style) Struct 'ShippingItem' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/economy/shippingitem.h:48: (style) Struct 'ShippingItem' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/logic/map_objects/tribes/ship.h:101: (style) Struct 'Ship' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/logic/map_objects/world/resource_description.h:40: (style) Class 'ResourceDescription' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/logic/map_objects/world/terrain_description.h:56: (style) Struct 'Type' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/logic/map_objects/tribes/partially_finished_building.h:42: (style) Class 'PartiallyFinishedBuilding' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/logic/map_objects/tribes/constructionsite.h:86: (style) Class 'ConstructionSite' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/logic/map_objects/tribes/tribe_basic_info.h:45: (style) Struct 'TribeBasicInfo' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/economy/trackptr.h:49: (style) Class 'Tracker' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/economy/trackptr.h:107: (style) Class 'BaseTrackPtr' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/economy/trackptr.h:163: (style) Struct 'TrackPtr' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/economy/idleworkersupply.h:30: (style) Struct 'IdleWorkerSupply' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/economy/portdock.h:78: (style) Class 'PortDock' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/logic/map_objects/tribes/production_program.h:184: (style) Struct 'EconomyNeedsWare' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/logic/map_objects/tribes/production_program.h:196: (style) Struct 'EconomyNeedsWorker' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/logic/map_objects/tribes/production_program.h:306: (style) Struct 'ActSleep' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/logic/map_objects/tribes/production_program.h:324: (style) Struct 'ActCheckMap' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/logic/map_objects/tribes/production_program.h:463: (style) Struct 'ActCheckSoldier' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/logic/map_objects/tribes/production_program.h:472: (style) Struct 'ActTrain' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/logic/map_objects/tribes/production_program.h:496: (style) Struct 'ActPlaySound' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/logic/map_objects/tribes/productionsite.h:165: (style) Class 'ProductionSite' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/logic/map_objects/tribes/worker.h:74: (style) Class 'Worker' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/logic/map_objects/tribes/carrier.h:57: (style) Struct 'Carrier' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/logic/map_objects/tribes/dismantlesite.h:68: (style) Class 'DismantleSite' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/logic/map_objects/tribes/requirements.h:83: (style) Struct 'Requirements' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/logic/map_objects/tribes/requirements.h:61: (style) Struct 'Capsule' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/logic/map_objects/tribes/militarysite.h:83: (style) Class 'MilitarySite' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/logic/map_objects/tribes/soldier.h:115: (style) Struct 'BattleAttribute' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/logic/map_objects/tribes/soldier.h:176: (style) Class 'Soldier' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/logic/map_objects/tribes/trainingsite.h:170: (style) Class 'TrainingSite' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/logic/map_objects/tribes/warehouse.h:130: (style) Class 'Warehouse' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/logic/map_objects/tribes/warehouse.h:247: (style) Class 'AttackTarget' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/ai/ai_help_structs.h:174: (style) Struct 'FindNodeWater' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/ai/ai_help_structs.h:186: (style) Struct 'FindNodeOpenWater' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/ai/ai_help_structs.h:231: (style) Struct 'BuildableField' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/ai/ai_help_structs.h:291: (style) Struct 'MineableField' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/ai/ai_help_structs.h:302: (style) Struct 'EconomyObserver' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/ai/ai_help_structs.h:520: (style) Struct 'FlagsForRoads' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/economy/trackptr.h:97: (warning) The class 'BaseTrackPtr' has 'copy constructor' but lack of 'operator='.
src/base/md5.h:75: (warning) The class 'MD5Checksum < StreamWrite >' has 'copy constructor' but lack of 'operator='.
src/notifications/notifications_impl.h:38: (performance) Parameter 'callback' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/graphic/texture_atlas.h:46: (performance) Parameter 'init_texture' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/map_objects/tribes/tribe_basic_info.h:37: (performance) Parameter 'init_script' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/map_objects/tribes/tribe_basic_info.h:37: (performance) Parameter 'init_descname' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/map_objects/tribes/tribe_basic_info.h:37: (performance) Parameter 'init_tooltip' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/economy/economy.h:113: (style) Class 'Economy' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/ai/defaultai.cc:1842: (warning) Non-pure function: 'aimode_limit_status' is called inside assert statement. Assert statements are removed from release builds so the code inside assert statement is not executed. If the code is needed also in release builds, this is a bug.
src/logic/playercommand.h:221: (warning) Member variable 'CmdMilitarySiteSetSoldierPreference::preference' is not initialized in the constructor.
src/logic/playercommand.h:346: (warning) Member variable 'CmdShipScoutDirection::dir' is not initialized in the constructor.
src/logic/playercommand.h:394: (warning) Member variable 'CmdShipExploreIsland::island_explore_direction' is not initialized in the constructor.
src/logic/findbob.h:30: (style) Struct 'FindBobAttribute' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/logic/findbob.h:45: (style) Struct 'FindBobEnemySoldier' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/logic/playercommand.h:85: (style) Struct 'CmdBulldoze' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/logic/playercommand.h:109: (style) Struct 'CmdBuild' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/logic/playercommand.h:133: (style) Struct 'CmdBuildFlag' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/logic/playercommand.h:153: (style) Struct 'CmdBuildRoad' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/logic/playercommand.h:188: (style) Struct 'CmdFlagAction' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/logic/playercommand.h:211: (style) Struct 'CmdStartStopBuilding' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/logic/playercommand.h:237: (style) Struct 'CmdMilitarySiteSetSoldierPreference' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/logic/playercommand.h:260: (style) Struct 'CmdStartOrCancelExpedition' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/logic/playercommand.h:287: (style) Struct 'CmdEnhanceBuilding' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/logic/playercommand.h:312: (style) Struct 'CmdDismantleBuilding' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/logic/playercommand.h:336: (style) Struct 'CmdEvictWorker' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/logic/playercommand.h:359: (style) Struct 'CmdShipScoutDirection' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/logic/playercommand.h:383: (style) Struct 'CmdShipConstructPort' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/logic/playercommand.h:410: (style) Struct 'CmdShipExploreIsland' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/logic/playercommand.h:433: (style) Struct 'CmdShipSink' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/logic/playercommand.h:456: (style) Struct 'CmdShipCancelExpedition' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/logic/playercommand.h:484: (style) Struct 'CmdSetWarePriority' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/logic/playercommand.h:514: (style) Struct 'CmdSetInputMaxFill' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/logic/playercommand.h:538: (style) Struct 'CmdChangeTargetQuantity' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/logic/playercommand.h:572: (style) Struct 'CmdSetWareTargetQuantity' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/logic/playercommand.h:597: (style) Struct 'CmdResetWareTargetQuantity' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/logic/playercommand.h:620: (style) Struct 'CmdSetWorkerTargetQuantity' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/logic/playercommand.h:645: (style) Struct 'CmdResetWorkerTargetQuantity' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/logic/playercommand.h:671: (style) Struct 'CmdChangeTrainingOptions' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/logic/playercommand.h:697: (style) Struct 'CmdDropSoldier' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/logic/playercommand.h:722: (style) Struct 'CmdChangeSoldierCapacity' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/logic/playercommand.h:748: (style) Struct 'CmdEnemyFlagAction' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/logic/playercommand.h:769: (style) Struct 'PlayerMessageCommand' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/logic/playercommand.h:790: (style) Struct 'CmdMessageSetStatusRead' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/logic/playercommand.h:808: (style) Struct 'CmdMessageSetStatusArchived' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/logic/playercommand.h:833: (style) Struct 'CmdSetStockPolicy' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/economy/fleet.h:128] -> [src/logic/map_objects/map_object.h:421: (warning) The struct 'Fleet' defines member variable with name 'owner_' also defined in its parent class 'MapObject'.
src/economy/fleet.h:78: (style) Struct 'Fleet' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/ai/defaultai_warfare.cc:709: (style) The scope of the variable 'health' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced:
void f(int x) { int i = 0; if (x) { // it's safe to move 'int i = 0;' here for (int n = 0; n < 10; ++n) { // it is possible but not safe to move 'int i = 0;' here do_something(&i); } } } When you see this message it is always safe to reduce the variable scope 1 level. src/ai/defaultai_warfare.cc:710: (style) The scope of the variable 'attack' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced:
void f(int x) { int i = 0; if (x) { // it's safe to move 'int i = 0;' here for (int n = 0; n < 10; ++n) { // it is possible but not safe to move 'int i = 0;' here do_something(&i); } } } When you see this message it is always safe to reduce the variable scope 1 level. src/ai/defaultai_warfare.cc:711: (style) The scope of the variable 'defense' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced:
void f(int x) { int i = 0; if (x) { // it's safe to move 'int i = 0;' here for (int n = 0; n < 10; ++n) { // it is possible but not safe to move 'int i = 0;' here do_something(&i); } } } When you see this message it is always safe to reduce the variable scope 1 level. src/ai/defaultai_warfare.cc:712: (style) The scope of the variable 'evade' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced:
void f(int x) { int i = 0; if (x) { // it's safe to move 'int i = 0;' here for (int n = 0; n < 10; ++n) { // it is possible but not safe to move 'int i = 0;' here do_something(&i); } } } When you see this message it is always safe to reduce the variable scope 1 level. src/base/i18n.cc:243: (style) Variable 'alt_str' is assigned a value that is never used.
src/base/i18n.cc:79: (performance) Parameter 'dname' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/base/i18n.cc:70: (information) Skipping configuration 'DEFAULT_TEXT_DOMAIN' since the value of 'DEFAULT_TEXT_DOMAIN' is unknown. Use -D if you want to check it. You can use -U to skip it explicitly.
src/base/i18n.cc:73: (information) Skipping configuration 'DEFAULT_TEXT_DOMAIN' since the value of 'DEFAULT_TEXT_DOMAIN' is unknown. Use -D if you want to check it. You can use -U to skip it explicitly.
src/base/md5.h:77: (warning) Member variable 'MD5Checksum::sum' is not initialized in the constructor.
src/base/md5.h:75: (warning) The class 'MD5Checksum' has 'copy constructor' but lack of 'operator='.
src/base/time_string.cc:175: (style) Variable 'time' is assigned a value that is never used.
src/economy/economy.cc:359: (warning) Non-pure function: 'egbase' is called inside assert statement. Assert statements are removed from release builds so the code inside assert statement is not executed. If the code is needed also in release builds, this is a bug.
src/economy/economy.cc:408: (warning) Non-pure function: 'has_request' is called inside assert statement. Assert statements are removed from release builds so the code inside assert statement is not executed. If the code is needed also in release builds, this is a bug.
src/economy/router.h:41: (style) Struct 'Router' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/economy/warehousesupply.h:34: (style) Struct 'WarehouseSupply' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/economy/trackptr.h:163: (style) Struct 'TrackPtr < Request >' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/economy/trackptr.h:163: (style) Struct 'TrackPtr < Supply >' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/economy/economy_data_packet.h:34: (style) Class 'EconomyDataPacket' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/economy/expedition_bootstrap.h:52: (style) Class 'ExpeditionBootstrap' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/economy/expedition_bootstrap.h:121: (style) Struct 'NoteExpeditionCanceled' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/economy/fleet.cc:804: (style) The scope of the variable 'best_score' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced:
void f(int x) { int i = 0; if (x) { // it's safe to move 'int i = 0;' here for (int n = 0; n < 10; ++n) { // it is possible but not safe to move 'int i = 0;' here do_something(&i); } } } When you see this message it is always safe to reduce the variable scope 1 level. src/logic/pathfield.h:69: (style) Struct 'Pathfields' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/logic/mapastar.h:30: (style) Struct 'MapAStarBase' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/logic/mapastar.h:52: (style) Struct 'StepEvalAStar' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/logic/mapastar.h:161: (style) Suspicious calculation. Please use parentheses to clarify the code. The code ''a&b?c:d'' should be written as either ''(a&b)?c:d'' or ''a&(b?c:d)''.
src/logic/widelands_geometry_io.h:37: (style) Struct 'DirectionInvalid' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/economy/test/test_routing.cc:185: (style) struct 'TestingNodeDefaultNodesFixture' does not have a copy constructor which is recommended since the class contains a pointer to allocated memory.
src/economy/test/test_routing.cc:227: (style) struct 'SimpleRouterFixture' does not have a copy constructor which is recommended since the class contains a pointer to allocated memory.
src/economy/test/test_routing.cc:374: (style) struct 'ComplexRouterFixture' does not have a copy constructor which is recommended since the class contains a pointer to allocated memory.
src/economy/transfer.cc:194: (warning) Non-pure function: 'get_flag' is called inside assert statement. Assert statements are removed from release builds so the code inside assert statement is not executed. If the code is needed also in release builds, this is a bug.
src/economy/transfer.cc:199: (warning) Non-pure function: 'get_flag' is called inside assert statement. Assert statements are removed from release builds so the code inside assert statement is not executed. If the code is needed also in release builds, this is a bug.
src/economy/ware_instance.cc:519: (warning) Member variable 'Loader::location_' is not initialized in the constructor.
src/economy/ware_instance.cc:49: (style) Struct 'IdleWareSupply' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/economy/workers_queue.cc:82: (warning) Non-pure function: 'get_location' is called inside assert statement. Assert statements are removed from release builds so the code inside assert statement is not executed. If the code is needed also in release builds, this is a bug.
src/economy/workers_queue.cc:133: (warning) Non-pure function: 'get_location' is called inside assert statement. Assert statements are removed from release builds so the code inside assert statement is not executed. If the code is needed also in release builds, this is a bug.
src/economy/workers_queue.cc:146: (warning) Non-pure function: 'get_location' is called inside assert statement. Assert statements are removed from release builds so the code inside assert statement is not executed. If the code is needed also in release builds, this is a bug.
src/ui_basic/table.h:123: (style) The class 'Table < void * >' does not have a constructor although it has private member variables. Member variables of builtin types are left uninitialized when the class is instantiated. That may cause bugs or undefined behavior.
src/editor/tools/tool_action.h:64: (style) Value of pointer 'args', which points to allocated memory, is copied in copy constructor instead of allocating new memory.
src/editor/tools/action_args.h:39: (style) Struct 'EditorActionArgs' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/graphic/text/font_set.h:40: (style) Struct 'FontSet' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/graphic/rendertarget.h:53: (style) Class 'RenderTarget' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/graphic/text/rendered_text.h:68: (style) Class 'RenderedRect' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/graphic/text/rendered_text.h:72: (style) Class 'RenderedRect' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/editor/tools/place_critter_tool.h:28: (style) Struct 'EditorPlaceCritterTool' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/editor/tools/place_immovable_tool.h:30: (style) Struct 'EditorPlaceImmovableTool' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/editor/tools/set_port_space_tool.h:54: (style) Class 'EditorSetPortSpaceTool' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/profile/profile.h:185: (style) Class 'Profile' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/sound/fxset.h:48: (style) Struct 'FXset' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/wui/quicknavigation.h:47: (style) Struct 'QuickNavigation' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/editor/editorinteractive.h:89: (style) Class 'EditorInteractive' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/ui_basic/table.h:126: (style) Struct 'EntryRecord' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/wui/mapdata.h:48: (style) Struct 'MapAuthorData' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/editor/ui_menus/main_menu_load_map.h:32: (style) Struct 'MainMenuLoadMap' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/editor/ui_menus/main_menu_save_map.h:35: (style) Struct 'MainMenuSaveMap' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/ui_basic/progresswindow.h:50: (style) Struct 'ProgressWindow' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/editor/tools/tool_action.h:34: (warning) The struct 'EditorToolAction' has 'copy constructor' but lack of 'operator='.
src/editor/tools/tool_action.h:49: (performance) Parameter 'nargs' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/map_objects/world/map_gen.h:76: (style) Struct 'MapGenBobCategory' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/editor/tools/info_tool.cc:107] -> [src/editor/tools/info_tool.cc:108: (style) Variable 'temp' is reassigned a value before the old one has been used.
src/logic/map_objects/world/editor_category.h:36: (style) Class 'EditorCategory' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/editor/tools/info_tool.cc:179: (error) Memory leak: multiline_textarea
src/logic/map_objects/world/critter.h:70: (style) Class 'Critter' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/logic/maptriangleregion.h:65: (style) The struct 'MapTriangleRegion < FCoords >' does not have a constructor although it has private member variables. Member variables of builtin types are left uninitialized when the class is instantiated. That may cause bugs or undefined behavior.
src/editor/ui_menus/main_menu_new_map.h:38: (style) Struct 'MainMenuNewMap' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/editor/ui_menus/main_menu_random_map.h:48: (style) Struct 'MainMenuNewRandomMap' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/third_party/minizip/ioapi.h:45: (information) Skipping configuration 'CALLBACK;USEWINDOWS_CALLBACK;_WIN32' since the value of 'CALLBACK' is unknown. Use -D if you want to check it. You can use -U to skip it explicitly.
src/third_party/minizip/ioapi.h:46: (information) Skipping configuration 'CALLBACK;USEWINDOWS_CALLBACK;_WIN32' since the value of 'CALLBACK' is unknown. Use -D if you want to check it. You can use -U to skip it explicitly.
src/third_party/minizip/ioapi.h:47: (information) Skipping configuration 'CALLBACK;USEWINDOWS_CALLBACK;_WIN32' since the value of 'CALLBACK' is unknown. Use -D if you want to check it. You can use -U to skip it explicitly.
src/third_party/minizip/ioapi.h:49: (information) Skipping configuration 'CALLBACK;USEWINDOWS_CALLBACK;_WIN32' since the value of 'CALLBACK' is unknown. Use -D if you want to check it. You can use -U to skip it explicitly.
src/third_party/minizip/ioapi.h:50: (information) Skipping configuration 'CALLBACK;USEWINDOWS_CALLBACK;_WIN32' since the value of 'CALLBACK' is unknown. Use -D if you want to check it. You can use -U to skip it explicitly.
src/third_party/minizip/ioapi.h:52: (information) Skipping configuration 'CALLBACK;USEWINDOWS_CALLBACK;_WIN32' since the value of 'CALLBACK' is unknown. Use -D if you want to check it. You can use -U to skip it explicitly.
src/third_party/minizip/ioapi.h:53: (information) Skipping configuration 'CALLBACK;USEWINDOWS_CALLBACK;_WIN32' since the value of 'CALLBACK' is unknown. Use -D if you want to check it. You can use -U to skip it explicitly.
src/io/filesystem/zip_filesystem.h:75: (style) Class 'ZipFile' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/editor/ui_menus/categorized_item_selection_menu.h:54: (performance) Parameter 'select_correct_tool' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/editor/ui_menus/toolsize_menu.cc:89: (warning) Non-pure function: 'eia' is called inside assert statement. Assert statements are removed from release builds so the code inside assert statement is not executed. If the code is needed also in release builds, this is a bug.
src/editor/ui_menus/toolsize_menu.cc:93: (warning) Non-pure function: 'eia' is called inside assert statement. Assert statements are removed from release builds so the code inside assert statement is not executed. If the code is needed also in release builds, this is a bug.
src/game_io/game_preload_packet.h:38: (style) The struct 'GamePreloadPacket' does not have a constructor although it has private member variables. Member variables of builtin types are left uninitialized when the class is instantiated. That may cause bugs or undefined behavior.
src/logic/playersmanager.h:60: (style) Class 'PlayersManager' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/graphic/image_io.h:35: (style) Class 'ImageNotFound' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/graphic/animation.cc:64: (style) Class 'NonPackedAnimation' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/graphic/text/transient_cache.h:47: (style) Class 'TransientCache' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/graphic/text/texture_cache.h:30: (style) Class 'TextureCache' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/graphic/font_handler1.cc:61: (style) Class 'RenderCache' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/graphic/gl/fields_to_draw.h:80: (warning) Member variable 'FieldsToDraw::min_fx_' is not initialized in the constructor.
src/graphic/gl/fields_to_draw.h:80: (warning) Member variable 'FieldsToDraw::max_fx_' is not initialized in the constructor.
src/graphic/gl/fields_to_draw.h:80: (warning) Member variable 'FieldsToDraw::min_fy_' is not initialized in the constructor.
src/graphic/gl/fields_to_draw.h:80: (warning) Member variable 'FieldsToDraw::max_fy_' is not initialized in the constructor.
src/graphic/gl/fields_to_draw.h:80: (warning) Member variable 'FieldsToDraw::w_' is not initialized in the constructor.
src/graphic/gl/fields_to_draw.h:80: (warning) Member variable 'FieldsToDraw::h_' is not initialized in the constructor.
src/graphic/render_queue.h:116: (warning) Member variable 'TerrainArguments::gametime' is not initialized in the constructor.
src/graphic/render_queue.h:116: (warning) Member variable 'TerrainArguments::renderbuffer_width' is not initialized in the constructor.
src/graphic/render_queue.h:116: (warning) Member variable 'TerrainArguments::renderbuffer_height' is not initialized in the constructor.
src/graphic/render_queue.h:116: (warning) Member variable 'TerrainArguments::terrains' is not initialized in the constructor.
src/graphic/render_queue.h:116: (warning) Member variable 'TerrainArguments::fields_to_draw' is not initialized in the constructor.
src/graphic/render_queue.h:116: (warning) Member variable 'TerrainArguments::scale' is not initialized in the constructor.
src/graphic/gl/utils.cc:84: (style) Class 'Shader' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/graphic/graphic.cc:62: (warning) Member variable 'Graphic::window_mode_width_' is not initialized in the constructor.
src/graphic/graphic.cc:62: (warning) Member variable 'Graphic::window_mode_height_' is not initialized in the constructor.
src/graphic/graphic.cc:62: (warning) Member variable 'Graphic::sdl_window_' is not initialized in the constructor.
src/graphic/graphic.cc:62: (warning) Member variable 'Graphic::max_texture_size_' is not initialized in the constructor.
src/graphic/image_io.cc:80: (performance) The conversion from const char* as returned by c_str() to std::string creates an unnecessary string copy. Solve that by directly passing the string.
src/graphic/minimap_renderer.cc:165: (style) Suspicious calculation. Please use parentheses to clarify the code. The code ''a&b?c:d'' should be written as either ''(a&b)?c:d'' or ''a&(b?c:d)''.
src/graphic/render_queue.cc:123: (style) Class 'ScopedScissor' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/graphic/richtext.cc:242: (style) Struct 'TextBuilder' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/graphic/text/bidi.cc:617: (style) The exception is caught by value. It could be caught as a (const) reference which is usually recommended in C++.
src/graphic/text/bidi.cc:643: (style) The exception is caught by value. It could be caught as a (const) reference which is usually recommended in C++.
src/graphic/text/rt_errors.h:31: (style) Class 'Exception' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/graphic/text/rt_errors.h:48: (style) Class 'AttributeNotFound' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/graphic/text/rt_errors.h:49: (style) Class 'BadFont' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/graphic/text/rt_errors.h:50: (style) Class 'EndOfText' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/graphic/text/rt_errors.h:51: (style) Class 'InvalidColor' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/graphic/text/rt_errors.h:52: (style) Class 'RenderError' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/graphic/text/rt_errors.h:53: (style) Class 'SyntaxError' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/graphic/text/rt_errors.h:54: (style) Class 'TextureTooBig' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/graphic/text/rt_errors.h:55: (style) Class 'WidthTooSmall' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/graphic/text/rt_errors.h:31: (performance) Parameter 'msg' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/graphic/text/rt_errors.h:48: (performance) Parameter 'msg' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/graphic/text/rt_errors.h:49: (performance) Parameter 'msg' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/graphic/text/rt_errors.h:50: (performance) Parameter 'msg' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/graphic/text/rt_errors.h:51: (performance) Parameter 'msg' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/graphic/text/rt_errors.h:52: (performance) Parameter 'msg' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/graphic/text/rt_errors.h:53: (performance) Parameter 'msg' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/graphic/text/rt_errors.h:54: (performance) Parameter 'msg' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/graphic/text/rt_errors.h:55: (performance) Parameter 'msg' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/graphic/text/rendered_text.cc:58: (warning) Member variable 'RenderedRect::permanent_image_' is not initialized in the constructor.
src/graphic/text/rendered_text.cc:58: (warning) Member variable 'RenderedRect::visited_' is not initialized in the constructor.
src/graphic/text/rendered_text.cc:58: (warning) Member variable 'RenderedRect::is_background_color_set_' is not initialized in the constructor.
src/graphic/text/rendered_text.cc:58: (warning) Member variable 'RenderedRect::mode_' is not initialized in the constructor.
src/graphic/text/rendered_text.cc:61: (warning) Member variable 'RenderedRect::permanent_image_' is not initialized in the constructor.
src/graphic/text/rendered_text.cc:61: (warning) Member variable 'RenderedRect::visited_' is not initialized in the constructor.
src/graphic/text/rendered_text.cc:61: (warning) Member variable 'RenderedRect::is_background_color_set_' is not initialized in the constructor.
src/graphic/text/rendered_text.cc:61: (warning) Member variable 'RenderedRect::mode_' is not initialized in the constructor.
src/graphic/text/rendered_text.cc:64: (warning) Member variable 'RenderedRect::permanent_image_' is not initialized in the constructor.
src/graphic/text/rendered_text.cc:64: (warning) Member variable 'RenderedRect::visited_' is not initialized in the constructor.
src/graphic/text/rendered_text.cc:64: (warning) Member variable 'RenderedRect::is_background_color_set_' is not initialized in the constructor.
src/graphic/text/rendered_text.cc:64: (warning) Member variable 'RenderedRect::mode_' is not initialized in the constructor.
src/graphic/text/rendered_text.cc:72: (warning) Member variable 'RenderedRect::permanent_image_' is not initialized in the constructor.
src/graphic/text/rendered_text.cc:72: (warning) Member variable 'RenderedRect::visited_' is not initialized in the constructor.
src/graphic/text/rendered_text.cc:72: (warning) Member variable 'RenderedRect::is_background_color_set_' is not initialized in the constructor.
src/graphic/text/rendered_text.cc:72: (warning) Member variable 'RenderedRect::mode_' is not initialized in the constructor.
src/graphic/text/rendered_text.cc:30: (performance) Parameter 'init_image' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/graphic/text/rendered_text.cc:64: (performance) Parameter 'init_image' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/graphic/text/rt_parse.h:105: (style) Struct 'Child' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/graphic/text/rt_parse.h:107: (style) Struct 'Child' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/graphic/text/textstream.h:31: (style) Class 'TextStream' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/graphic/text/rt_parse.h:107: (performance) Parameter 't' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/graphic/text/rt_errors_impl.h:31: (performance) Parameter 'expected' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/graphic/text/rt_errors_impl.h:31: (performance) Parameter 'got' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/graphic/text/rt_errors_impl.h:31: (performance) Parameter 'next_chars' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/graphic/text/textstream.h:31: (performance) Parameter 'text' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/graphic/text/rt_render.cc:779: (warning) Member variable 'DivTagRenderNode::w_' is not initialized in the constructor.
src/graphic/text/rt_render.cc:779: (warning) Member variable 'DivTagRenderNode::h_' is not initialized in the constructor.
src/graphic/text/rt_render.cc:202: (style) Class 'RefMap' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/graphic/text/rt_render.cc:224: (style) Class 'RenderNode' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/graphic/text/rt_render.cc:318: (style) Class 'Layout' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/graphic/text/rt_render.cc:671: (style) Class 'NewlineNode' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/graphic/text/rt_render.cc:779: (style) Class 'DivTagRenderNode' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/graphic/text/rt_render.cc:972: (performance) Parameter 'ns' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/graphic/text/rt_render.cc:1103: (performance) Parameter 'ns' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/graphic/text/rt_render.cc:1135: (performance) Parameter 'ns' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/graphic/text/rt_render.cc:1189: (performance) Parameter 'ns' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/graphic/text/rt_render.cc:1234: (performance) Parameter 'ns' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/graphic/text/rt_render.cc:1259: (performance) Parameter 'ns' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/graphic/text/rt_render.cc:1320: (performance) Parameter 'ns' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/graphic/text/rt_render.cc:1336: (performance) Parameter 'ns' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/graphic/text/rt_render.cc:1506: (performance) Parameter 'ns' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/graphic/text/textstream.cc:32: (performance) Parameter 'text' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/graphic/text/textstream.cc:136: (performance) Parameter 'chars' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/graphic/text_parser.h:125: (warning) The struct 'RichtextBlock' has 'copy constructor' but lack of 'operator='.
src/io/filesystem/disk_filesystem.h:31: (style) Class 'RealFSImpl' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/io/filesystem/disk_filesystem.cc:56: (style) Struct 'FileSystemPath' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/io/filesystem/disk_filesystem.cc:453: (style) Struct 'RealFSStreamRead' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/io/filesystem/disk_filesystem.cc:490: (style) Struct 'RealFSStreamWrite' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/io/filesystem/filesystem.cc:205: (performance) Either inefficient or wrong usage of string::find(). string::compare() will be faster if string::find's result is compared with 0, because it will not scan the whole string. If your intention is to check that there are no findings in the string, you should compare with std::string::npos.
src/io/filesystem/filesystem.cc:361: (information) Skipping configuration 'ELOOP' since the value of 'ELOOP' is unknown. Use -D if you want to check it. You can use -U to skip it explicitly.
src/io/filesystem/zip_filesystem.cc:376: (performance) The conversion from const char* as returned by c_str() to std::string creates an unnecessary string copy. Solve that by directly passing the string.
src/io/streamread.cc:96: (warning) Redundant assignment of 'x' to itself.
src/logic/cmd_calculate_statistics.h:32: (style) Struct 'CmdCalculateStatistics' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/logic/cmd_luacoroutine.h:34: (performance) Parameter 'cr' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/game.cc:191: (warning) Non-pure function: 'get_map' is called inside assert statement. Assert statements are removed from release builds so the code inside assert statement is not executed. If the code is needed also in release builds, this is a bug.
src/logic/game.cc:251: (warning) Non-pure function: 'get_map' is called inside assert statement. Assert statements are removed from release builds so the code inside assert statement is not executed. If the code is needed also in release builds, this is a bug.
src/logic/game.cc:324: (warning) Non-pure function: 'get_map' is called inside assert statement. Assert statements are removed from release builds so the code inside assert statement is not executed. If the code is needed also in release builds, this is a bug.
src/logic/game.cc:119: (warning) Member variable 'Game::replay_' is not initialized in the constructor.
src/network/network.h:170: (style) The struct 'RecvPacket' does not have a constructor although it has private member variables. Member variables of builtin types are left uninitialized when the class is instantiated. That may cause bugs or undefined behavior.
src/logic/map.cc:1266: (style) The scope of the variable 'is_good_water' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced:
void f(int x) { int i = 0; if (x) { // it's safe to move 'int i = 0;' here for (int n = 0; n < 10; ++n) { // it is possible but not safe to move 'int i = 0;' here do_something(&i); } } } When you see this message it is always safe to reduce the variable scope 1 level. src/logic/map.cc:1657: (style) Suspicious calculation. Please use parentheses to clarify the code. The code ''a&b?c:d'' should be written as either ''(a&b)?c:d'' or ''a&(b?c:d)''.
src/logic/map.cc:1680: (style) Suspicious calculation. Please use parentheses to clarify the code. The code ''a&b?c:d'' should be written as either ''(a&b)?c:d'' or ''a&(b?c:d)''.
src/logic/map_objects/bob.cc:236: (warning) Non-pure function: 'get_state' is called inside assert statement. Assert statements are removed from release builds so the code inside assert statement is not executed. If the code is needed also in release builds, this is a bug.
src/logic/map_objects/bob.cc:475: (style) Struct 'CheckStepBlocked' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/logic/map_objects/bob.cc:545: (error) Memory leak: state.path
src/logic/map_objects/bob.cc:565: (error) Memory leak: state.path
src/logic/map_objects/immovable.cc:253: (warning) Member variable 'ImmovableDescr::size_' is not initialized in the constructor.
src/logic/map_objects/immovable.cc:253: (warning) Member variable 'ImmovableDescr::owner_type_' is not initialized in the constructor.
src/logic/map_objects/immovable.cc:273: (warning) Member variable 'ImmovableDescr::size_' is not initialized in the constructor.
src/logic/map_objects/immovable.cc:273: (warning) Member variable 'ImmovableDescr::owner_type_' is not initialized in the constructor.
src/logic/map_objects/immovable.cc:273: (warning) Member variable 'ImmovableDescr::editor_category_' is not initialized in the constructor.
src/logic/map_objects/tribes/battle.cc:56: (warning) Member variable 'Battle::creationtime_' is not initialized in the constructor.
src/logic/map_objects/tribes/battle.cc:56: (warning) Member variable 'Battle::last_attack_hits_' is not initialized in the constructor.
src/logic/map_objects/tribes/building.cc:231: (warning) Member variable 'Building::priority_' is not initialized in the constructor.
src/logic/map_objects/tribes/carrier.cc:173: (warning) Non-pure function: 'get_location' is called inside assert statement. Assert statements are removed from release builds so the code inside assert statement is not executed. If the code is needed also in release builds, this is a bug.
src/logic/map_objects/tribes/ship.cc:1088: (warning) Member variable 'Loader::ship_state_' is not initialized in the constructor.
src/logic/map_objects/tribes/ship.h:260: (style) Unused private function: 'Ship::ship_update'
src/logic/map_objects/tribes/ship.h:268: (style) Unused private function: 'Ship::set_fleet'
src/logic/map_objects/tribes/ship.cc:451: (style) Suspicious calculation. Please use parentheses to clarify the code. The code ''a&b?c:d'' should be written as either ''(a&b)?c:d'' or ''a&(b?c:d)''.
src/logic/map_objects/tribes/soldier.cc:653: (style) Struct 'FindNodeOwned' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/logic/map_objects/tribes/trainingsite.cc:327: (style) Condition 'soldiers_.size()>=capacity_' is always true
src/logic/map_objects/tribes/trainingsite.cc:228: (warning) Non-pure function: 'get_state' is called inside assert statement. Assert statements are removed from release builds so the code inside assert statement is not executed. If the code is needed also in release builds, this is a bug.
src/logic/map_objects/tribes/trainingsite.cc:353: (warning) Non-pure function: 'get_location' is called inside assert statement. Assert statements are removed from release builds so the code inside assert statement is not executed. If the code is needed also in release builds, this is a bug.
src/logic/map_objects/tribes/warehouse.cc:1285: (warning) Non-pure function: 'expedition_bootstrap' is called inside assert statement. Assert statements are removed from release builds so the code inside assert statement is not executed. If the code is needed also in release builds, this is a bug.
src/logic/map_objects/tribes/worker.cc:1880: (warning) Non-pure function: 'base_flag' is called inside assert statement. Assert statements are removed from release builds so the code inside assert statement is not executed. If the code is needed also in release builds, this is a bug.
src/logic/map_objects/tribes/worker.cc:465: (style) Struct 'FindNodeSpace' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/logic/map_objects/tribes/worker.cc:2206: (style) Struct 'FindFlagWithPlayersWarehouse' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/logic/map_objects/tribes/worker_program.h:77: (style) Unused private function: 'WorkerProgram::parse_mine'
src/logic/map_objects/tribes/worker_program.h:78: (style) Unused private function: 'WorkerProgram::parse_breed'
src/logic/map_objects/tribes/worker_program.h:79: (style) Unused private function: 'WorkerProgram::parse_createware'
src/logic/map_objects/tribes/worker_program.h:80: (style) Unused private function: 'WorkerProgram::parse_setbobdescription'
src/logic/map_objects/tribes/worker_program.h:81: (style) Unused private function: 'WorkerProgram::parse_findobject'
src/logic/map_objects/tribes/worker_program.h:82: (style) Unused private function: 'WorkerProgram::parse_findspace'
src/logic/map_objects/tribes/worker_program.h:83: (style) Unused private function: 'WorkerProgram::parse_walk'
src/logic/map_objects/tribes/worker_program.h:84: (style) Unused private function: 'WorkerProgram::parse_animation'
src/logic/map_objects/tribes/worker_program.h:85: (style) Unused private function: 'WorkerProgram::parse_return'
src/logic/map_objects/tribes/worker_program.h:86: (style) Unused private function: 'WorkerProgram::parse_object'
src/logic/map_objects/tribes/worker_program.h:87: (style) Unused private function: 'WorkerProgram::parse_plant'
src/logic/map_objects/tribes/worker_program.h:88: (style) Unused private function: 'WorkerProgram::parse_create_bob'
src/logic/map_objects/tribes/worker_program.h:89: (style) Unused private function: 'WorkerProgram::parse_removeobject'
src/logic/map_objects/tribes/worker_program.h:90: (style) Unused private function: 'WorkerProgram::parse_geologist'
src/logic/map_objects/tribes/worker_program.h:91: (style) Unused private function: 'WorkerProgram::parse_geologist_find'
src/logic/map_objects/tribes/worker_program.h:92: (style) Unused private function: 'WorkerProgram::parse_scout'
src/logic/map_objects/tribes/worker_program.h:93: (style) Unused private function: 'WorkerProgram::parse_play_sound'
src/logic/map_objects/tribes/worker_program.h:94: (style) Unused private function: 'WorkerProgram::parse_construct'
src/logic/map_objects/world/critter.h:90: (style) Unused private function: 'Critter::roam_update'
src/logic/map_objects/world/critter.h:91: (style) Unused private function: 'Critter::program_update'
src/logic/map_objects/world/critter.h:93: (style) Unused private function: 'Critter::run_remove'
src/logic/map_objects/world/critter_program.h:44: (style) Struct 'CritterProgram' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/logic/map_objects/world/critter.cc:61: (error) Uninitialized struct member: act.iparam1
src/logic/map_objects/world/critter.cc:61: (error) Uninitialized struct member: act.iparam2
src/logic/map_objects/world/map_gen.cc:85: (warning) Member variable 'MapGenAreaInfo::areaType_' is not initialized in the constructor.
src/logic/map_revision.cc:27: (performance) When an object of a class is created, the constructors of all member variables are called consecutively in the order the variables are declared, even if you don't explicitly write them to the initialization list. You could avoid assigning 'map_creator_version' a value by passing the value to the constructor in the initialization list.
src/logic/player.cc:1065: (warning) Non-pure function: 'egbase' is called inside assert statement. Assert statements are removed from release builds so the code inside assert statement is not executed. If the code is needed also in release builds, this is a bug.
src/logic/player.cc:1066: (warning) Non-pure function: 'egbase' is called inside assert statement. Assert statements are removed from release builds so the code inside assert statement is not executed. If the code is needed also in release builds, this is a bug.
src/logic/player.cc:1067: (warning) Non-pure function: 'egbase' is called inside assert statement. Assert statements are removed from release builds so the code inside assert statement is not executed. If the code is needed also in release builds, this is a bug.
src/logic/player.cc:1100: (warning) Non-pure function: 'egbase' is called inside assert statement. Assert statements are removed from release builds so the code inside assert statement is not executed. If the code is needed also in release builds, this is a bug.
src/logic/player.cc:1101: (warning) Non-pure function: 'egbase' is called inside assert statement. Assert statements are removed from release builds so the code inside assert statement is not executed. If the code is needed also in release builds, this is a bug.
src/logic/player.cc:1109: (warning) Non-pure function: 'egbase' is called inside assert statement. Assert statements are removed from release builds so the code inside assert statement is not executed. If the code is needed also in release builds, this is a bug.
src/logic/player.cc:1127: (warning) Non-pure function: 'egbase' is called inside assert statement. Assert statements are removed from release builds so the code inside assert statement is not executed. If the code is needed also in release builds, this is a bug.
src/logic/player.cc:1128: (warning) Non-pure function: 'egbase' is called inside assert statement. Assert statements are removed from release builds so the code inside assert statement is not executed. If the code is needed also in release builds, this is a bug.
src/logic/player.cc:934: (warning) Result of operator '|' is always true if one operand is non-zero. Did you intend to use '&'?
src/logic/player.cc:936: (warning) Result of operator '|' is always true if one operand is non-zero. Did you intend to use '&'?
src/logic/player.cc:938: (warning) Result of operator '|' is always true if one operand is non-zero. Did you intend to use '&'?
src/logic/replay.cc:188: (style) Class 'CmdReplaySyncWrite' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/logic/replay_game_controller.h:49: (style) Struct 'CmdReplayEnd' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/logic/save_handler.cc:182: (style) Unused variable: error
src/logic/single_player_game_settings_provider.cc:48: (style) Suspicious expression. Boolean result is used in bitwise operation. The operator '!' and the comparison operators have higher precedence than bitwise operators. It is recommended that the expression is clarified with parentheses.
src/wlapplication.h:49: (performance) Parameter 'text' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/map_io/map_buildingdata_packet.cc:857: (warning) Non-pure function: 'get' is called inside assert statement. Assert statements are removed from release builds so the code inside assert statement is not executed. If the code is needed also in release builds, this is a bug.
src/map_io/map_elemental_packet.h:37: (style) The struct 'MapElementalPacket' does not have a constructor although it has private member variables. Member variables of builtin types are left uninitialized when the class is instantiated. That may cause bugs or undefined behavior.
src/map_io/map_flagdata_packet.cc:168: (warning) Non-pure function: 'is_object_saved' is called inside assert statement. Assert statements are removed from release builds so the code inside assert statement is not executed. If the code is needed also in release builds, this is a bug.
src/map_io/map_flagdata_packet.cc:206: (warning) Non-pure function: 'get_state' is called inside assert statement. Assert statements are removed from release builds so the code inside assert statement is not executed. If the code is needed also in release builds, this is a bug.
src/map_io/map_flagdata_packet.cc:207: (warning) Non-pure function: 'get_state' is called inside assert statement. Assert statements are removed from release builds so the code inside assert statement is not executed. If the code is needed also in release builds, this is a bug.
src/map_io/map_object_packet.h:46: (warning) Non-pure function: 'get_object' is called inside assert statement. Assert statements are removed from release builds so the code inside assert statement is not executed. If the code is needed also in release builds, this is a bug.
src/map_io/map_players_messages_packet.cc:113: (warning) Non-pure function: 'is_object_known' is called inside assert statement. Assert statements are removed from release builds so the code inside assert statement is not executed. If the code is needed also in release builds, this is a bug.
src/map_io/map_players_messages_packet.cc:115: (warning) Non-pure function: 'is_object_loaded' is called inside assert statement. Assert statements are removed from release builds so the code inside assert statement is not executed. If the code is needed also in release builds, this is a bug.
src/map_io/map_players_view_packet.cc:601: (style) Suspicious expression. Boolean result is used in bitwise operation. The operator '!' and the comparison operators have higher precedence than bitwise operators. It is recommended that the expression is clarified with parentheses.
src/map_io/map_players_view_packet.cc:607: (style) Suspicious expression. Boolean result is used in bitwise operation. The operator '!' and the comparison operators have higher precedence than bitwise operators. It is recommended that the expression is clarified with parentheses.
src/map_io/map_players_view_packet.cc:628: (style) Suspicious expression. Boolean result is used in bitwise operation. The operator '!' and the comparison operators have higher precedence than bitwise operators. It is recommended that the expression is clarified with parentheses.
src/map_io/map_players_view_packet.cc:634: (style) Suspicious expression. Boolean result is used in bitwise operation. The operator '!' and the comparison operators have higher precedence than bitwise operators. It is recommended that the expression is clarified with parentheses.
src/map_io/map_players_view_packet.cc:705: (style) Suspicious expression. Boolean result is used in bitwise operation. The operator '!' and the comparison operators have higher precedence than bitwise operators. It is recommended that the expression is clarified with parentheses.
src/map_io/map_players_view_packet.cc:739: (style) Suspicious expression. Boolean result is used in bitwise operation. The operator '!' and the comparison operators have higher precedence than bitwise operators. It is recommended that the expression is clarified with parentheses.
src/map_io/map_players_view_packet.cc:915: (style) Suspicious expression. Boolean result is used in bitwise operation. The operator '!' and the comparison operators have higher precedence than bitwise operators. It is recommended that the expression is clarified with parentheses.
src/map_io/map_players_view_packet.cc:925: (style) Suspicious expression. Boolean result is used in bitwise operation. The operator '!' and the comparison operators have higher precedence than bitwise operators. It is recommended that the expression is clarified with parentheses.
src/map_io/map_players_view_packet.cc:943: (style) Suspicious expression. Boolean result is used in bitwise operation. The operator '!' and the comparison operators have higher precedence than bitwise operators. It is recommended that the expression is clarified with parentheses.
src/map_io/map_players_view_packet.cc:953: (style) Suspicious expression. Boolean result is used in bitwise operation. The operator '!' and the comparison operators have higher precedence than bitwise operators. It is recommended that the expression is clarified with parentheses.
src/map_io/map_players_view_packet.cc:469: (warning) %u in format string (no. 2) requires 'unsigned int' but the argument type is 'signed char'.
src/map_io/map_players_view_packet.cc:171: (style) Struct 'TribeImmovableNonexistent' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/map_io/map_players_view_packet.cc:179: (style) Struct 'WorldImmovableNonexistent' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/map_io/map_players_view_packet.cc:185: (style) Struct 'BuildingNonexistent' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/map_io/s2map.cc:52: (style) struct member 'S2MapDescrHeader::magic' is never used.
src/map_io/s2map.cc:60: (style) struct member 'S2MapDescrHeader::bulk' is never used.
src/map_io/s2map.cc:1076: (style) Variable 'num_failed' is modified but its new value is never used.
src/map_io/s2map.cc:341: (warning) Member variable 'S2MapLoader::worldtype_' is not initialized in the constructor.
src/map_io/world_legacy_lookup_table.cc:130: (style) Class 'OneWorldLegacyLookupTable' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/network/network_lan_promotion.h:62: (style) Struct 'LanBase' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/network/gamehost.cc:922: (style) The scope of the variable 'client' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced:
void f(int x) { int i = 0; if (x) { // it's safe to move 'int i = 0;' here for (int n = 0; n < 10; ++n) { // it is possible but not safe to move 'int i = 0;' here do_something(&i); } } } When you see this message it is always safe to reduce the variable scope 1 level. src/network/gamehost.cc:136: (warning) Non-pure function: 'settings' is called inside assert statement. Assert statements are removed from release builds so the code inside assert statement is not executed. If the code is needed also in release builds, this is a bug.
src/network/gamehost.cc:142: (warning) Non-pure function: 'settings' is called inside assert statement. Assert statements are removed from release builds so the code inside assert statement is not executed. If the code is needed also in release builds, this is a bug.
src/network/network_player_settings_backend.h:28: (warning) Member variable 'NetworkPlayerSettingsBackend::tribe_selection_blocked' is not initialized in the constructor.
src/network/gamehost.cc:532: (warning) Member variable 'GameHostImpl::syncreport' is not initialized in the constructor.
src/network/nethost.h:122: (style) Struct 'Client' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/network/network_player_settings_backend.h:28: (style) Struct 'NetworkPlayerSettingsBackend' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/network/gamehost.cc:67: (style) Struct 'HostGameSettingsProvider' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/network/gamehost.cc:283: (style) Struct 'HostChatProvider' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/network/gamehost.cc:532: (style) Struct 'GameHostImpl' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/network/gamehost.cc:1847: (style) Suspicious calculation. Please use parentheses to clarify the code. The code ''a%b?c:d'' should be written as either ''(a%b)?c:d'' or ''a%(b?c:d)''.
src/network/gamehost.cc:914: (performance) Parameter 'name' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/network/gamehost.cc:944: (performance) Parameter 'reason' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/network/gamehost.cc:1759: (performance) The conversion from const char* as returned by c_str() to std::string creates an unnecessary string copy. Solve that by directly passing the string.
src/network/gamehost.cc:959: (performance) Ineffective call of function 'substr' because it returns a copy of the object. Use operator= instead.
src/network/internet_gaming.cc:809: (performance) Parameter 'msg' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/network/internet_gaming.cc:415: (information) Skipping configuration 'DEFAULT_TEXT_DOMAIN' since the value of 'DEFAULT_TEXT_DOMAIN' is unknown. Use -D if you want to check it. You can use -U to skip it explicitly.
src/network/netclient.h:82: (style) Class 'NetClient' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/network/nethost.h:108: (style) Class 'NetHost' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/notifications/test/notifications_test.cc:31: (style) Struct 'SimpleNote' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/profile/profile.cc:551: (performance) The conversion from const char* as returned by c_str() to std::string creates an unnecessary string copy. Solve that by directly passing the string.
src/scripting/lua_editor.h:36] -> [src/scripting/lua_bases.h:82: (warning) The class 'LuaPlayer' defines member variable with name 'className' also defined in its parent class 'LuaPlayerBase'.
src/scripting/lua_editor.h:36] -> [src/scripting/lua_bases.h:82: (warning) The class 'LuaPlayer' defines member variable with name 'Methods' also defined in its parent class 'LuaPlayerBase'.
src/scripting/lua_editor.h:36] -> [src/scripting/lua_bases.h:82: (warning) The class 'LuaPlayer' defines member variable with name 'Properties' also defined in its parent class 'LuaPlayerBase'.
src/scripting/lua_game.h:55] -> [src/scripting/lua_bases.h:82: (warning) The class 'LuaPlayer' defines member variable with name 'className' also defined in its parent class 'LuaPlayerBase'.
src/scripting/lua_game.h:55] -> [src/scripting/lua_bases.h:82: (warning) The class 'LuaPlayer' defines member variable with name 'Methods' also defined in its parent class 'LuaPlayerBase'.
src/scripting/lua_game.h:55] -> [src/scripting/lua_bases.h:82: (warning) The class 'LuaPlayer' defines member variable with name 'Properties' also defined in its parent class 'LuaPlayerBase'.
src/scripting/lua_bases.h:46: (style) Class 'LuaEditorGameBase' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/scripting/lua_bases.h:86: (style) Class 'LuaPlayerBase' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/scripting/lua_bases.h:89: (style) Class 'LuaPlayerBase' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/scripting/lua_editor.h:40: (style) Class 'LuaPlayer' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/scripting/lua_editor.h:42: (style) Class 'LuaPlayer' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/scripting/lua_game.h:59: (style) Class 'LuaPlayer' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/scripting/lua_game.h:61: (style) Class 'LuaPlayer' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/scripting/lua_game.h:120: (style) Class 'LuaObjective' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/scripting/lua_game.h:123: (style) Class 'LuaObjective' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/scripting/lua_game.h:167: (style) Class 'LuaMessage' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/scripting/lua_map.h:794: (performance) When an object of a class is created, the constructors of all member variables are called consecutively in the order the variables are declared, even if you don't explicitly write them to the initialization list. You could avoid assigning 'ptr_' a value by passing the value to the constructor in the initialization list.
src/scripting/lua_map.h:219] -> [src/scripting/lua_map.h:165: (warning) The class 'LuaImmovableDescription' defines member variable with name 'className' also defined in its parent class 'LuaMapObjectDescription'.
src/scripting/lua_map.h:219] -> [src/scripting/lua_map.h:165: (warning) The class 'LuaImmovableDescription' defines member variable with name 'Methods' also defined in its parent class 'LuaMapObjectDescription'.
src/scripting/lua_map.h:219] -> [src/scripting/lua_map.h:165: (warning) The class 'LuaImmovableDescription' defines member variable with name 'Properties' also defined in its parent class 'LuaMapObjectDescription'.
src/scripting/lua_map.h:261] -> [src/scripting/lua_map.h:165: (warning) The class 'LuaBuildingDescription' defines member variable with name 'className' also defined in its parent class 'LuaMapObjectDescription'.
src/scripting/lua_map.h:261] -> [src/scripting/lua_map.h:165: (warning) The class 'LuaBuildingDescription' defines member variable with name 'Methods' also defined in its parent class 'LuaMapObjectDescription'.
src/scripting/lua_map.h:261] -> [src/scripting/lua_map.h:165: (warning) The class 'LuaBuildingDescription' defines member variable with name 'Properties' also defined in its parent class 'LuaMapObjectDescription'.
src/scripting/lua_map.h:312] -> [src/scripting/lua_map.h:261: (warning) The class 'LuaConstructionSiteDescription' defines member variable with name 'className' also defined in its parent class 'LuaBuildingDescription'.
src/scripting/lua_map.h:312] -> [src/scripting/lua_map.h:261: (warning) The class 'LuaConstructionSiteDescription' defines member variable with name 'Methods' also defined in its parent class 'LuaBuildingDescription'.
src/scripting/lua_map.h:312] -> [src/scripting/lua_map.h:261: (warning) The class 'LuaConstructionSiteDescription' defines member variable with name 'Properties' also defined in its parent class 'LuaBuildingDescription'.
src/scripting/lua_map.h:332] -> [src/scripting/lua_map.h:261: (warning) The class 'LuaDismantleSiteDescription' defines member variable with name 'className' also defined in its parent class 'LuaBuildingDescription'.
src/scripting/lua_map.h:332] -> [src/scripting/lua_map.h:261: (warning) The class 'LuaDismantleSiteDescription' defines member variable with name 'Methods' also defined in its parent class 'LuaBuildingDescription'.
src/scripting/lua_map.h:332] -> [src/scripting/lua_map.h:261: (warning) The class 'LuaDismantleSiteDescription' defines member variable with name 'Properties' also defined in its parent class 'LuaBuildingDescription'.
src/scripting/lua_map.h:351] -> [src/scripting/lua_map.h:261: (warning) The class 'LuaProductionSiteDescription' defines member variable with name 'className' also defined in its parent class 'LuaBuildingDescription'.
src/scripting/lua_map.h:351] -> [src/scripting/lua_map.h:261: (warning) The class 'LuaProductionSiteDescription' defines member variable with name 'Methods' also defined in its parent class 'LuaBuildingDescription'.
src/scripting/lua_map.h:351] -> [src/scripting/lua_map.h:261: (warning) The class 'LuaProductionSiteDescription' defines member variable with name 'Properties' also defined in its parent class 'LuaBuildingDescription'.
src/scripting/lua_map.h:391] -> [src/scripting/lua_map.h:261: (warning) The class 'LuaMilitarySiteDescription' defines member variable with name 'className' also defined in its parent class 'LuaBuildingDescription'.
src/scripting/lua_map.h:391] -> [src/scripting/lua_map.h:261: (warning) The class 'LuaMilitarySiteDescription' defines member variable with name 'Methods' also defined in its parent class 'LuaBuildingDescription'.
src/scripting/lua_map.h:391] -> [src/scripting/lua_map.h:261: (warning) The class 'LuaMilitarySiteDescription' defines member variable with name 'Properties' also defined in its parent class 'LuaBuildingDescription'.
src/scripting/lua_map.h:424] -> [src/scripting/lua_map.h:351: (warning) The class 'LuaTrainingSiteDescription' defines member variable with name 'className' also defined in its parent class 'LuaProductionSiteDescription'.
src/scripting/lua_map.h:424] -> [src/scripting/lua_map.h:351: (warning) The class 'LuaTrainingSiteDescription' defines member variable with name 'Methods' also defined in its parent class 'LuaProductionSiteDescription'.
src/scripting/lua_map.h:424] -> [src/scripting/lua_map.h:351: (warning) The class 'LuaTrainingSiteDescription' defines member variable with name 'Properties' also defined in its parent class 'LuaProductionSiteDescription'.
src/scripting/lua_map.h:472] -> [src/scripting/lua_map.h:261: (warning) The class 'LuaWarehouseDescription' defines member variable with name 'className' also defined in its parent class 'LuaBuildingDescription'.
src/scripting/lua_map.h:472] -> [src/scripting/lua_map.h:261: (warning) The class 'LuaWarehouseDescription' defines member variable with name 'Methods' also defined in its parent class 'LuaBuildingDescription'.
src/scripting/lua_map.h:472] -> [src/scripting/lua_map.h:261: (warning) The class 'LuaWarehouseDescription' defines member variable with name 'Properties' also defined in its parent class 'LuaBuildingDescription'.
src/scripting/lua_map.h:504] -> [src/scripting/lua_map.h:165: (warning) The class 'LuaWareDescription' defines member variable with name 'className' also defined in its parent class 'LuaMapObjectDescription'.
src/scripting/lua_map.h:504] -> [src/scripting/lua_map.h:165: (warning) The class 'LuaWareDescription' defines member variable with name 'Methods' also defined in its parent class 'LuaMapObjectDescription'.
src/scripting/lua_map.h:504] -> [src/scripting/lua_map.h:165: (warning) The class 'LuaWareDescription' defines member variable with name 'Properties' also defined in its parent class 'LuaMapObjectDescription'.
src/scripting/lua_map.h:542] -> [src/scripting/lua_map.h:165: (warning) The class 'LuaWorkerDescription' defines member variable with name 'className' also defined in its parent class 'LuaMapObjectDescription'.
src/scripting/lua_map.h:542] -> [src/scripting/lua_map.h:165: (warning) The class 'LuaWorkerDescription' defines member variable with name 'Methods' also defined in its parent class 'LuaMapObjectDescription'.
src/scripting/lua_map.h:542] -> [src/scripting/lua_map.h:165: (warning) The class 'LuaWorkerDescription' defines member variable with name 'Properties' also defined in its parent class 'LuaMapObjectDescription'.
src/scripting/lua_map.h:582] -> [src/scripting/lua_map.h:542: (warning) The class 'LuaSoldierDescription' defines member variable with name 'className' also defined in its parent class 'LuaWorkerDescription'.
src/scripting/lua_map.h:582] -> [src/scripting/lua_map.h:542: (warning) The class 'LuaSoldierDescription' defines member variable with name 'Methods' also defined in its parent class 'LuaWorkerDescription'.
src/scripting/lua_map.h:582] -> [src/scripting/lua_map.h:542: (warning) The class 'LuaSoldierDescription' defines member variable with name 'Properties' also defined in its parent class 'LuaWorkerDescription'.
src/scripting/lua_map.h:830] -> [src/scripting/lua_map.h:789: (warning) The class 'LuaBaseImmovable' defines member variable with name 'className' also defined in its parent class 'LuaMapObject'.
src/scripting/lua_map.h:830] -> [src/scripting/lua_map.h:789: (warning) The class 'LuaBaseImmovable' defines member variable with name 'Methods' also defined in its parent class 'LuaMapObject'.
src/scripting/lua_map.h:830] -> [src/scripting/lua_map.h:789: (warning) The class 'LuaBaseImmovable' defines member variable with name 'Properties' also defined in its parent class 'LuaMapObject'.
src/scripting/lua_map.h:858] -> [src/scripting/lua_map.h:830: (warning) The class 'LuaPlayerImmovable' defines member variable with name 'className' also defined in its parent class 'LuaBaseImmovable'.
src/scripting/lua_map.h:858] -> [src/scripting/lua_map.h:830: (warning) The class 'LuaPlayerImmovable' defines member variable with name 'Methods' also defined in its parent class 'LuaBaseImmovable'.
src/scripting/lua_map.h:858] -> [src/scripting/lua_map.h:830: (warning) The class 'LuaPlayerImmovable' defines member variable with name 'Properties' also defined in its parent class 'LuaBaseImmovable'.
src/scripting/lua_map.h:887] -> [src/scripting/lua_map.h:858: (warning) The class 'LuaPortDock' defines member variable with name 'className' also defined in its parent class 'LuaPlayerImmovable'.
src/scripting/lua_map.h:887] -> [src/scripting/lua_map.h:858: (warning) The class 'LuaPortDock' defines member variable with name 'Methods' also defined in its parent class 'LuaPlayerImmovable'.
src/scripting/lua_map.h:887] -> [src/scripting/lua_map.h:858: (warning) The class 'LuaPortDock' defines member variable with name 'Properties' also defined in its parent class 'LuaPlayerImmovable'.
src/scripting/lua_map.h:914] -> [src/scripting/lua_map.h:858: (warning) The class 'LuaBuilding' defines member variable with name 'className' also defined in its parent class 'LuaPlayerImmovable'.
src/scripting/lua_map.h:914] -> [src/scripting/lua_map.h:858: (warning) The class 'LuaBuilding' defines member variable with name 'Methods' also defined in its parent class 'LuaPlayerImmovable'.
src/scripting/lua_map.h:914] -> [src/scripting/lua_map.h:858: (warning) The class 'LuaBuilding' defines member variable with name 'Properties' also defined in its parent class 'LuaPlayerImmovable'.
src/scripting/lua_map.h:942] -> [src/scripting/lua_map.h:858: (warning) The class 'LuaFlag' defines member variable with name 'className' also defined in its parent class 'LuaPlayerImmovable'.
src/scripting/lua_map.h:942] -> [src/scripting/lua_map.h:858: (warning) The class 'LuaFlag' defines member variable with name 'Methods' also defined in its parent class 'LuaPlayerImmovable'.
src/scripting/lua_map.h:942] -> [src/scripting/lua_map.h:858: (warning) The class 'LuaFlag' defines member variable with name 'Properties' also defined in its parent class 'LuaPlayerImmovable'.
src/scripting/lua_map.h:973] -> [src/scripting/lua_map.h:858: (warning) The class 'LuaRoad' defines member variable with name 'className' also defined in its parent class 'LuaPlayerImmovable'.
src/scripting/lua_map.h:973] -> [src/scripting/lua_map.h:858: (warning) The class 'LuaRoad' defines member variable with name 'Methods' also defined in its parent class 'LuaPlayerImmovable'.
src/scripting/lua_map.h:973] -> [src/scripting/lua_map.h:858: (warning) The class 'LuaRoad' defines member variable with name 'Properties' also defined in its parent class 'LuaPlayerImmovable'.
src/scripting/lua_map.h:1010] -> [src/scripting/lua_map.h:914: (warning) The class 'LuaConstructionSite' defines member variable with name 'className' also defined in its parent class 'LuaBuilding'.
src/scripting/lua_map.h:1010] -> [src/scripting/lua_map.h:914: (warning) The class 'LuaConstructionSite' defines member variable with name 'Methods' also defined in its parent class 'LuaBuilding'.
src/scripting/lua_map.h:1010] -> [src/scripting/lua_map.h:914: (warning) The class 'LuaConstructionSite' defines member variable with name 'Properties' also defined in its parent class 'LuaBuilding'.
src/scripting/lua_map.h:1038] -> [src/scripting/lua_map.h:914: (warning) The class 'LuaWarehouse' defines member variable with name 'className' also defined in its parent class 'LuaBuilding'.
src/scripting/lua_map.h:1038] -> [src/scripting/lua_map.h:914: (warning) The class 'LuaWarehouse' defines member variable with name 'Methods' also defined in its parent class 'LuaBuilding'.
src/scripting/lua_map.h:1038] -> [src/scripting/lua_map.h:914: (warning) The class 'LuaWarehouse' defines member variable with name 'Properties' also defined in its parent class 'LuaBuilding'.
src/scripting/lua_map.h:1077] -> [src/scripting/lua_map.h:914: (warning) The class 'LuaProductionSite' defines member variable with name 'className' also defined in its parent class 'LuaBuilding'.
src/scripting/lua_map.h:1077] -> [src/scripting/lua_map.h:914: (warning) The class 'LuaProductionSite' defines member variable with name 'Methods' also defined in its parent class 'LuaBuilding'.
src/scripting/lua_map.h:1077] -> [src/scripting/lua_map.h:914: (warning) The class 'LuaProductionSite' defines member variable with name 'Properties' also defined in its parent class 'LuaBuilding'.
src/scripting/lua_map.h:1113] -> [src/scripting/lua_map.h:914: (warning) The class 'LuaMilitarySite' defines member variable with name 'className' also defined in its parent class 'LuaBuilding'.
src/scripting/lua_map.h:1113] -> [src/scripting/lua_map.h:914: (warning) The class 'LuaMilitarySite' defines member variable with name 'Methods' also defined in its parent class 'LuaBuilding'.
src/scripting/lua_map.h:1113] -> [src/scripting/lua_map.h:914: (warning) The class 'LuaMilitarySite' defines member variable with name 'Properties' also defined in its parent class 'LuaBuilding'.
src/scripting/lua_map.h:1143] -> [src/scripting/lua_map.h:1077: (warning) The class 'LuaTrainingSite' defines member variable with name 'className' also defined in its parent class 'LuaProductionSite'.
src/scripting/lua_map.h:1143] -> [src/scripting/lua_map.h:1077: (warning) The class 'LuaTrainingSite' defines member variable with name 'Methods' also defined in its parent class 'LuaProductionSite'.
src/scripting/lua_map.h:1143] -> [src/scripting/lua_map.h:1077: (warning) The class 'LuaTrainingSite' defines member variable with name 'Properties' also defined in its parent class 'LuaProductionSite'.
src/scripting/lua_map.h:1173] -> [src/scripting/lua_map.h:789: (warning) The class 'LuaBob' defines member variable with name 'className' also defined in its parent class 'LuaMapObject'.
src/scripting/lua_map.h:1173] -> [src/scripting/lua_map.h:789: (warning) The class 'LuaBob' defines member variable with name 'Methods' also defined in its parent class 'LuaMapObject'.
src/scripting/lua_map.h:1173] -> [src/scripting/lua_map.h:789: (warning) The class 'LuaBob' defines member variable with name 'Properties' also defined in its parent class 'LuaMapObject'.
src/scripting/lua_map.h:1202] -> [src/scripting/lua_map.h:1173: (warning) The class 'LuaWorker' defines member variable with name 'className' also defined in its parent class 'LuaBob'.
src/scripting/lua_map.h:1202] -> [src/scripting/lua_map.h:1173: (warning) The class 'LuaWorker' defines member variable with name 'Methods' also defined in its parent class 'LuaBob'.
src/scripting/lua_map.h:1202] -> [src/scripting/lua_map.h:1173: (warning) The class 'LuaWorker' defines member variable with name 'Properties' also defined in its parent class 'LuaBob'.
src/scripting/lua_map.h:1231] -> [src/scripting/lua_map.h:1202: (warning) The class 'LuaSoldier' defines member variable with name 'className' also defined in its parent class 'LuaWorker'.
src/scripting/lua_map.h:1231] -> [src/scripting/lua_map.h:1202: (warning) The class 'LuaSoldier' defines member variable with name 'Methods' also defined in its parent class 'LuaWorker'.
src/scripting/lua_map.h:1231] -> [src/scripting/lua_map.h:1202: (warning) The class 'LuaSoldier' defines member variable with name 'Properties' also defined in its parent class 'LuaWorker'.
src/scripting/lua_map.h:1262] -> [src/scripting/lua_map.h:1173: (warning) The class 'LuaShip' defines member variable with name 'className' also defined in its parent class 'LuaBob'.
src/scripting/lua_map.h:1262] -> [src/scripting/lua_map.h:1173: (warning) The class 'LuaShip' defines member variable with name 'Methods' also defined in its parent class 'LuaBob'.
src/scripting/lua_map.h:1262] -> [src/scripting/lua_map.h:1173: (warning) The class 'LuaShip' defines member variable with name 'Properties' also defined in its parent class 'LuaBob'.
src/scripting/lua_root.h:41] -> [src/scripting/lua_bases.h:42: (warning) The class 'LuaGame' defines member variable with name 'className' also defined in its parent class 'LuaEditorGameBase'.
src/scripting/lua_root.h:41] -> [src/scripting/lua_bases.h:42: (warning) The class 'LuaGame' defines member variable with name 'Methods' also defined in its parent class 'LuaEditorGameBase'.
src/scripting/lua_root.h:41] -> [src/scripting/lua_bases.h:42: (warning) The class 'LuaGame' defines member variable with name 'Properties' also defined in its parent class 'LuaEditorGameBase'.
src/scripting/lua_root.h:78] -> [src/scripting/lua_bases.h:42: (warning) The class 'LuaEditor' defines member variable with name 'className' also defined in its parent class 'LuaEditorGameBase'.
src/scripting/lua_root.h:78] -> [src/scripting/lua_bases.h:42: (warning) The class 'LuaEditor' defines member variable with name 'Methods' also defined in its parent class 'LuaEditorGameBase'.
src/scripting/lua_root.h:78] -> [src/scripting/lua_bases.h:42: (warning) The class 'LuaEditor' defines member variable with name 'Properties' also defined in its parent class 'LuaEditorGameBase'.
src/scripting/lua_ui.h:94] -> [src/scripting/lua_ui.h:47: (warning) The class 'LuaButton' defines member variable with name 'className' also defined in its parent class 'LuaPanel'.
src/scripting/lua_ui.h:94] -> [src/scripting/lua_ui.h:47: (warning) The class 'LuaButton' defines member variable with name 'Methods' also defined in its parent class 'LuaPanel'.
src/scripting/lua_ui.h:94] -> [src/scripting/lua_ui.h:47: (warning) The class 'LuaButton' defines member variable with name 'Properties' also defined in its parent class 'LuaPanel'.
src/scripting/lua_ui.h:126] -> [src/scripting/lua_ui.h:47: (warning) The class 'LuaTab' defines member variable with name 'className' also defined in its parent class 'LuaPanel'.
src/scripting/lua_ui.h:126] -> [src/scripting/lua_ui.h:47: (warning) The class 'LuaTab' defines member variable with name 'Methods' also defined in its parent class 'LuaPanel'.
src/scripting/lua_ui.h:126] -> [src/scripting/lua_ui.h:47: (warning) The class 'LuaTab' defines member variable with name 'Properties' also defined in its parent class 'LuaPanel'.
src/scripting/lua_ui.h:158] -> [src/scripting/lua_ui.h:47: (warning) The class 'LuaWindow' defines member variable with name 'className' also defined in its parent class 'LuaPanel'.
src/scripting/lua_ui.h:158] -> [src/scripting/lua_ui.h:47: (warning) The class 'LuaWindow' defines member variable with name 'Methods' also defined in its parent class 'LuaPanel'.
src/scripting/lua_ui.h:158] -> [src/scripting/lua_ui.h:47: (warning) The class 'LuaWindow' defines member variable with name 'Properties' also defined in its parent class 'LuaPanel'.
src/scripting/lua_ui.h:189] -> [src/scripting/lua_ui.h:47: (warning) The class 'LuaMapView' defines member variable with name 'className' also defined in its parent class 'LuaPanel'.
src/scripting/lua_ui.h:189] -> [src/scripting/lua_ui.h:47: (warning) The class 'LuaMapView' defines member variable with name 'Methods' also defined in its parent class 'LuaPanel'.
src/scripting/lua_ui.h:189] -> [src/scripting/lua_ui.h:47: (warning) The class 'LuaMapView' defines member variable with name 'Properties' also defined in its parent class 'LuaPanel'.
src/scripting/lua_map.h:78: (style) Class 'LuaMap' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/scripting/lua_map.h:114: (style) Class 'LuaTribeDescription' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/scripting/lua_map.h:116: (style) Class 'LuaTribeDescription' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/scripting/lua_map.h:172: (style) Class 'LuaMapObjectDescription' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/scripting/lua_map.h:175: (style) Class 'LuaMapObjectDescription' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/scripting/lua_map.h:226: (style) Class 'LuaImmovableDescription' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/scripting/lua_map.h:229: (style) Class 'LuaImmovableDescription' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/scripting/lua_map.h:268: (style) Class 'LuaBuildingDescription' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/scripting/lua_map.h:271: (style) Class 'LuaBuildingDescription' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/scripting/lua_map.h:319: (style) Class 'LuaConstructionSiteDescription' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/scripting/lua_map.h:323: (style) Class 'LuaConstructionSiteDescription' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/scripting/lua_map.h:339: (style) Class 'LuaDismantleSiteDescription' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/scripting/lua_map.h:342: (style) Class 'LuaDismantleSiteDescription' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/scripting/lua_map.h:358: (style) Class 'LuaProductionSiteDescription' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/scripting/lua_map.h:361: (style) Class 'LuaProductionSiteDescription' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/scripting/lua_map.h:398: (style) Class 'LuaMilitarySiteDescription' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/scripting/lua_map.h:401: (style) Class 'LuaMilitarySiteDescription' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/scripting/lua_map.h:431: (style) Class 'LuaTrainingSiteDescription' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/scripting/lua_map.h:434: (style) Class 'LuaTrainingSiteDescription' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/scripting/lua_map.h:479: (style) Class 'LuaWarehouseDescription' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/scripting/lua_map.h:482: (style) Class 'LuaWarehouseDescription' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/scripting/lua_map.h:511: (style) Class 'LuaWareDescription' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/scripting/lua_map.h:514: (style) Class 'LuaWareDescription' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/scripting/lua_map.h:549: (style) Class 'LuaWorkerDescription' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/scripting/lua_map.h:552: (style) Class 'LuaWorkerDescription' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/scripting/lua_map.h:589: (style) Class 'LuaSoldierDescription' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/scripting/lua_map.h:592: (style) Class 'LuaSoldierDescription' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/scripting/lua_map.h:635: (style) Class 'LuaResourceDescription' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/scripting/lua_map.h:638: (style) Class 'LuaResourceDescription' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/scripting/lua_map.h:686: (style) Class 'LuaTerrainDescription' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/scripting/lua_map.h:689: (style) Class 'LuaTerrainDescription' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/scripting/lua_map.h:741: (style) Class 'LuaEconomy' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/scripting/lua_map.h:743: (style) Class 'LuaEconomy' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/scripting/lua_map.h:793: (style) Class 'LuaMapObject' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/scripting/lua_map.h:796: (style) Class 'LuaMapObject' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/scripting/lua_map.h:834: (style) Class 'LuaBaseImmovable' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/scripting/lua_map.h:836: (style) Class 'LuaBaseImmovable' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/scripting/lua_map.h:862: (style) Class 'LuaPlayerImmovable' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/scripting/lua_map.h:864: (style) Class 'LuaPlayerImmovable' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/scripting/lua_map.h:891: (style) Class 'LuaPortDock' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/scripting/lua_map.h:893: (style) Class 'LuaPortDock' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/scripting/lua_map.h:918: (style) Class 'LuaBuilding' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/scripting/lua_map.h:920: (style) Class 'LuaBuilding' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/scripting/lua_map.h:946: (style) Class 'LuaFlag' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/scripting/lua_map.h:948: (style) Class 'LuaFlag' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/scripting/lua_map.h:977: (style) Class 'LuaRoad' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/scripting/lua_map.h:979: (style) Class 'LuaRoad' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/scripting/lua_map.h:1014: (style) Class 'LuaConstructionSite' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/scripting/lua_map.h:1016: (style) Class 'LuaConstructionSite' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/scripting/lua_map.h:1042: (style) Class 'LuaWarehouse' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/scripting/lua_map.h:1044: (style) Class 'LuaWarehouse' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/scripting/lua_map.h:1081: (style) Class 'LuaProductionSite' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/scripting/lua_map.h:1083: (style) Class 'LuaProductionSite' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/scripting/lua_map.h:1117: (style) Class 'LuaMilitarySite' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/scripting/lua_map.h:1119: (style) Class 'LuaMilitarySite' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/scripting/lua_map.h:1147: (style) Class 'LuaTrainingSite' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/scripting/lua_map.h:1149: (style) Class 'LuaTrainingSite' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/scripting/lua_map.h:1177: (style) Class 'LuaBob' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/scripting/lua_map.h:1179: (style) Class 'LuaBob' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/scripting/lua_map.h:1206: (style) Class 'LuaWorker' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/scripting/lua_map.h:1208: (style) Class 'LuaWorker' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/scripting/lua_map.h:1235: (style) Class 'LuaSoldier' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/scripting/lua_map.h:1237: (style) Class 'LuaSoldier' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/scripting/lua_map.h:1266: (style) Class 'LuaShip' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/scripting/lua_map.h:1268: (style) Class 'LuaShip' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/scripting/lua_map.h:1309: (style) Class 'LuaField' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/scripting/lua_map.h:1311: (style) Class 'LuaField' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/scripting/lua_map.h:1381: (style) Class 'LuaPlayerSlot' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/scripting/lua_map.h:1383: (style) Class 'LuaPlayerSlot' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/scripting/lua_root.h:48: (style) Class 'LuaGame' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/scripting/lua_root.h:85: (style) Class 'LuaEditor' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/scripting/lua_root.h:114: (style) Class 'LuaWorld' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/scripting/lua_root.h:150: (style) Class 'LuaTribes' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/scripting/lua_ui.h:51: (style) Class 'LuaPanel' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/scripting/lua_ui.h:53: (style) Class 'LuaPanel' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/scripting/lua_ui.h:98: (style) Class 'LuaButton' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/scripting/lua_ui.h:100: (style) Class 'LuaButton' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/scripting/lua_ui.h:130: (style) Class 'LuaTab' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/scripting/lua_ui.h:132: (style) Class 'LuaTab' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/scripting/lua_ui.h:162: (style) Class 'LuaWindow' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/scripting/lua_ui.h:164: (style) Class 'LuaWindow' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/scripting/lua_ui.h:193: (style) Class 'LuaMapView' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/scripting/lua_ui.h:195: (style) Class 'LuaMapView' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/scripting/lua_game.cc:457: (style) Variable 'title' is assigned a value that is never used.
src/scripting/lua_game.cc:458: (style) Variable 'body' is assigned a value that is never used.
src/scripting/lua_map.cc:2824: (style) The scope of the variable 'index' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced:
void f(int x) { int i = 0; if (x) { // it's safe to move 'int i = 0;' here for (int n = 0; n < 10; ++n) { // it is possible but not safe to move 'int i = 0;' here do_something(&i); } } } When you see this message it is always safe to reduce the variable scope 1 level. src/scripting/lua_path.cc:35: (style) Class 'NumberGlob' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/scripting/test/test_luna.cc:93] -> [src/scripting/test/test_luna.cc:50: (warning) The class 'LuaSubClass' defines member variable with name 'className' also defined in its parent class 'LuaClass'.
src/scripting/test/test_luna.cc:93] -> [src/scripting/test/test_luna.cc:50: (warning) The class 'LuaSubClass' defines member variable with name 'Methods' also defined in its parent class 'LuaClass'.
src/scripting/test/test_luna.cc:93] -> [src/scripting/test/test_luna.cc:50: (warning) The class 'LuaSubClass' defines member variable with name 'Properties' also defined in its parent class 'LuaClass'.
src/scripting/test/test_luna.cc:118] -> [src/scripting/test/test_luna.cc:50: (warning) The class 'LuaVirtualClass' defines member variable with name 'className' also defined in its parent class 'LuaClass'.
src/scripting/test/test_luna.cc:118] -> [src/scripting/test/test_luna.cc:50: (warning) The class 'LuaVirtualClass' defines member variable with name 'Methods' also defined in its parent class 'LuaClass'.
src/scripting/test/test_luna.cc:118] -> [src/scripting/test/test_luna.cc:50: (warning) The class 'LuaVirtualClass' defines member variable with name 'Properties' also defined in its parent class 'LuaClass'.
src/scripting/test/test_luna.cc:158] -> [src/scripting/test/test_luna.cc:50: (warning) The class 'LuaMultiClass' defines member variable with name 'className' also defined in its parent class 'LuaClass'.
src/scripting/test/test_luna.cc:158] -> [src/scripting/test/test_luna.cc:50: (warning) The class 'LuaMultiClass' defines member variable with name 'Methods' also defined in its parent class 'LuaClass'.
src/scripting/test/test_luna.cc:158] -> [src/scripting/test/test_luna.cc:50: (warning) The class 'LuaMultiClass' defines member variable with name 'Properties' also defined in its parent class 'LuaClass'.
src/scripting/test/test_luna.cc:58: (style) Class 'LuaClass' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/scripting/test/test_luna.cc:96: (style) Class 'LuaSubClass' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/scripting/test/test_luna.cc:121: (style) Class 'LuaVirtualClass' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/scripting/test/test_luna.cc:161: (style) Class 'LuaMultiClass' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/sound/sound_handler.cc:259: (warning) Non-pure function: 'is_directory' is called inside assert statement. Assert statements are removed from release builds so the code inside assert statement is not executed. If the code is needed also in release builds, this is a bug.
src/sound/sound_handler.cc:448: (warning) Non-pure function: 'is_directory' is called inside assert statement. Assert statements are removed from release builds so the code inside assert statement is not executed. If the code is needed also in release builds, this is a bug.
src/third_party/eris/eris.c:571: (style) Condition 'sizeof(int)==sizeof(int16_t)' is always false
src/third_party/eris/eris.c:574: (style) Condition 'sizeof(int)==sizeof(int32_t)' is always true
src/third_party/eris/eris.c:577: (style) Condition 'sizeof(int)==sizeof(int64_t)' is always false
src/third_party/eris/eris.c:587: (style) Condition 'sizeof(long)==sizeof(uint16_t)' is always false
src/third_party/eris/eris.c:590: (style) Condition 'sizeof(long)==sizeof(uint32_t)' is always false
src/third_party/eris/eris.c:593: (style) Condition 'sizeof(long)==sizeof(uint64_t)' is always true
src/third_party/eris/eris.c:603: (style) Condition 'sizeof(double)==sizeof(uint32_t)' is always false
src/third_party/eris/eris.c:606: (style) Condition 'sizeof(double)==sizeof(uint64_t)' is always true
src/third_party/eris/eris.c:633: (style) Condition 'sizeof(long)==sizeof(uint32_t)' is always false
src/third_party/eris/eris.c:781: (style) Condition 'sizeof(double)==sizeof(uint32_t)' is always false
src/third_party/eris/eris.c:784: (style) Condition 'sizeof(double)==sizeof(uint64_t)' is always true
src/third_party/eris/eris.c:2637: (warning) Size of pointer 'kSettingMetafield' used instead of size of its data. This is likely to lead to a buffer overflow. You probably intend to write 'sizeof(*kSettingMetafield)'.
src/third_party/eris/eris.c:2642: (warning) Size of pointer 'kSettingPassIOToPersist' used instead of size of its data. This is likely to lead to a buffer overflow. You probably intend to write 'sizeof(*kSettingPassIOToPersist)'.
src/third_party/eris/eris.c:2647: (warning) Size of pointer 'kSettingWriteDebugInfo' used instead of size of its data. This is likely to lead to a buffer overflow. You probably intend to write 'sizeof(*kSettingWriteDebugInfo)'.
src/third_party/eris/eris.c:2652: (warning) Size of pointer 'kSettingGeneratePath' used instead of size of its data. This is likely to lead to a buffer overflow. You probably intend to write 'sizeof(*kSettingGeneratePath)'.
src/third_party/eris/eris.c:2657: (warning) Size of pointer 'kSettingMaxComplexity' used instead of size of its data. This is likely to lead to a buffer overflow. You probably intend to write 'sizeof(*kSettingMaxComplexity)'.
src/third_party/eris/eris.c:2670: (warning) Size of pointer 'kSettingMetafield' used instead of size of its data. This is likely to lead to a buffer overflow. You probably intend to write 'sizeof(*kSettingMetafield)'.
src/third_party/eris/eris.c:2674: (warning) Size of pointer 'kSettingPassIOToPersist' used instead of size of its data. This is likely to lead to a buffer overflow. You probably intend to write 'sizeof(*kSettingPassIOToPersist)'.
src/third_party/eris/eris.c:2678: (warning) Size of pointer 'kSettingWriteDebugInfo' used instead of size of its data. This is likely to lead to a buffer overflow. You probably intend to write 'sizeof(*kSettingWriteDebugInfo)'.
src/third_party/eris/eris.c:2682: (warning) Size of pointer 'kSettingGeneratePath' used instead of size of its data. This is likely to lead to a buffer overflow. You probably intend to write 'sizeof(*kSettingGeneratePath)'.
src/third_party/eris/eris.c:2686: (warning) Size of pointer 'kSettingMaxComplexity' used instead of size of its data. This is likely to lead to a buffer overflow. You probably intend to write 'sizeof(*kSettingMaxComplexity)'.
src/third_party/eris/eris.c:603: (style) Condition 'sizeof(float)==sizeof(uint32_t)' is always true
src/third_party/eris/eris.c:606: (style) Condition 'sizeof(float)==sizeof(uint64_t)' is always false
src/third_party/eris/eris.c:616: (style) Condition 'sizeof(long)==sizeof(uint32_t)' is always false
src/third_party/eris/eris.c:619: (style) Condition 'sizeof(long)==sizeof(uint64_t)' is always true
src/third_party/eris/eris.c:781: (style) Condition 'sizeof(float)==sizeof(uint32_t)' is always true
src/third_party/eris/eris.c:784: (style) Condition 'sizeof(float)==sizeof(uint64_t)' is always false
src/third_party/eris/eris.c:795: (style) Condition 'sizeof(long)==sizeof(uint32_t)' is always false
src/third_party/eris/eris.c:798: (style) Condition 'sizeof(long)==sizeof(uint64_t)' is always true
src/third_party/eris/lauxlib.c:657: (style) The scope of the variable 'c' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced:
void f(int x) { int i = 0; if (x) { // it's safe to move 'int i = 0;' here for (int n = 0; n < 10; ++n) { // it is possible but not safe to move 'int i = 0;' here do_something(&i); } } } When you see this message it is always safe to reduce the variable scope 1 level. src/third_party/eris/lcode.c:55: (style) The scope of the variable 'previous' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced:
void f(int x) { int i = 0; if (x) { // it's safe to move 'int i = 0;' here for (int n = 0; n < 10; ++n) { // it is possible but not safe to move 'int i = 0;' here do_something(&i); } } } When you see this message it is always safe to reduce the variable scope 1 level. src/third_party/eris/ldblib.c:197: (style) The scope of the variable 'name' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced:
void f(int x) { int i = 0; if (x) { // it's safe to move 'int i = 0;' here for (int n = 0; n < 10; ++n) { // it is possible but not safe to move 'int i = 0;' here do_something(&i); } } } When you see this message it is always safe to reduce the variable scope 1 level. src/third_party/eris/liolib.c:654: (information) Skipping configuration 'LUA_USE_WINDOWS;_CRTIMP_TYPEINFO;_MSC_VER;l_fseek' since the value of 'l_fseek' is unknown. Use -D if you want to check it. You can use -U to skip it explicitly.
src/third_party/eris/liolib.c:274: (information) Skipping configuration 'LUA_USE_WINDOWS;l_popen' since the value of 'l_popen' is unknown. Use -D if you want to check it. You can use -U to skip it explicitly.
src/third_party/eris/llex.c:61: (information) Skipping configuration 'LLONG_MAX' since the value of 'LLONG_MAX' is unknown. Use -D if you want to check it. You can use -U to skip it explicitly.
src/third_party/eris/lmathlib.c:266: (information) Skipping configuration 'LLONG_MAX' since the value of 'LLONG_MAX' is unknown. Use -D if you want to check it. You can use -U to skip it explicitly.
src/third_party/eris/lmathlib.c:401: (information) Skipping configuration 'LLONG_MAX' since the value of 'LLONG_MAX' is unknown. Use -D if you want to check it. You can use -U to skip it explicitly.
src/third_party/eris/loslib.c:263: (style) Variable 'tmr' is not assigned a value.
src/third_party/eris/loslib.c:233: (information) Skipping configuration 'LUA_STRFTIMEOPTIONS;LUA_USE_C89' since the value of 'LUA_STRFTIMEOPTIONS' is unknown. Use -D if you want to check it. You can use -U to skip it explicitly.
src/third_party/eris/lstring.c:204: (information) Skipping configuration 'LLONG_MAX' since the value of 'LLONG_MAX' is unknown. Use -D if you want to check it. You can use -U to skip it explicitly.
src/third_party/eris/lstring.c:239: (information) Skipping configuration 'LLONG_MAX' since the value of 'LLONG_MAX' is unknown. Use -D if you want to check it. You can use -U to skip it explicitly.
src/third_party/eris/lstrlib.c:1099: (style) struct member 'cD::c' is never used.
src/third_party/eris/lstrlib.c:1100: (style) union member 'Anonymous1::i' is never used.
src/third_party/eris/ltable.c:168: (style) The scope of the variable 'nx' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced:
void f(int x) { int i = 0; if (x) { // it's safe to move 'int i = 0;' here for (int n = 0; n < 10; ++n) { // it is possible but not safe to move 'int i = 0;' here do_something(&i); } } } When you see this message it is always safe to reduce the variable scope 1 level. src/third_party/eris/ltable.c:337: (style) The scope of the variable 'i' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced:
void f(int x) { int i = 0; if (x) { // it's safe to move 'int i = 0;' here for (int n = 0; n < 10; ++n) { // it is possible but not safe to move 'int i = 0;' here do_something(&i); } } } When you see this message it is always safe to reduce the variable scope 1 level. src/third_party/eris/ltablib.c:137: (information) Skipping configuration 'LLONG_MAX' since the value of 'LLONG_MAX' is unknown. Use -D if you want to check it. You can use -U to skip it explicitly.
src/third_party/eris/ltablib.c:140: (information) Skipping configuration 'LLONG_MAX' since the value of 'LLONG_MAX' is unknown. Use -D if you want to check it. You can use -U to skip it explicitly.
src/third_party/eris/ltablib.c:259: (warning) Division by result of sizeof(). memcpy() expects a size in bytes, did you intend to multiply instead?
src/third_party/eris/ltablib.c:260: (warning) Division by result of sizeof(). memcpy() expects a size in bytes, did you intend to multiply instead?
src/third_party/eris/lua.c:582: (information) Skipping configuration 'LUA_USE_WINDOWS;lua_stdin_is_tty' since the value of 'lua_stdin_is_tty' is unknown. Use -D if you want to check it. You can use -U to skip it explicitly.
src/third_party/eris/lvm.c:143: (information) Skipping configuration 'LLONG_MAX' since the value of 'LLONG_MAX' is unknown. Use -D if you want to check it. You can use -U to skip it explicitly.
src/third_party/eris/lvm.c:480: (information) Skipping configuration 'LLONG_MAX' since the value of 'LLONG_MAX' is unknown. Use -D if you want to check it. You can use -U to skip it explicitly.
src/third_party/minizip/unzip.cc:296: (style) Condition 'unz_copyright[0]!=' '' is always false
src/third_party/minizip/unzip.cc:550: (style) Variable 'lSeek' is assigned a value that is never used.
src/third_party/minizip/unzip.cc:1974: (style) Suspicious calculation. Please use parentheses to clarify the code. The code ''a&b?c:d'' should be written as either ''(a&b)?c:d'' or ''a&(b?c:d)''.
src/third_party/minizip/unzip.cc:1955: (information) Skipping configuration 'CALLBACK;USEWINDOWS_CALLBACK;_WIN32' since the value of 'CALLBACK' is unknown. Use -D if you want to check it. You can use -U to skip it explicitly.
src/third_party/minizip/unzip.cc:1957: (information) Skipping configuration 'CALLBACK;USEWINDOWS_CALLBACK;_WIN32' since the value of 'CALLBACK' is unknown. Use -D if you want to check it. You can use -U to skip it explicitly.
src/third_party/minizip/unzip.cc:1959: (information) Skipping configuration 'CALLBACK;USEWINDOWS_CALLBACK;_WIN32' since the value of 'CALLBACK' is unknown. Use -D if you want to check it. You can use -U to skip it explicitly.
src/third_party/minizip/unzip.cc:1961: (information) Skipping configuration 'CALLBACK;USEWINDOWS_CALLBACK;_WIN32' since the value of 'CALLBACK' is unknown. Use -D if you want to check it. You can use -U to skip it explicitly.
src/third_party/minizip/unzip.cc:1963: (information) Skipping configuration 'CALLBACK;USEWINDOWS_CALLBACK;_WIN32' since the value of 'CALLBACK' is unknown. Use -D if you want to check it. You can use -U to skip it explicitly.
src/third_party/minizip/unzip.cc:1965: (information) Skipping configuration 'CALLBACK;USEWINDOWS_CALLBACK;_WIN32' since the value of 'CALLBACK' is unknown. Use -D if you want to check it. You can use -U to skip it explicitly.
src/third_party/minizip/unzip.cc:1967: (information) Skipping configuration 'CALLBACK;USEWINDOWS_CALLBACK;_WIN32' since the value of 'CALLBACK' is unknown. Use -D if you want to check it. You can use -U to skip it explicitly.
src/third_party/minizip/unzip.cc:1969: (information) Skipping configuration 'CALLBACK;USEWINDOWS_CALLBACK;_WIN32' since the value of 'CALLBACK' is unknown. Use -D if you want to check it. You can use -U to skip it explicitly.
src/third_party/minizip/unzip.cc:1982: (information) Skipping configuration 'CALLBACK;USEWINDOWS_CALLBACK;_WIN32' since the value of 'CALLBACK' is unknown. Use -D if you want to check it. You can use -U to skip it explicitly.
src/third_party/minizip/unzip.cc:1986: (information) Skipping configuration 'CALLBACK;USEWINDOWS_CALLBACK;_WIN32' since the value of 'CALLBACK' is unknown. Use -D if you want to check it. You can use -U to skip it explicitly.
src/third_party/minizip/unzip.cc:1990: (information) Skipping configuration 'CALLBACK;USEWINDOWS_CALLBACK;_WIN32' since the value of 'CALLBACK' is unknown. Use -D if you want to check it. You can use -U to skip it explicitly.
src/third_party/minizip/unzip.cc:1994: (information) Skipping configuration 'CALLBACK;USEWINDOWS_CALLBACK;_WIN32' since the value of 'CALLBACK' is unknown. Use -D if you want to check it. You can use -U to skip it explicitly.
src/third_party/minizip/unzip.cc:2013: (information) Skipping configuration 'CALLBACK;USEWINDOWS_CALLBACK;_WIN32' since the value of 'CALLBACK' is unknown. Use -D if you want to check it. You can use -U to skip it explicitly.
src/third_party/minizip/unzip.cc:2017: (information) Skipping configuration 'CALLBACK;USEWINDOWS_CALLBACK;_WIN32' since the value of 'CALLBACK' is unknown. Use -D if you want to check it. You can use -U to skip it explicitly.
src/ui_basic/checkbox.cc:161: (style) Suspicious calculation. Please use parentheses to clarify the code. The code ''a&b?c:d'' should be written as either ''(a&b)?c:d'' or ''a&(b?c:d)''.
src/ui_basic/fileview_panel.cc:62: (warning) Non-pure function: 'tabs' is called inside assert statement. Assert statements are removed from release builds so the code inside assert statement is not executed. If the code is needed also in release builds, this is a bug.
src/ui_basic/multilineeditbox.cc:103: (warning) Member variable 'Data::background' is not initialized in the constructor.
src/ui_basic/slider.cc:50: (warning) Member variable 'Slider::relative_move_' is not initialized in the constructor.
src/ui_basic/window.cc:67: (warning) Member variable 'Window::oldh_' is not initialized in the constructor.
src/ui_fsmenu/campaign_select.h:96: (style) Class 'FullscreenMenuCampaignMapSelect' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/ui_fsmenu/launch_mpg.cc:71: (error) Memory leak: btn
src/wui/login_box.h:30: (style) Struct 'LoginBox' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/ui_fsmenu/options.h:82: (style) Class 'OptionsCtrl' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/ui_fsmenu/options.h:98: (style) Class 'FullscreenMenuOptions' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/wlapplication.cc:382: (warning) Assignment of function parameter has no effect outside the function. Did you forget dereferencing it?
src/wui/debugconsole.cc:94: (error) Uninitialized struct member: cm.playern
src/wui/debugconsole.cc:102: (error) Uninitialized struct member: cm.playern
src/wui/field_overlay_manager.cc:29: (warning) Member variable 'FieldOverlayManager::buildhelp_' is not initialized in the constructor.
src/wui/field_overlay_manager.cc:100: (style) Suspicious calculation. Please use parentheses to clarify the code. The code ''a&b?c:d'' should be written as either ''(a&b)?c:d'' or ''a&(b?c:d)''.
src/wui/field_overlay_manager.cc:103: (style) Suspicious calculation. Please use parentheses to clarify the code. The code ''a&b?c:d'' should be written as either ''(a&b)?c:d'' or ''a&(b?c:d)''.
src/wui/field_overlay_manager.cc:109: (style) Suspicious calculation. Please use parentheses to clarify the code. The code ''a&b?c:d'' should be written as either ''(a&b)?c:d'' or ''a&(b?c:d)''.
src/wui/game_debug_ui.cc:88: (performance) Parameter 'str' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/wui/game_main_menu_save_game.cc:132: (error) Memory leak: cancelbtn
src/wui/game_main_menu_save_game.cc:132: (error) Memory leak: deletebtn
src/wui/game_main_menu_save_game.cc:200: (performance) Parameter 'name' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/wui/game_message_menu.cc:557: (performance) Parameter 'message' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/wui/general_statistics_menu.cc:108: (style) Variable 'plr_in_game' is modified but its new value is never used.
src/wui/interactive_base.cc:73: (style) Struct 'InteractiveBaseInternals' has a constructor with 1 argument that is not explicit. Such constructors should in general be explicit for type safety reasons. Using the explicit keyword in the constructor means some mistakes when using the class can be avoided.
src/wui/productionsitewindow.cc:135: (warning) Non-pure function: 'productionsite' is called inside assert statement. Assert statements are removed from release builds so the code inside assert statement is not executed. If the code is needed also in release builds, this is a bug.
src/wui/soldierlist.cc:146: (error) Uninitialized struct member: icon.cache_level
src/wui/soldierlist.cc:146: (error) Uninitialized struct member: icon.cache_health
src/wui/story_message_box.cc:39] -> [src/wui/story_message_box.cc:47: (style) Variable 'message_text' is reassigned a value before the old one has been used.
src/wui/watchwindow.cc:125: (error) Memory leak: closebtn
src/ai/defaultai.cc:4681: (style) The function 'check_range' is never used.
src/wui/general_statistics_menu.cc:220: (style) The function 'clicked_help' is never used.
src/graphic/text/rt_render.cc:513: (style) The function 'debug_info' is never used.
src/logic/map_objects/tribes/warehouse.cc:1216: (style) The function 'disable_spawn' is never used.
src/third_party/eris/eris.c:2768: (style) The function 'eris_get_setting' is never used.
src/third_party/eris/eris.c:2746: (style) The function 'eris_persist' is never used.
src/third_party/eris/eris.c:2757: (style) The function 'eris_unpersist' is never used.
src/io/filesystem/disk_filesystem.cc:81: (style) The function 'file_is_writeable' is never used.
src/logic/game.cc:144: (style) The function 'get_allow_cheats' is never used.
src/logic/map_objects/map_object.cc:383: (style) The function 'get_attribute_name' is never used.
src/graphic/font_handler.cc:124: (style) The function 'get_fontheight' is never used.
src/ui_basic/multilineeditbox.cc:167: (style) The function 'get_maximum_bytes' is never used.
src/logic/map_objects/tribes/tribe_descr.cc:225: (style) The function 'get_nrbuildings' is never used.
src/profile/profile.cc:285: (style) The function 'get_safe_natural' is never used.
src/logic/editor_game_base.cc:428: (style) The function 'get_trackpointer' is never used.
src/profile/profile.cc:213: (style) The function 'has_val' is never used.
src/graphic/text/bidi.cc:711: (style) The function 'icuchar2string' is never used.
src/graphic/font.cc:127: (style) The function 'lineskip' is never used.
src/editor/ui_menus/player_menu.cc:315: (style) The function 'make_infrastructure_clicked' is never used.
src/ui_basic/editbox.cc:143: (style) The function 'max_length' is never used.
src/logic/mapdifferenceregion.cc:46: (style) The function 'move_to_other_side' is never used.
src/ai/ai_help_structs.cc:369: (style) The function 'print' is never used.
src/logic/widelands_geometry_io.cc:79: (style) The function 'read_area_48' is never used.
src/wlapplication.cc:1405: (style) The function 'redirect_output' is never used.
src/io/filesystem/layered_filesystem.cc:76: (style) The function 'remove_file_system' is never used.
src/ui_basic/listselect.cc:284: (style) The function 'remove_selected' is never used.
src/logic/editor_game_base.cc:443: (style) The function 'remove_trackpointer' is never used.
src/economy/shippingitem.cc:132: (style) The function 'schedule_update' is never used.
src/logic/game.cc:713: (style) The function 'send_player_change_training_options' is never used.
src/graphic/richtext.cc:187: (style) The function 'set_background_color' is never used.
src/ui_basic/listselect.cc:236: (style) The function 'set_entry_color' is never used.
src/graphic/text/rt_render.cc:262: (style) The function 'set_halign' is never used.
src/wui/itemwaresdisplay.cc:73: (style) The function 'set_items_per_row' is never used.
src/ui_basic/multilineeditbox.cc:155: (style) The function 'set_maximum_bytes' is never used.
src/ui_basic/slider.cc:128: (style) The function 'set_min_value' is never used.
src/ui_basic/listselect.cc:182: (style) The function 'switch_entries' is never used.
src/wui/waresdisplay.cc:371: (style) The function 'unhide_ware' is never used.
src/wui/waresdisplay.cc:377: (style) The function 'ware_hidden' is never used.
src/io/filewrite.cc:44: (style) The function 'write_append' is never used.
src/logic/widelands_geometry_io.cc:103: (style) The function 'write_area_48' is never used.
(information) Cppcheck cannot find all the include files. Cppcheck can check the code without the include files found. But the results will probably be more accurate if all the include files are found. Please check your project's include directories and add all of them as include directories for Cppcheck. To see what files Cppcheck cannot find use --check-config.