Issues found by Cppcheck 1.62

src/logic/world.h:137: (style) The struct 'MapGenAreaInfo' 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/world.h:206: (style) The struct 'MapGenBobArea' 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/world.h:233: (style) The struct 'MapGenInfo' 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/field.h:59: (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/logic/findnode.h:61: (style) Value of pointer 'capsule', which points to allocated memory, is copied in copy constructor instead of allocating new memory.
src/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/logic/widelands_geometry.h:172: (performance) Parameter 'other' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/widelands_geometry.h:175: (performance) Parameter 'other' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/message.h:52: (performance) Parameter 'c' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/player.h:513: (performance) Parameter 'player_area' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/player.h:582: (performance) Parameter 'index_of_new_building' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/player.h:653: (performance) Parameter 'bi' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/ai/ai_help_structs.cc:72: (performance) Parameter 'dest' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/io/basic_filewrite.h:43: (performance) Parameter 'other' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/io/basic_filewrite.h:79: (performance) Parameter 'pos' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/io/basic_filewrite.h:86: (performance) Parameter 'pos' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/io/basic_fileread.h:45: (performance) Parameter 'other' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/io/basic_fileread.h:98: (performance) Parameter 'pos' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/io/basic_fileread.h:117: (performance) Parameter 'pos' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/io/basic_fileread.h:130: (performance) Parameter 'pos' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/findimmovable.h:58: (style) Value of pointer 'capsule', which points to allocated memory, is copied in copy constructor instead of allocating new memory.
src/logic/warelist.h:57: (performance) Parameter 'i' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/economy/economy.h:142: (performance) Parameter 'i' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/economy/economy.h:145: (performance) Parameter 'i' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/economy/economy.h:159: (performance) Parameter 'i' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/economy/economy.h:162: (performance) Parameter 'i' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/economy/economy.h:165: (performance) Parameter 'i' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/economy/economy.h:168: (performance) Parameter 'i' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/descr_maintainer.h:133: (performance) Parameter 'idx' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/descr_maintainer.h:69: (performance) Parameter 'n' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/chat.cc:74: (portability) Non reentrant function 'localtime' called. For threadsafe applications it is recommended to use the reentrant replacement function 'localtime_r'.
src/chat.cc:171: (portability) Non reentrant function 'localtime' called. For threadsafe applications it is recommended to use the reentrant replacement function 'localtime_r'.
src/map_io/widelands_map_message_saver.h:44: (performance) Parameter 'id' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/map_io/widelands_map_message_saver.h:48: (performance) Parameter 'id' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/economy/warehousesupply.h:44: (performance) Parameter 'i' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/economy/warehousesupply.h:47: (performance) Parameter 'i' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/economy/economy.cc:326: (performance) Parameter 'ware_type' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/economy/economy.cc:337: (performance) Parameter 'ware_type' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/economy/economy.cc:353: (performance) Parameter 'id' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/economy/economy.cc:362: (performance) Parameter 'id' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/economy/economy.cc:378: (performance) Parameter 'id' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/economy/economy.cc:393: (performance) Parameter 'id' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/economy/economy.cc:498: (performance) Parameter 'ware_type' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/economy/economy.cc:510: (performance) Parameter 'worker_type' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/economy/flag.cc:109: (performance) Parameter 'coords' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/economy/flag.cc:774: (performance) Parameter 'workerware' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/wui/overlay_manager.h:73: (style) Unused private function: 'Job_Id::operator++'
src/wui/overlay_manager.h:74: (style) Unused private function: 'Job_Id::operator=='
src/ui_basic/slider.h:189: (performance) Parameter 'labels_in' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/wui/plot_area.h:94: (performance) Parameter 'color' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/ui_basic/checkbox.h:96: (performance) Parameter 'p' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/wui/overlay_manager.h:70: (performance) Parameter 'other' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/wui/overlay_manager.h:74: (performance) Parameter 'other' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/wui/overlay_manager.h:160: (performance) Parameter 'c' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/wui/overlay_manager.h:171: (performance) Parameter 'Jobid' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/wui/overlay_manager.h:173: (performance) Parameter 'Hotspot' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/wui/interactive_base.h:133: (performance) Parameter 'Pos' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/wui/interactive_base.h:140: (performance) Parameter 'Jobid' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/economy/request.cc:111: (style) The scope of the variable 'fudged_type' 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/economy/test/test_road.cc:53: (warning) Assignment of function parameter has no effect outside the function.
src/economy/test/test_road.cc:55: (warning) Assignment of function parameter has no effect outside the function.
src/economy/test/test_road.cc:36: (performance) Parameter 'c' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/economy/test/test_routing.cc:178: (style) 'struct TestingNode_DefaultNodes_Fixture' does not have a copy constructor which is recommended since the class contains a pointer to allocated memory.
src/economy/test/test_routing.cc:224: (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:390: (style) 'struct ComplexRouterFixture' does not have a copy constructor which is recommended since the class contains a pointer to allocated memory.
src/economy/test/test_routing.cc:410: (performance) Parameter 'pos' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/economy/ware_instance.cc:183: (performance) Parameter 'i' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/economy/wares_queue.cc:41: (performance) Parameter '_ware' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/economy/wares_queue.cc:125: (performance) Parameter 'ware' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/editor/tools/editor_tool_action.h:62: (style) Value of pointer 'args', which points to allocated memory, is copied in copy constructor instead of allocating new memory.
src/editor/tools/editor_tool.h:49: (performance) Parameter 'center' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/editor/tools/editor_tool.h:59: (performance) Parameter 'center' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/editor/tools/editor_history.h:44: (performance) Parameter 'center' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/editor/tools/editor_set_height_tool.h:50: (performance) Parameter 'i' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/editor/tools/editor_noise_height_tool.h:29: (performance) Parameter 'the_interval' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/editor/tools/editor_noise_height_tool.h:54: (performance) Parameter 'i' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/editor/tools/editor_make_infrastructure_tool.cc:34: (performance) Parameter 'c' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/editor/tools/editor_set_port_space_tool.cc:34: (performance) Parameter 'c' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/editor/tools/editor_set_starting_pos_tool.cc:36: (performance) Parameter 'c' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/map_generator.h:101: (performance) Parameter 'fc' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/map_generator.h:113: (performance) Parameter 'c0' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/map_generator.h:113: (performance) Parameter 'c1' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/map_generator.h:113: (performance) Parameter 'c2' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/wui/interactive_player.h:83: (performance) Parameter 'location' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/cmd_expire_message.h:38: (performance) Parameter 'm' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/game_io/game_player_economies_data_packet.cc] -> [src/game_io/game_player_economies_data_packet.cc:49: (error) Internal error. Token::Match called with varid 0. Please report this to Cppcheck developers
src/logic/playercommand.h:354: (warning) Member variable 'Cmd_ShipExploreIsland::clockwise' is not initialized in the constructor.
src/logic/playercommand.h:537] -> [src/logic/playercommand.h:493: (warning) The struct 'Cmd_ResetWareTargetQuantity' defines member variable with name 'm_ware_type' also defined in its parent struct 'Cmd_ChangeTargetQuantity'.
src/logic/playercommand.h:580] -> [src/logic/playercommand.h:493: (warning) The struct 'Cmd_ResetWorkerTargetQuantity' defines member variable with name 'm_ware_type' also defined in its parent struct 'Cmd_ChangeTargetQuantity'.
src/logic/playercommand.h:94: (performance) Parameter 'c' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/playercommand.h:95: (performance) Parameter 'i' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/playercommand.h:116: (performance) Parameter 'c' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/playercommand.h:243: (performance) Parameter 'i' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/playercommand.h:720: (performance) Parameter 'i' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/playercommand.h:738: (performance) Parameter 'i' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/playercommand.h:753: (performance) Parameter 'i' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/graphic/colormap.h:28: (style) 'class Colormap' does not have a copy constructor which is recommended since the class contains a pointer to allocated memory.
src/graphic/graphic.cc:65: (warning) Member variable 'Graphic::m_sdl_screen' is not initialized in the constructor.
src/graphic/graphic.cc:65: (warning) Member variable 'Graphic::m_caps' is not initialized in the constructor.
src/graphic/render/gamerenderer.cc:32: (warning) Member variable 'GameRenderer::m_dst' is not initialized in the constructor.
src/graphic/render/gamerenderer.cc:32: (warning) Member variable 'GameRenderer::m_egbase' is not initialized in the constructor.
src/graphic/render/gamerenderer.cc:32: (warning) Member variable 'GameRenderer::m_player' is not initialized in the constructor.
src/graphic/render/gamerenderer_gl.cc:39: (warning) Member variable 'GameRendererGL::m_surface' is not initialized in the constructor.
src/graphic/render/terrain_sdl.h:560: (performance) Parameter 'start' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/graphic/render/terrain_sdl.h:560: (performance) Parameter 'end' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/graphic/render/terrain_sdl.h:533: (performance) Parameter 'start' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/graphic/render/terrain_sdl.h:533: (performance) Parameter 'end' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/graphic/render/gl_surface.cc:63: (performance) Parameter 'clr' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/graphic/render/gl_surface.cc:84: (performance) Parameter 'clr' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/graphic/render/gl_surface_texture.cc:237: (performance) Parameter 'clr' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/graphic/render/gl_surface_texture.cc:251: (performance) Parameter 'clr' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/graphic/render/sdl_surface.cc:146: (performance) Parameter 'clr' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/graphic/render/sdl_surface.cc:171: (performance) Parameter 'clr' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/graphic/rendertarget.cc:180: (performance) Parameter 'dst' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/graphic/rendertarget.cc:180: (performance) Parameter 'srcrc' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/graphic/richtext.cc:455: (performance) Prefix ++/-- operators should be preferred for non-primitive types. Pre-increment/decrement can be more efficient than post-increment/decrement. Post-increment/decrement usually involves keeping a copy of the previous value around and adds a little extra code.
src/graphic/texture.h:41: (style) 'struct Texture' does not have a copy constructor which is recommended since the class contains a pointer to allocated memory.
src/i18n.cc:173: (style) Variable 'alt_str' is assigned a value that is never used.
src/io/dedicated_log.h:31: (style) 'struct DedicatedLog' does not have a copy constructor which is recommended since the class contains a pointer to allocated memory.
src/io/dedicated_log.cc:64: (portability) Non reentrant function 'localtime' called. For threadsafe applications it is recommended to use the reentrant replacement function 'localtime_r'.
src/io/dedicated_log.cc:95: (portability) Non reentrant function 'localtime' called. For threadsafe applications it is recommended to use the reentrant replacement function 'localtime_r'.
src/io/dedicated_log.cc:184: (portability) Non reentrant function 'localtime' called. For threadsafe applications it is recommended to use the reentrant replacement function 'localtime_r'.
src/io/dedicated_log.cc:187: (portability) Non reentrant function 'localtime' called. For threadsafe applications it is recommended to use the reentrant replacement function 'localtime_r'.
src/io/dedicated_log.cc:221: (portability) Non reentrant function 'localtime' called. For threadsafe applications it is recommended to use the reentrant replacement function 'localtime_r'.
src/io/filesystem/filesystem.cc:65: (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 'm_root' a value by passing the value to the constructor in the initialization list.
src/io/filesystem/filesystem.cc:1: (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/logic/areawatcher.cc:36: (performance) Parameter 'player_area' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/bob.cc:792: (performance) Parameter 'pos' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/building.cc:537: (style) Statements following return, break, continue, goto or throw will never be executed.
src/logic/building.cc:549: (style) Statements following return, break, continue, goto or throw will never be executed.
src/logic/building.cc:208: (performance) Parameter 'fc' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/building.cc:597: (performance) Parameter 'wi' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/building.cc:786: (performance) Parameter 'ware_index' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/building.cc:826: (performance) Parameter 'ware_index' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/checkstep.cc:62: (performance) Parameter 'start' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/checkstep.cc:62: (performance) Parameter 'end' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/checkstep.cc:73: (performance) Parameter 'dest' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/checkstep.cc:104: (performance) Parameter 'dest' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/checkstep.cc:127: (performance) Parameter 'start' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/checkstep.cc:128: (performance) Parameter 'end' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/checkstep.cc:163: (performance) Parameter 'start' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/checkstep.cc:163: (performance) Parameter 'end' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/checkstep.cc:194: (performance) Parameter 'dest' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/checkstep.cc:211: (performance) Parameter 'end' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/constructionsite.cc:100: (performance) Parameter 'wi' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/dismantlesite.cc:68: (performance) Parameter 'c' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/editor_game_base.cc:523: (performance) Parameter 'f' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/game.cc:600: (style) The obsolete function 'usleep' is called. POSIX.1-2001 declares usleep() function obsolete and POSIX.1-2008 removes it. It is recommended that new applications use the 'nanosleep' or 'setitimer' function.
src/logic/game.cc:760: (performance) Parameter 'coords' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/game.cc:760: (performance) Parameter 'id' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/game.cc:766: (performance) Parameter 'coords' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/game.cc:805: (performance) Parameter 'id' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/game.cc:824: (performance) Parameter 'index' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/game.cc:839: (performance) Parameter 'index' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/immovable.cc:215: (style) The scope of the variable 'program' 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/immovable.cc:237: (style) Variable 'it' is assigned a value that is never used.
src/logic/immovable.cc:71: (performance) Parameter 'c' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/immovable.cc:91: (performance) Parameter 'c' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/immovable.cc:323: (performance) Parameter 'coords' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/immovable.cc:460: (performance) Parameter 'f' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/immovable.cc:504: (performance) Parameter 'pos' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/map.cc:67: (warning) Member variable 'Map::m_filename' is not initialized in the constructor.
src/logic/map.cc:67: (warning) Member variable 'Map::m_author' is not initialized in the constructor.
src/logic/map.cc:67: (warning) Member variable 'Map::m_name' is not initialized in the constructor.
src/logic/map.cc:67: (warning) Member variable 'Map::m_description' is not initialized in the constructor.
src/logic/map.cc:88: (performance) Parameter 'fc' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/map.cc:384: (performance) Parameter 'new_origin' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/map.cc:575: (performance) Parameter 'c' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/map.cc:653: (performance) Parameter 'coord' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/map.cc:721: (performance) Parameter 'area' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/map.cc:738: (performance) Parameter 'cur' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/map.cc:825: (performance) Parameter 'cur' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/map.cc:934: (performance) Parameter 'cur' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/map.cc:1027: (performance) Parameter 'f' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/map.cc:1072: (performance) Parameter 'f' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/map.cc:1076: (performance) Parameter 'f' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/map.cc:1187: (performance) Parameter 'f' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/map.cc:1455: (performance) Parameter 'a' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/map.cc:1455: (performance) Parameter 'b' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/map.cc:1529: (performance) Parameter 'a' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/map.cc:1529: (performance) Parameter 'b' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/map.cc:1538: (performance) Parameter 'a' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/map.cc:1538: (performance) Parameter 'b' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/map.cc:1590: (performance) Parameter 'coords' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/map.cc:1612: (performance) Parameter 'coords' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/map.cc:1879: (performance) Parameter 'field' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/map.cc:1922: (performance) Parameter 'fc' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/map_revision.cc:31: (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 'm_map_creator_version' a value by passing the value to the constructor in the initialization list.
src/logic/maphollowregion.h:35: (performance) Parameter 'hollow_area' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/path.cc:120: (performance) Parameter 'c' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/player.cc:138: (warning) Member variable 'Player::m_view_changed' is not initialized in the constructor.
src/logic/player.cc:58: (performance) Parameter 'location' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/player.cc:112: (performance) Parameter 'bi' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/player.cc:372: (performance) Parameter 'fc' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/player.cc:406: (performance) Parameter 'c' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/player.cc:415: (performance) Parameter 'c' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/player.cc:503: (performance) Parameter 'location' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/player.cc:546: (performance) Parameter 'idx' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/player.cc:715: (performance) Parameter 'index_of_new_building' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/player.cc:728: (performance) Parameter 'index_of_new_building' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/player.cc:788: (performance) Parameter 'i' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/player.cc:800: (performance) Parameter 'i' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/player.cc:990: (performance) Parameter 'f' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/player.cc:1109: (performance) Parameter 'f' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/player.cc:1211: (performance) Parameter 'wareid' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/player.cc:1226: (performance) Parameter 'wareid' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/player.cc:1238: (performance) Parameter 'ware' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/player.cc:1250: (performance) Parameter 'ware' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/player.cc:1258: (performance) Parameter 'ware' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/playercommand.cc:222: (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 'bi' a value by passing the value to the constructor in the initialization list.
src/logic/playercommand.cc:276: (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 'coords' a value by passing the value to the constructor in the initialization list.
src/logic/playercommand.cc:329: (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 'start' a value by passing the value to the constructor in the initialization list.
src/logic/playercommand.cc:1121: (performance) Parameter 'index' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/playercommand.cc:1205: (performance) Parameter 'index' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/playercommand.cc:1283: (performance) Parameter '_ware_type' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/playercommand.cc:1329: (performance) Parameter '_ware_type' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/playercommand.cc:1393: (performance) Parameter '_ware_type' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/playercommand.cc:1451: (performance) Parameter '_ware_type' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/playercommand.cc:1515: (performance) Parameter '_ware_type' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/productionsite.cc:293: (performance) Parameter 'wi' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/productionsite.cc:515: (performance) Parameter 'wareid' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/soldier.cc:493: (performance) Parameter 'pos' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/trainingsite.cc:774: (performance) Prefix ++/-- operators should be preferred for non-primitive types. Pre-increment/decrement can be more efficient than post-increment/decrement. Post-increment/decrement usually involves keeping a copy of the previous value around and adds a little extra code.
src/logic/warehouse.cc:71: (performance) Parameter 'i' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/warehouse.cc:76: (performance) Parameter 'i' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/warehouse.cc:114: (performance) Parameter 'id' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/warehouse.cc:126: (performance) Parameter 'id' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/warehouse.cc:138: (performance) Parameter 'id' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/warehouse.cc:153: (performance) Parameter 'id' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/warehouse.cc:715: (performance) Parameter 'id' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/warehouse.cc:722: (performance) Parameter 'id' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/warehouse.cc:729: (performance) Parameter 'id' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/warehouse.cc:736: (performance) Parameter 'id' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/warehouse.cc:885: (performance) Parameter 'ware' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/warehouse.cc:966: (performance) Parameter 'worker' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/warehouse.cc:998: (performance) Parameter 'worker' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/warelist.cc:95: (performance) Parameter 'id' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/worker_descr.cc:224: (performance) Parameter 'index' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/logic/world.cc:258: (style) Variable 'res_str' is assigned a value that is never used.
src/map_generator.cc:461: (style) The scope of the variable 'landType' 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/map_generator.cc:47: (performance) Parameter 'fc' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/map_generator.cc:133: (performance) Parameter 'fc' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/map_generator.cc:200: (performance) Parameter 'c' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/map_generator.cc:446: (performance) Parameter 'c0' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/map_generator.cc:446: (performance) Parameter 'c1' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/map_generator.cc:446: (performance) Parameter 'c2' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/map_io/widelands_map_bob_data_packet.cc:37: (performance) Parameter 'coords' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/map_io/widelands_map_buildingdata_data_packet.cc:1679: (performance) Prefix ++/-- operators should be preferred for non-primitive types. Pre-increment/decrement can be more efficient than post-increment/decrement. Post-increment/decrement usually involves keeping a copy of the previous value around and adds a little extra code.
src/map_io/widelands_map_player_names_and_tribes_data_packet.cc:94: (style) Unused variable: name
src/map_io/widelands_map_player_names_and_tribes_data_packet.cc:94: (style) Unused variable: tribe
src/map_io/widelands_map_player_position_data_packet.cc] -> [src/map_io/widelands_map_player_position_data_packet.cc:48: (error) Internal error. Token::Match called with varid 0. Please report this to Cppcheck developers
src/map_io/widelands_map_players_messages_data_packet.cc] -> [src/map_io/widelands_map_players_messages_data_packet.cc:43: (error) Internal error. Token::Match called with varid 0. Please report this to Cppcheck developers
src/map_io/widelands_map_players_view_data_packet.cc:960: (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/widelands_map_players_view_data_packet.cc:971: (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/widelands_map_players_view_data_packet.cc:981: (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/widelands_map_players_view_data_packet.cc:983: (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/widelands_map_players_view_data_packet.cc:985: (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/widelands_map_resources_data_packet.cc:124: (style) Variable 'smap' is assigned a value that is never used.
src/minizip/unzip.cc:706: (style) Variable 'lSeek' is assigned a value that is never used.
src/network/internet_gaming.cc:109: (portability) Non reentrant function 'gethostbyname' called. For threadsafe applications it is recommended to use the reentrant replacement function 'gethostbyname_r'.
src/network/internet_gaming.cc:109: (style) Obsolete function 'gethostbyname' called. It is recommended to use the function 'getaddrinfo' instead.
src/network/nethost.cc:2231] -> [src/network/network_protocol.h:49: (style) Variable 'CLIENT_TIMESTAMP_INTERVAL' hides enumerator with same name
src/network/nethost.cc:449: (style) Unused variable: name
src/network/nethost.cc:2612: (style) Variable 'name' is assigned a value that is never used.
src/network/nethost.cc:763: (style) The obsolete function 'usleep' is called. POSIX.1-2001 declares usleep() function obsolete and POSIX.1-2008 removes it. It is recommended that new applications use the 'nanosleep' or 'setitimer' function.
src/network/nethost.cc:770: (style) The obsolete function 'usleep' is called. POSIX.1-2001 declares usleep() function obsolete and POSIX.1-2008 removes it. It is recommended that new applications use the 'nanosleep' or 'setitimer' function.
src/network/nethost.cc:271: (performance) Parameter 'ps' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/network/nethost.cc:1763: (performance) Parameter 'ps' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/network/nethost.cc:1152: (performance) Ineffective call of function 'substr' because it returns a copy of the object. Use operator= instead.
src/network/nethost.cc:740: (style) The scope of the variable 'needip' 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/nethost.cc:749: (style) Variable 'needip' is assigned a value that is never used.
src/s2map.cc:294] -> [src/s2map.cc:298: (performance) Variable 'section' is reassigned a value before the old one has been used.
src/s2map.cc:347] -> [src/s2map.cc:351: (performance) Variable 'section' is reassigned a value before the old one has been used.
src/s2map.cc:401] -> [src/s2map.cc:407: (performance) Variable 'section' is reassigned a value before the old one has been used.
src/s2map.cc:447] -> [src/s2map.cc:458: (performance) Variable 'section' is reassigned a value before the old one has been used.
src/s2map.cc:495] -> [src/s2map.cc:500: (performance) Variable 'section' is reassigned a value before the old one has been used.
src/s2map.cc:529] -> [src/s2map.cc:536: (performance) Variable 'section' is reassigned a value before the old one has been used.
src/s2map.cc:540] -> [src/s2map.cc:552: (performance) Variable 'section' is reassigned a value before the old one has been used.
src/s2map.cc:588] -> [src/s2map.cc:595: (performance) Variable 'section' is reassigned a value before the old one has been used.
src/s2map.cc:599] -> [src/s2map.cc:612: (performance) Variable 'section' is reassigned a value before the old one has been used.
src/s2map.cc:255: (style) The scope of the variable 'pc' 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_game.h:52] -> [src/scripting/lua_bases.h:72: (warning) The class 'L_Player' defines member variable with name 'className' also defined in its parent class 'L_PlayerBase'.
src/scripting/lua_game.h:52] -> [src/scripting/lua_bases.h:72: (warning) The class 'L_Player' defines member variable with name 'Methods' also defined in its parent class 'L_PlayerBase'.
src/scripting/lua_game.h:52] -> [src/scripting/lua_bases.h:72: (warning) The class 'L_Player' defines member variable with name 'Properties' also defined in its parent class 'L_PlayerBase'.
src/scripting/lua_map.h:146] -> [src/scripting/lua_map.h:100: (warning) The class 'L_BaseImmovable' defines member variable with name 'className' also defined in its parent class 'L_MapObject'.
src/scripting/lua_map.h:146] -> [src/scripting/lua_map.h:100: (warning) The class 'L_BaseImmovable' defines member variable with name 'Methods' also defined in its parent class 'L_MapObject'.
src/scripting/lua_map.h:146] -> [src/scripting/lua_map.h:100: (warning) The class 'L_BaseImmovable' defines member variable with name 'Properties' also defined in its parent class 'L_MapObject'.
src/scripting/lua_map.h:171] -> [src/scripting/lua_map.h:146: (warning) The class 'L_PlayerImmovable' defines member variable with name 'className' also defined in its parent class 'L_BaseImmovable'.
src/scripting/lua_map.h:171] -> [src/scripting/lua_map.h:146: (warning) The class 'L_PlayerImmovable' defines member variable with name 'Methods' also defined in its parent class 'L_BaseImmovable'.
src/scripting/lua_map.h:171] -> [src/scripting/lua_map.h:146: (warning) The class 'L_PlayerImmovable' defines member variable with name 'Properties' also defined in its parent class 'L_BaseImmovable'.
src/scripting/lua_map.h:198] -> [src/scripting/lua_map.h:171: (warning) The class 'L_Building' defines member variable with name 'className' also defined in its parent class 'L_PlayerImmovable'.
src/scripting/lua_map.h:198] -> [src/scripting/lua_map.h:171: (warning) The class 'L_Building' defines member variable with name 'Methods' also defined in its parent class 'L_PlayerImmovable'.
src/scripting/lua_map.h:198] -> [src/scripting/lua_map.h:171: (warning) The class 'L_Building' defines member variable with name 'Properties' also defined in its parent class 'L_PlayerImmovable'.
src/scripting/lua_map.h:305] -> [src/scripting/lua_map.h:171: (warning) The class 'L_Flag' defines member variable with name 'className' also defined in its parent class 'L_PlayerImmovable'.
src/scripting/lua_map.h:305] -> [src/scripting/lua_map.h:171: (warning) The class 'L_Flag' defines member variable with name 'Methods' also defined in its parent class 'L_PlayerImmovable'.
src/scripting/lua_map.h:305] -> [src/scripting/lua_map.h:171: (warning) The class 'L_Flag' defines member variable with name 'Properties' also defined in its parent class 'L_PlayerImmovable'.
src/scripting/lua_map.h:360] -> [src/scripting/lua_map.h:171: (warning) The class 'L_Road' defines member variable with name 'className' also defined in its parent class 'L_PlayerImmovable'.
src/scripting/lua_map.h:360] -> [src/scripting/lua_map.h:171: (warning) The class 'L_Road' defines member variable with name 'Methods' also defined in its parent class 'L_PlayerImmovable'.
src/scripting/lua_map.h:360] -> [src/scripting/lua_map.h:171: (warning) The class 'L_Road' defines member variable with name 'Properties' also defined in its parent class 'L_PlayerImmovable'.
src/scripting/lua_map.h:395] -> [src/scripting/lua_map.h:198: (warning) The class 'L_ConstructionSite' defines member variable with name 'className' also defined in its parent class 'L_Building'.
src/scripting/lua_map.h:395] -> [src/scripting/lua_map.h:198: (warning) The class 'L_ConstructionSite' defines member variable with name 'Methods' also defined in its parent class 'L_Building'.
src/scripting/lua_map.h:395] -> [src/scripting/lua_map.h:198: (warning) The class 'L_ConstructionSite' defines member variable with name 'Properties' also defined in its parent class 'L_Building'.
src/scripting/lua_map.h:423] -> [src/scripting/lua_map.h:198: (warning) The class 'L_Warehouse' defines member variable with name 'className' also defined in its parent class 'L_Building'.
src/scripting/lua_map.h:423] -> [src/scripting/lua_map.h:198: (warning) The class 'L_Warehouse' defines member variable with name 'Methods' also defined in its parent class 'L_Building'.
src/scripting/lua_map.h:423] -> [src/scripting/lua_map.h:198: (warning) The class 'L_Warehouse' defines member variable with name 'Properties' also defined in its parent class 'L_Building'.
src/scripting/lua_map.h:458] -> [src/scripting/lua_map.h:198: (warning) The class 'L_ProductionSite' defines member variable with name 'className' also defined in its parent class 'L_Building'.
src/scripting/lua_map.h:458] -> [src/scripting/lua_map.h:198: (warning) The class 'L_ProductionSite' defines member variable with name 'Methods' also defined in its parent class 'L_Building'.
src/scripting/lua_map.h:458] -> [src/scripting/lua_map.h:198: (warning) The class 'L_ProductionSite' defines member variable with name 'Properties' also defined in its parent class 'L_Building'.
src/scripting/lua_map.h:491] -> [src/scripting/lua_map.h:198: (warning) The class 'L_MilitarySite' defines member variable with name 'className' also defined in its parent class 'L_Building'.
src/scripting/lua_map.h:491] -> [src/scripting/lua_map.h:198: (warning) The class 'L_MilitarySite' defines member variable with name 'Methods' also defined in its parent class 'L_Building'.
src/scripting/lua_map.h:491] -> [src/scripting/lua_map.h:198: (warning) The class 'L_MilitarySite' defines member variable with name 'Properties' also defined in its parent class 'L_Building'.
src/scripting/lua_map.h:521] -> [src/scripting/lua_map.h:458: (warning) The class 'L_TrainingSite' defines member variable with name 'className' also defined in its parent class 'L_ProductionSite'.
src/scripting/lua_map.h:521] -> [src/scripting/lua_map.h:458: (warning) The class 'L_TrainingSite' defines member variable with name 'Methods' also defined in its parent class 'L_ProductionSite'.
src/scripting/lua_map.h:521] -> [src/scripting/lua_map.h:458: (warning) The class 'L_TrainingSite' defines member variable with name 'Properties' also defined in its parent class 'L_ProductionSite'.
src/scripting/lua_map.h:547] -> [src/scripting/lua_map.h:100: (warning) The class 'L_Bob' defines member variable with name 'className' also defined in its parent class 'L_MapObject'.
src/scripting/lua_map.h:547] -> [src/scripting/lua_map.h:100: (warning) The class 'L_Bob' defines member variable with name 'Methods' also defined in its parent class 'L_MapObject'.
src/scripting/lua_map.h:547] -> [src/scripting/lua_map.h:100: (warning) The class 'L_Bob' defines member variable with name 'Properties' also defined in its parent class 'L_MapObject'.
src/scripting/lua_map.h:571] -> [src/scripting/lua_map.h:547: (warning) The class 'L_Worker' defines member variable with name 'className' also defined in its parent class 'L_Bob'.
src/scripting/lua_map.h:571] -> [src/scripting/lua_map.h:547: (warning) The class 'L_Worker' defines member variable with name 'Methods' also defined in its parent class 'L_Bob'.
src/scripting/lua_map.h:571] -> [src/scripting/lua_map.h:547: (warning) The class 'L_Worker' defines member variable with name 'Properties' also defined in its parent class 'L_Bob'.
src/scripting/lua_map.h:596] -> [src/scripting/lua_map.h:571: (warning) The class 'L_Soldier' defines member variable with name 'className' also defined in its parent class 'L_Worker'.
src/scripting/lua_map.h:596] -> [src/scripting/lua_map.h:571: (warning) The class 'L_Soldier' defines member variable with name 'Methods' also defined in its parent class 'L_Worker'.
src/scripting/lua_map.h:596] -> [src/scripting/lua_map.h:571: (warning) The class 'L_Soldier' defines member variable with name 'Properties' also defined in its parent class 'L_Worker'.
src/scripting/lua_editor.h:35] -> [src/scripting/lua_bases.h:72: (warning) The class 'L_Player' defines member variable with name 'className' also defined in its parent class 'L_PlayerBase'.
src/scripting/lua_editor.h:35] -> [src/scripting/lua_bases.h:72: (warning) The class 'L_Player' defines member variable with name 'Methods' also defined in its parent class 'L_PlayerBase'.
src/scripting/lua_editor.h:35] -> [src/scripting/lua_bases.h:72: (warning) The class 'L_Player' defines member variable with name 'Properties' also defined in its parent class 'L_PlayerBase'.
src/scripting/lua_game.cc:468: (style) Variable 'title' is assigned a value that is never used.
src/scripting/lua_game.cc:469: (style) Variable 'body' is assigned a value that is never used.
src/scripting/lua_game.cc:990: (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 'm_name' a value by passing the value to the constructor in the initialization list.
src/scripting/lua_game.cc:994: (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_root.h:40] -> [src/scripting/lua_bases.h:40: (warning) The class 'L_Game' defines member variable with name 'className' also defined in its parent class 'L_EditorGameBase'.
src/scripting/lua_root.h:40] -> [src/scripting/lua_bases.h:40: (warning) The class 'L_Game' defines member variable with name 'Methods' also defined in its parent class 'L_EditorGameBase'.
src/scripting/lua_root.h:40] -> [src/scripting/lua_bases.h:40: (warning) The class 'L_Game' defines member variable with name 'Properties' also defined in its parent class 'L_EditorGameBase'.
src/scripting/lua_root.h:73] -> [src/scripting/lua_bases.h:40: (warning) The class 'L_Editor' defines member variable with name 'className' also defined in its parent class 'L_EditorGameBase'.
src/scripting/lua_root.h:73] -> [src/scripting/lua_bases.h:40: (warning) The class 'L_Editor' defines member variable with name 'Methods' also defined in its parent class 'L_EditorGameBase'.
src/scripting/lua_root.h:73] -> [src/scripting/lua_bases.h:40: (warning) The class 'L_Editor' defines member variable with name 'Properties' also defined in its parent class 'L_EditorGameBase'.
src/scripting/lua_ui.h:97] -> [src/scripting/lua_ui.h:47: (warning) The class 'L_Button' defines member variable with name 'className' also defined in its parent class 'L_Panel'.
src/scripting/lua_ui.h:97] -> [src/scripting/lua_ui.h:47: (warning) The class 'L_Button' defines member variable with name 'Methods' also defined in its parent class 'L_Panel'.
src/scripting/lua_ui.h:97] -> [src/scripting/lua_ui.h:47: (warning) The class 'L_Button' defines member variable with name 'Properties' also defined in its parent class 'L_Panel'.
src/scripting/lua_ui.h:123] -> [src/scripting/lua_ui.h:47: (warning) The class 'L_Tab' defines member variable with name 'className' also defined in its parent class 'L_Panel'.
src/scripting/lua_ui.h:123] -> [src/scripting/lua_ui.h:47: (warning) The class 'L_Tab' defines member variable with name 'Methods' also defined in its parent class 'L_Panel'.
src/scripting/lua_ui.h:123] -> [src/scripting/lua_ui.h:47: (warning) The class 'L_Tab' defines member variable with name 'Properties' also defined in its parent class 'L_Panel'.
src/scripting/lua_ui.h:149] -> [src/scripting/lua_ui.h:47: (warning) The class 'L_Window' defines member variable with name 'className' also defined in its parent class 'L_Panel'.
src/scripting/lua_ui.h:149] -> [src/scripting/lua_ui.h:47: (warning) The class 'L_Window' defines member variable with name 'Methods' also defined in its parent class 'L_Panel'.
src/scripting/lua_ui.h:149] -> [src/scripting/lua_ui.h:47: (warning) The class 'L_Window' defines member variable with name 'Properties' also defined in its parent class 'L_Panel'.
src/scripting/lua_ui.h:175] -> [src/scripting/lua_ui.h:47: (warning) The class 'L_MapView' defines member variable with name 'className' also defined in its parent class 'L_Panel'.
src/scripting/lua_ui.h:175] -> [src/scripting/lua_ui.h:47: (warning) The class 'L_MapView' defines member variable with name 'Methods' also defined in its parent class 'L_Panel'.
src/scripting/lua_ui.h:175] -> [src/scripting/lua_ui.h:47: (warning) The class 'L_MapView' defines member variable with name 'Properties' also defined in its parent class 'L_Panel'.
src/scripting/pluto.cc:1007: (style) The scope of the variable 'sizep' 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/pluto.cc:1007: (style) The scope of the variable 'sizek' 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/pluto.cc:1339: (style) Variable 'stacksize' is assigned a value that is never used.
src/scripting/test/test_luna.cc:89] -> [src/scripting/test/test_luna.cc:47: (warning) The class 'L_SubClass' defines member variable with name 'className' also defined in its parent class 'L_Class'.
src/scripting/test/test_luna.cc:89] -> [src/scripting/test/test_luna.cc:47: (warning) The class 'L_SubClass' defines member variable with name 'Methods' also defined in its parent class 'L_Class'.
src/scripting/test/test_luna.cc:89] -> [src/scripting/test/test_luna.cc:47: (warning) The class 'L_SubClass' defines member variable with name 'Properties' also defined in its parent class 'L_Class'.
src/scripting/test/test_luna.cc:112] -> [src/scripting/test/test_luna.cc:47: (warning) The class 'L_VirtualClass' defines member variable with name 'className' also defined in its parent class 'L_Class'.
src/scripting/test/test_luna.cc:112] -> [src/scripting/test/test_luna.cc:47: (warning) The class 'L_VirtualClass' defines member variable with name 'Methods' also defined in its parent class 'L_Class'.
src/scripting/test/test_luna.cc:112] -> [src/scripting/test/test_luna.cc:47: (warning) The class 'L_VirtualClass' defines member variable with name 'Properties' also defined in its parent class 'L_Class'.
src/scripting/test/test_luna.cc:146] -> [src/scripting/test/test_luna.cc:47: (warning) The class 'L_MultiClass' defines member variable with name 'className' also defined in its parent class 'L_Class'.
src/scripting/test/test_luna.cc:146] -> [src/scripting/test/test_luna.cc:47: (warning) The class 'L_MultiClass' defines member variable with name 'Methods' also defined in its parent class 'L_Class'.
src/scripting/test/test_luna.cc:146] -> [src/scripting/test/test_luna.cc:47: (warning) The class 'L_MultiClass' defines member variable with name 'Properties' also defined in its parent class 'L_Class'.
src/text_parser.cc:104: (style) Unused variable: block_text
src/text_parser.cc:52: (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 'm_font_color' a value by passing the value to the constructor in the initialization list.
src/timestring.cc:32: (portability) Non reentrant function 'localtime' called. For threadsafe applications it is recommended to use the reentrant replacement function 'localtime_r'.
src/ui_basic/listselect.cc:265: (performance) Parameter 'col' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/ui_basic/panel.cc:308: (performance) Parameter 'n' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/ui_basic/panel.cc:616: (performance) Parameter 'p' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/ui_basic/scrollbar.cc:246: (performance) Parameter 'r' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/ui_basic/scrollbar.cc:296: (performance) Parameter 'r' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/ui_basic/slider.cc:553: (performance) Parameter 'labels_in' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/ui_basic/table.h:145: (warning) Member variable '_data::d_picture' is not initialized in the constructor.
src/ui_basic/table.h:123: (performance) Parameter 'c' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/ui_fsmenu/internet_lobby.cc:401: (portability) Non reentrant function 'gethostbyname' called. For threadsafe applications it is recommended to use the reentrant replacement function 'gethostbyname_r'.
src/ui_fsmenu/internet_lobby.cc:401: (style) Obsolete function 'gethostbyname' called. It is recommended to use the function 'getaddrinfo' instead.
src/ui_fsmenu/netsetup_lan.cc:159: (portability) Non reentrant function 'gethostbyname' called. For threadsafe applications it is recommended to use the reentrant replacement function 'gethostbyname_r'.
src/ui_fsmenu/netsetup_lan.cc:159: (style) Obsolete function 'gethostbyname' called. It is recommended to use the function 'getaddrinfo' instead.
src/ui_fsmenu/options.cc:527] -> [src/ui_fsmenu/options.cc:529: (performance) Variable 'did_select_a_font' is reassigned a value before the old one has been used.
src/ui_fsmenu/options.h:37: (style) 'class Options_Ctrl' does not have a copy constructor which is recommended since the class contains a pointer to allocated memory.
src/wlapplication.cc:332: (warning) Assignment of function parameter has no effect outside the function.
src/wlapplication.cc:1808: (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.cc:1516: (style) The obsolete function 'usleep' is called. POSIX.1-2001 declares usleep() function obsolete and POSIX.1-2008 removes it. It is recommended that new applications use the 'nanosleep' or 'setitimer' function.
src/wlapplication.cc:763: (performance) Parameter 'position' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/wlapplication.cc:1965: (performance) Parameter 'ps' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/wlapplication.cc:2339: (style) Variable 'name_length' is assigned a value that is never used.
src/wui/actionconfirm.cc:460] -> [src/wui/actionconfirm.cc:458: (warning, inconclusive) Possible null pointer dereference: ship - otherwise it is redundant to check it against null.
src/wui/encyclopedia_window.h:49: (performance) Parameter 'o' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/wui/game_debug_ui.cc:473: (performance) Parameter 'coords' 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:174: (style) The scope of the variable 'buf' 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/wui/interactive_player.cc:452: (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/wui/interactive_player.cc:69: (performance) Parameter 'c' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/wui/interactive_spectator.cc:273: (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/vector.h:42: (performance) Parameter 'other' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/vector.h:47: (performance) Parameter 'other' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/wui/military_box.cc:108: (style) The scope of the variable 'buf' 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/wui/military_box.cc:123: (style) The scope of the variable 'buf' 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/wui/overlay_manager.cc:28: (warning) Member variable 'Overlay_Manager::register_overlay_callback_function' is not initialized in the constructor.
src/wui/overlay_manager.cc:28: (warning) Member variable 'Overlay_Manager::m_buildhelp_infos' is not initialized in the constructor.
src/wui/overlay_manager.cc:239: (performance) Parameter 'jobid' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/wui/overlay_manager.cc:279: (performance) Parameter 'jobid' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/wui/plot_area.cc:416: (performance) Parameter 'color' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/wui/quicknavigation.cc:48] -> [src/wui/quicknavigation.cc:50: (performance, inconclusive) Variable 'm_update' is reassigned a value before the old one has been used. Make sure that this variable is not used like a semaphore in a threading environment before simplifying this code.
src/wui/shipwindow.cc:256: (style) Variable 'moveable' is assigned a value that is never used.
src/wui/transport_ui.cc:106: (performance) Parameter 'ware' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/wui/ware_statistics_menu.cc:126: (performance) Parameter 'ware' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/wui/watchwindow.cc:400: (performance) Parameter 'coords' is passed by value. It could be passed as a (const) reference which is usually faster and recommended in C++.
src/economy/test/test_routing.cc:170: (style) The function 'BOOST_AUTO_TEST_CASE' is never used.
src/economy/test/test_road.cc:91: (style) The function 'BOOST_FIXTURE_TEST_CASE' is never used.
src/scripting/lua_bases.cc:213: (style) The function '__eq' is never used.
src/scripting/lua_bases.cc:224: (style) The function '__tostring' is never used.
src/scripting/lua_ui.cc:692: (style) The function 'abort_road_building' is never used.
src/scripting/lua_game.cc:580: (style) The function 'add_objective' is never used.
src/logic/editor_game_base.cc:455: (style) The function 'add_trackpointer' is never used.
src/scripting/lua_game.cc:545: (style) The function 'allow_buildings' is never used.
src/scripting/lua_game.cc:853: (style) The function 'allow_workers' is never used.
src/logic/checkstep.cc:49: (style) The function 'alwaysfalse' is never used.
src/economy/router.cc:38: (style) The function 'assign_cycle' is never used.
src/wui/game_objectives_menu.cc:127: (style) The function 'claim_victory' is never used.
src/scripting/lua_ui.cc:377: (style) The function 'click' is never used.
src/wui/general_statistics_menu.cc:298: (style) The function 'clicked_help' is never used.
src/scripting/scripting.cc:555: (style) The function 'create_LuaGameInterface' is never used.
src/graphic/image_cache.cc:129: (style) The function 'create_image_cache' is never used.
src/graphic/surface_cache.cc:134: (style) The function 'create_surface_cache' is never used.
src/logic/warehouse.cc:1195: (style) The function 'disable_spawn' is never used.
src/scripting/lua_game.cc:558: (style) The function 'forbid_buildings' is never used.
src/profile/profile.cc:564: (style) The function 'get_Player_Number' is never used.
src/logic/game.cc:162: (style) The function 'get_allow_cheats' is never used.
src/scripting/lua_game.cc:719: (style) The function 'get_buildings' is never used.
src/wui/interactive_gamebase.cc:67: (style) The function 'get_chat_provider' is never used.
src/editor/tools/editor_set_starting_pos_tool.cc:115: (style) The function 'get_current_player' is never used.
src/scripting/lua_ui.cc:302: (style) The function 'get_descendant_position' is never used.
src/graphic/render/terrain_sdl.cc:24: (style) The function 'get_horiz_linearcomb' is never used.
src/ui_basic/multilineeditbox.cc:183: (style) The function 'get_maximum_bytes' is never used.
src/sound/sound_handler.cc:637: (style) The function 'get_music_volume' is never used.
src/profile/profile.cc:328: (style) The function 'get_safe_natural' is never used.
src/scripting/lua_map.cc:251: (style) The function 'get_soldiers' is never used.
src/scripting/lua_game.cc:828: (style) The function 'get_suitability' is never used.
src/logic/editor_game_base.cc:473: (style) The function 'get_trackpointer' is never used.
src/ui_fsmenu/base.cc:83: (style) The function 'gr_x' is never used.
src/ui_fsmenu/base.cc:87: (style) The function 'gr_y' is never used.
src/scripting/lua_map.cc:2025: (style) The function 'has_caps' is never used.
src/ui_basic/spinbox.cc:344: (style) The function 'has_replacement' is never used.
src/scripting/lua_game.cc:647: (style) The function 'hide_fields' is never used.
src/scripting/pluto.cc:1319: (style) The function 'inreftable' is never used.
src/scripting/lua_root.cc:185: (style) The function 'launch_coroutine' is never used.
src/editor/ui_menus/editor_player_menu.cc:380: (style) The function 'make_infrastructure_clicked' is never used.
src/graphic/text/rt_render.cc:999: (style) The function 'make_reference_map' is never used.
src/scripting/lua_game.cc:433: (style) The function 'message_box' is never used.
src/scripting/test/test_luna.cc:135: (style) The function 'multitest' is never used.
src/economy/flag.cc:316: (style) The function 'nr_of_roads' is never used.
src/logic/worker_program.cc:433: (style) The function 'parse_animation' is never used.
src/logic/worker_program.cc:159: (style) The function 'parse_breed' is never used.
src/logic/worker_program.cc:666: (style) The function 'parse_construct' is never used.
src/logic/worker_program.cc:544: (style) The function 'parse_create_bob' is never used.
src/logic/worker_program.cc:110: (style) The function 'parse_createitem' is never used.
src/logic/worker_program.cc:239: (style) The function 'parse_findobject' is never used.
src/logic/worker_program.cc:318: (style) The function 'parse_findspace' is never used.
src/logic/worker_program.cc:577: (style) The function 'parse_geologist' is never used.
src/logic/worker_program.cc:606: (style) The function 'parse_geologist_find' is never used.
src/logic/worker_program.cc:132: (style) The function 'parse_mine' is never used.
src/logic/worker_program.cc:489: (style) The function 'parse_object' is never used.
src/logic/worker_program.cc:512: (style) The function 'parse_plant' is never used.
src/logic/worker_program.cc:640: (style) The function 'parse_playFX' is never used.
src/logic/critter_bob.cc:100: (style) The function 'parse_remove' is never used.
src/logic/worker_program.cc:557: (style) The function 'parse_removeobject' is never used.
src/logic/worker_program.cc:471: (style) The function 'parse_return' is never used.
src/logic/worker_program.cc:626: (style) The function 'parse_scout' is never used.
src/logic/worker_program.cc:203: (style) The function 'parse_setbobdescription' is never used.
src/logic/worker_program.cc:186: (style) The function 'parse_setdescription' is never used.
src/logic/worker_program.cc:403: (style) The function 'parse_walk' is never used.
src/scripting/lua_bases.cc:383: (style) The function 'place_building' is never used.
src/scripting/lua_bases.cc:251: (style) The function 'place_flag' is never used.
src/scripting/lua_bases.cc:288: (style) The function 'place_road' is never used.
src/scripting/lua_ui.cc:366: (style) The function 'press' is never used.
src/logic/requirements.cc:178: (style) The function 'readAnd' is never used.
src/logic/requirements.cc:223: (style) The function 'readAttribute' is never used.
src/logic/requirements.cc:135: (style) The function 'readOr' is never used.
src/scripting/lua_map.cc:2646: (style) The function 'region' is never used.
src/ui_basic/spinbox.cc:332: (style) The function 'remove_replacement' is never used.
src/logic/editor_game_base.cc:490: (style) The function 'remove_trackpointer' is never used.
src/graphic/graphic.cc:589: (style) The function 'reset_texture_animation_reminder' is never used.
src/wui/game_objectives_menu.cc:135: (style) The function 'restart_mission' is never used.
src/scripting/lua_game.cc:695: (style) The function 'reveal_campaign' is never used.
src/scripting/lua_game.cc:618: (style) The function 'reveal_fields' is never used.
src/scripting/lua_game.cc:675: (style) The function 'reveal_scenario' is never used.
src/logic/worker.cc:309: (style) The function 'run_setdescription' is never used.
src/economy/shippingitem.cc:128: (style) The function 'schedule_update' is never used.
src/scripting/lua_game.cc:522: (style) The function 'seen_field' is never used.
src/scripting/lua_game.cc:503: (style) The function 'sees_field' is never used.
src/logic/game.cc:852: (style) The function 'send_player_change_training_options' is never used.
src/ui_basic/editbox.cc:156: (style) The function 'setMaxLength' is never used.
src/ui_basic/spinbox.cc:227: (style) The function 'setUnit' is never used.
src/profile/profile.cc:647: (style) The function 'set_Building_Index' is never used.
src/profile/profile.cc:637: (style) The function 'set_Immovable_Type' is never used.
src/scripting/lua_root.cc:152: (style) The function 'set_allow_autosaving' is never used.
src/graphic/richtext.cc:163: (style) The function 'set_background_color' is never used.
src/scripting/lua_game.cc:1042: (style) The function 'set_body' is never used.
src/scripting/lua_ui.cc:591: (style) The function 'set_buildhelp' is never used.
src/scripting/lua_ui.cc:605: (style) The function 'set_census' is never used.
src/scripting/lua_game.cc:228: (style) The function 'set_changing_retreat_percentage_allowed' is never used.
src/scripting/lua_root.cc:123: (style) The function 'set_desired_speed' is never used.
src/ui_basic/listselect.cc:264: (style) The function 'set_entry_color' is never used.
src/graphic/text/rt_render.cc:132: (style) The function 'set_halign' is never used.
src/wui/itemwaresdisplay.cc:79: (style) The function 'set_itemsperrow' is never used.
src/ui_basic/multilineeditbox.cc:170: (style) The function 'set_maximum_bytes' is never used.
src/ui_basic/slider.cc:127: (style) The function 'set_min_value' is never used.
src/scripting/lua_ui.cc:208: (style) The function 'set_mouse_position_x' is never used.
src/scripting/lua_ui.cc:220: (style) The function 'set_mouse_position_y' is never used.
src/scripting/lua_ui.cc:267: (style) The function 'set_position_x' is never used.
src/scripting/lua_ui.cc:280: (style) The function 'set_position_y' is never used.
src/scripting/test/test_luna.cc:67: (style) The function 'set_prop1' is never used.
src/scripting/lua_map.cc:2330: (style) The function 'set_raw_height' is never used.
src/scripting/lua_map.cc:2380: (style) The function 'set_resource' is never used.
src/scripting/lua_map.cc:2404: (style) The function 'set_resource_amount' is never used.
src/scripting/lua_map.cc:267: (style) The function 'set_soldiers' is never used.
src/scripting/lua_ui.cc:622: (style) The function 'set_statistics' is never used.
src/scripting/lua_game.cc:264: (style) The function 'set_team' is never used.
src/scripting/lua_map.cc:2495: (style) The function 'set_terd' is never used.
src/scripting/lua_map.cc:2473: (style) The function 'set_terr' is never used.
src/scripting/lua_ui.cc:551: (style) The function 'set_viewpoint_x' is never used.
src/scripting/lua_ui.cc:568: (style) The function 'set_viewpoint_y' is never used.
src/scripting/lua_map.cc:1342: (style) The function 'set_wares' is never used.
src/scripting/lua_map.cc:126: (style) The function 'set_workers' is never used.
src/scripting/lua_ui.cc:670: (style) The function 'start_road_building' is never used.
src/scripting/test/test_luna.cc:92: (style) The function 'subtest' is never used.
src/ui_basic/listselect.cc:204: (style) The function 'switch_entries' is never used.
src/scripting/lua_game.cc:904: (style) The function 'switchplayer' is never used.
src/graphic/text/sdl_ttf_font_loader_from_file.cc:59: (style) The function 'ttf_fontloader_from_file' is never used.
src/ui_basic/panel.cc:1159: (style) The function 'ui_key' is never used.
src/ui_basic/panel.cc:1113: (style) The function 'ui_mousepress' is never used.
src/wui/waresdisplay.cc:431: (style) The function 'unhide_ware' is never used.
src/editor/editorinteractive.cc:535: (style) The function 'unreference_player_tribe' is never used.
src/scripting/test/test_luna.cc:115: (style) The function 'virtualtest' is never used.
src/wui/waresdisplay.cc:440: (style) The function 'ware_hidden' 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.