Issues reported by cppcheck
Bug #986611 reported by
Hans Joachim Desserud
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
widelands |
Won't Fix
|
Low
|
Unassigned |
Bug Description
Attached you should find an up to date report of the issues found by cppcheck. This is generated by running the script utils/create_
It currently lists various issues, the majority seem to be parameters which should be passed as reference, values not initialized by the constructor.
PS. For other warning reports, see bug 1258667 (Clang), bug 1278174 (flawfinder) and bug 1202101 (Visual Studio).
Related branches
lp:~hjd/widelands/optimizations
- Widelands Developers: Pending requested
-
Diff: 473 lines (+45/-45)22 files modifiedsrc/economy/flag.cc (+2/-2)
src/economy/test/test_routing.cc (+2/-2)
src/game_io/game_cmd_queue_data_packet.cc (+1/-1)
src/graphic/richtext.cc (+1/-1)
src/i18n.cc (+2/-2)
src/logic/bob.cc (+3/-3)
src/logic/building.cc (+2/-2)
src/logic/cmd_queue.cc (+1/-1)
src/logic/game.cc (+1/-1)
src/logic/immovable.cc (+1/-1)
src/logic/militarysite.cc (+1/-1)
src/logic/player.cc (+1/-1)
src/logic/production_program.cc (+1/-1)
src/logic/productionsite.cc (+3/-3)
src/logic/soldier.cc (+11/-11)
src/logic/tribe.cc (+1/-1)
src/logic/warehouse.cc (+3/-3)
src/logic/worker.cc (+2/-2)
src/network/nethost.cc (+2/-2)
src/ui_basic/box.cc (+2/-2)
src/writeHTML.cc (+1/-1)
src/wui/soldierlist.cc (+1/-1)
lp:~hjd/widelands/assert
- Widelands Developers: Pending requested
-
Diff: 13 lines (+1/-1)1 file modifiedsrc/logic/message_queue.h (+1/-1)
lp:~hjd/widelands/more-empty-fixes
- Widelands Developers: Pending requested
-
Diff: 47 lines (+4/-4)3 files modifiedsrc/logic/bob.cc (+1/-1)
src/logic/player.cc (+2/-2)
src/wui/game_tips.cc (+1/-1)
lp:~qcumber-some/widelands/cppcheck_const_refs
- Widelands Developers: Pending requested
-
Diff: 1062 lines (+123/-123)44 files modifiedsrc/descr_maintainer.h (+2/-2)
src/economy/economy.h (+10/-10)
src/economy/test/test_road.cc (+1/-1)
src/economy/test/test_routing.cc (+1/-1)
src/economy/warehousesupply.h (+2/-2)
src/gamesettings.h (+1/-1)
src/graphic/animation_gfx.h (+2/-2)
src/graphic/render/gameview.cc (+5/-5)
src/graphic/render/terrain_sdl.h (+2/-2)
src/io/basic_fileread.h (+3/-3)
src/io/basic_filewrite.h (+2/-2)
src/journal.cc (+2/-2)
src/logic/cmd_expire_message.h (+1/-1)
src/logic/dismantlesite.cc (+1/-1)
src/logic/dismantlesite.h (+1/-1)
src/logic/immovable.cc (+1/-1)
src/logic/immovable.h (+1/-1)
src/logic/map.cc (+3/-3)
src/logic/message_id.h (+3/-3)
src/logic/message_queue.h (+3/-3)
src/logic/path.cc (+2/-2)
src/logic/path.h (+4/-4)
src/logic/player.cc (+4/-4)
src/logic/player.h (+9/-9)
src/logic/playercommand.h (+7/-7)
src/logic/production_program.h (+2/-2)
src/logic/productionsite.h (+3/-3)
src/logic/soldier.cc (+1/-1)
src/logic/soldier.h (+1/-1)
src/logic/tribe.h (+5/-5)
src/logic/warelist.h (+1/-1)
src/manager.h (+2/-2)
src/map_generator.cc (+2/-2)
src/map_generator.h (+2/-2)
src/map_io/widelands_map_message_saver.h (+2/-2)
src/network/netclient.cc (+1/-1)
src/network/netclient.h (+1/-1)
src/network/nethost.cc (+1/-1)
src/rect.h (+1/-1)
src/ui_basic/checkbox.h (+1/-1)
src/vector.h (+2/-2)
src/wlapplication.cc (+15/-15)
src/wui/encyclopedia_window.h (+1/-1)
src/wui/overlay_manager.h (+6/-6)
lp:~qcumber-some/widelands/cppcheck_prefix_plusplus
- SirVer: Approve
-
Diff: 145 lines (+14/-14)8 files modifiedsrc/economy/test/test_routing.cc (+2/-2)
src/editor/tools/editor_draw_tool.cc (+2/-2)
src/editor/tools/editor_place_bob_tool.cc (+2/-2)
src/editor/tools/editor_place_immovable_tool.cc (+2/-2)
src/editor/tools/editor_set_resources_tool.cc (+2/-2)
src/editor/tools/editor_set_terrain_tool.cc (+2/-2)
src/scripting/scripting.cc (+1/-1)
src/wui/waresdisplay.cc (+1/-1)
lp:~hjd/widelands/cppcheck-fixes
- SirVer: Approve
-
Diff: 227 lines (+53/-59)6 files modifiedsrc/ai/defaultai.cc (+1/-2)
src/logic/production_program.cc (+3/-3)
src/logic/worker.cc (+1/-3)
src/ui_basic/panel.cc (+4/-5)
src/wlapplication.cc (+2/-2)
src/wui/attack_box.cc (+42/-44)
lp:~hjd/widelands/cppcheck-issues
- SirVer: Approve
- Hans Joachim Desserud: Needs Resubmitting
-
Diff: 152 lines (+7/-15)10 files modifiedsrc/economy/request.cc (+1/-1)
src/logic/world.cc (+0/-1)
src/map_generator.cc (+1/-2)
src/map_io/widelands_map_player_names_and_tribes_data_packet.cc (+0/-1)
src/map_io/widelands_map_resources_data_packet.cc (+0/-2)
src/network/nethost.cc (+2/-2)
src/text_parser.cc (+0/-1)
src/ui_fsmenu/options.cc (+1/-2)
src/wui/game_main_menu_save_game.cc (+1/-1)
src/wui/military_box.cc (+1/-2)
lp:~hjd/widelands/code-cleanup
- SirVer: Approve
-
Diff: 53 lines (+2/-6)3 files modifiedsrc/sound/sound_handler.cc (+1/-2)
src/wui/military_box.cc (+1/-2)
src/wui/shipwindow.cc (+0/-2)
lp:~widelands-dev/widelands/bug-986611-asserts
- TiborB: Approve
-
Diff: 66 lines (+16/-5)3 files modifiedsrc/economy/routeastar.cc (+4/-1)
src/io/filesystem/zip_filesystem.cc (+9/-3)
src/network/internet_gaming.cc (+3/-1)
lp:~widelands-dev/widelands/bug-986611-cppcheck_memleak
Rejected
for merging
into
lp:widelands
- SirVer: Disapprove
-
Diff: 234 lines (+69/-77)4 files modifiedsrc/ui_fsmenu/launch_mpg.cc (+30/-30)
src/wui/actionconfirm.cc (+17/-19)
src/wui/game_main_menu_save_game.cc (+19/-27)
src/wui/game_main_menu_save_game.h (+3/-1)
lp:~widelands-dev/widelands/bug-986611-cppcheck_performance-ui
- SirVer: Approve
-
Diff: 424 lines (+88/-65)24 files modifiedsrc/ui_basic/listselect.cc (+1/-1)
src/ui_basic/listselect.h (+1/-1)
src/ui_basic/slider.cc (+1/-1)
src/ui_basic/slider.h (+1/-1)
src/ui_basic/table.h (+1/-1)
src/ui_fsmenu/base.cc (+3/-4)
src/wui/field_overlay_manager.cc (+1/-1)
src/wui/field_overlay_manager.h (+1/-1)
src/wui/game_debug_ui.cc (+1/-1)
src/wui/game_debug_ui.h (+1/-1)
src/wui/interactive_base.h (+1/-1)
src/wui/interactive_gamebase.h (+1/-1)
src/wui/interactive_player.cc (+1/-1)
src/wui/interactive_player.h (+2/-2)
src/wui/interactive_spectator.cc (+1/-1)
src/wui/interactive_spectator.h (+1/-1)
src/wui/mapdata.cc (+54/-34)
src/wui/mapdata.h (+8/-4)
src/wui/plot_area.cc (+1/-1)
src/wui/plot_area.h (+1/-1)
src/wui/vector.h (+2/-2)
src/wui/waresdisplay.cc (+1/-1)
src/wui/watchwindow.cc (+1/-1)
src/wui/watchwindow.h (+1/-1)
lp:~widelands-dev/widelands/bug-986611-cppcheck_performance-editor
- SirVer: Approve
-
Diff: 876 lines (+83/-83)41 files modifiedsrc/editor/map_generator.cc (+2/-2)
src/editor/map_generator.h (+2/-2)
src/editor/tools/decrease_height_tool.cc (+2/-2)
src/editor/tools/decrease_height_tool.h (+2/-2)
src/editor/tools/decrease_resources_tool.cc (+2/-2)
src/editor/tools/decrease_resources_tool.h (+2/-2)
src/editor/tools/delete_bob_tool.cc (+2/-2)
src/editor/tools/delete_bob_tool.h (+2/-2)
src/editor/tools/delete_immovable_tool.cc (+2/-2)
src/editor/tools/delete_immovable_tool.h (+2/-2)
src/editor/tools/draw_tool.cc (+2/-2)
src/editor/tools/draw_tool.h (+2/-2)
src/editor/tools/history.cc (+1/-1)
src/editor/tools/history.h (+1/-1)
src/editor/tools/increase_height_tool.cc (+2/-2)
src/editor/tools/increase_height_tool.h (+2/-2)
src/editor/tools/increase_resources_tool.cc (+2/-2)
src/editor/tools/increase_resources_tool.h (+2/-2)
src/editor/tools/info_tool.cc (+1/-1)
src/editor/tools/info_tool.h (+1/-1)
src/editor/tools/make_infrastructure_tool.cc (+1/-1)
src/editor/tools/make_infrastructure_tool.h (+1/-1)
src/editor/tools/noise_height_tool.cc (+2/-2)
src/editor/tools/noise_height_tool.h (+4/-4)
src/editor/tools/place_bob_tool.cc (+2/-2)
src/editor/tools/place_bob_tool.h (+2/-2)
src/editor/tools/place_immovable_tool.cc (+2/-2)
src/editor/tools/place_immovable_tool.h (+2/-2)
src/editor/tools/set_height_tool.cc (+2/-2)
src/editor/tools/set_height_tool.h (+3/-3)
src/editor/tools/set_origin_tool.cc (+2/-2)
src/editor/tools/set_origin_tool.h (+2/-2)
src/editor/tools/set_port_space_tool.cc (+4/-4)
src/editor/tools/set_port_space_tool.h (+4/-4)
src/editor/tools/set_resources_tool.cc (+2/-2)
src/editor/tools/set_resources_tool.h (+2/-2)
src/editor/tools/set_starting_pos_tool.cc (+1/-1)
src/editor/tools/set_starting_pos_tool.h (+1/-1)
src/editor/tools/set_terrain_tool.cc (+2/-2)
src/editor/tools/set_terrain_tool.h (+2/-2)
src/editor/tools/tool.h (+4/-4)
lp:~widelands-dev/widelands/bug-986611-cppcheck_performance-logic
- SirVer: Approve
-
Diff: 1311 lines (+160/-169)45 files modifiedsrc/ai/ai_help_structs.cc (+1/-1)
src/ai/ai_help_structs.h (+1/-1)
src/ai/defaultai.cc (+3/-3)
src/ai/defaultai.h (+3/-3)
src/economy/flag.cc (+1/-1)
src/economy/flag.h (+1/-1)
src/economy/itransport_cost_calculator.h (+1/-1)
src/economy/test/test_road.cc (+1/-1)
src/economy/test/test_routing.cc (+2/-2)
src/logic/cmd_delete_message.h (+1/-1)
src/logic/editor_game_base.cc (+10/-10)
src/logic/editor_game_base.h (+10/-10)
src/logic/game.cc (+2/-2)
src/logic/game.h (+2/-2)
src/logic/game_settings.h (+1/-1)
src/logic/map.cc (+19/-19)
src/logic/map.h (+16/-16)
src/logic/map_objects/checkstep.cc (+9/-9)
src/logic/map_objects/checkstep.h (+8/-8)
src/logic/map_objects/immovable.cc (+3/-3)
src/logic/map_objects/immovable.h (+3/-3)
src/logic/map_objects/tribes/building.cc (+1/-1)
src/logic/map_objects/tribes/building.h (+1/-1)
src/logic/map_objects/tribes/ship.h (+1/-1)
src/logic/map_objects/tribes/trainingsite.cc (+6/-9)
src/logic/map_objects/world/map_gen.cc (+4/-4)
src/logic/maptriangleregion.h (+1/-1)
src/logic/message.h (+1/-1)
src/logic/player.cc (+6/-6)
src/logic/player.h (+5/-5)
src/logic/playercommand.cc (+11/-13)
src/logic/playercommand.h (+5/-5)
src/logic/single_player_game_settings_provider.cc (+1/-1)
src/logic/single_player_game_settings_provider.h (+1/-1)
src/logic/widelands_geometry.h (+2/-2)
src/logic/widelands_geometry_io.cc (+1/-1)
src/logic/widelands_geometry_io.h (+1/-1)
src/map_io/map_bob_packet.cc (+1/-1)
src/map_io/map_bob_packet.h (+1/-1)
src/map_io/map_buildingdata_packet.cc (+5/-9)
src/map_io/map_message_saver.h (+2/-2)
src/network/netclient.cc (+1/-1)
src/network/netclient.h (+1/-1)
src/network/nethost.cc (+2/-2)
src/network/nethost.h (+1/-1)
lp:~widelands-dev/widelands/bug-986611-cppcheck_performance
- SirVer: Approve
-
Diff: 183 lines (+24/-24)9 files modifiedsrc/graphic/richtext.cc (+1/-1)
src/graphic/text_parser.cc (+8/-8)
src/io/fileread.cc (+3/-3)
src/io/fileread.h (+4/-3)
src/io/filesystem/disk_filesystem.cc (+2/-2)
src/io/filesystem/filesystem.cc (+3/-3)
src/io/filewrite.cc (+1/-1)
src/io/filewrite.h (+1/-1)
src/scripting/lua_game.cc (+1/-2)
lp:~widelands-dev/widelands/bug-986611-cppcheck-unused
- SirVer: Approve
-
Diff: 297 lines (+2/-106)16 files modifiedsrc/base/time_string.cc (+1/-1)
src/logic/editor_game_base.cc (+1/-42)
src/logic/editor_game_base.h (+0/-10)
src/logic/game.cc (+0/-6)
src/logic/game.h (+0/-2)
src/logic/map_objects/map_object.cc (+0/-11)
src/logic/map_objects/map_object.h (+0/-1)
src/logic/map_objects/tribes/tribe_descr.cc (+0/-3)
src/logic/map_objects/tribes/tribe_descr.h (+0/-1)
src/scripting/lua_game.cc (+0/-3)
src/ui_basic/editbox.cc (+0/-6)
src/ui_basic/editbox.h (+0/-1)
src/ui_basic/multilineeditbox.cc (+0/-7)
src/ui_basic/multilineeditbox.h (+0/-1)
src/wui/itemwaresdisplay.cc (+0/-10)
src/wui/itemwaresdisplay.h (+0/-1)
lp:~hjd/widelands/some-cppcheck-fixes
- Klaus Halfmann: Approve
-
Diff: 53 lines (+1/-6)3 files modifiedsrc/logic/map_objects/immovable.cc (+1/-1)
src/logic/map_objects/tribes/tribes.cc (+0/-3)
src/network/nethost.cc (+0/-2)
lp:~widelands-dev/widelands/bug-986611-cppcheck-explicit-constructors
- SirVer: Approve
-
Diff: 2713 lines (+287/-287)112 files modifiedsrc/ai/ai_help_structs.h (+6/-6)
src/ai/ai_hints.h (+1/-1)
src/base/i18n.h (+1/-1)
src/economy/economy.h (+1/-1)
src/economy/economy_data_packet.h (+1/-1)
src/economy/expedition_bootstrap.h (+2/-2)
src/economy/fleet.h (+1/-1)
src/economy/idleworkersupply.h (+1/-1)
src/economy/portdock.h (+1/-1)
src/economy/router.h (+1/-1)
src/economy/shippingitem.h (+2/-2)
src/economy/trackptr.h (+3/-3)
src/economy/ware_instance.cc (+1/-1)
src/economy/warehousesupply.h (+1/-1)
src/editor/editorinteractive.h (+1/-1)
src/editor/tools/action_args.h (+1/-1)
src/editor/tools/place_critter_tool.h (+1/-1)
src/editor/tools/place_immovable_tool.h (+1/-1)
src/editor/tools/set_port_space_tool.h (+1/-1)
src/editor/ui_menus/main_menu_load_map.h (+1/-1)
src/editor/ui_menus/main_menu_new_map.h (+1/-1)
src/editor/ui_menus/main_menu_random_map.h (+1/-1)
src/editor/ui_menus/main_menu_save_map.h (+1/-1)
src/graphic/animation.cc (+1/-1)
src/graphic/font_handler1.cc (+1/-1)
src/graphic/gl/utils.cc (+1/-1)
src/graphic/image_io.h (+1/-1)
src/graphic/render_queue.cc (+1/-1)
src/graphic/rendertarget.h (+1/-1)
src/graphic/richtext.cc (+1/-1)
src/graphic/text/font_set.h (+1/-1)
src/graphic/text/rendered_text.h (+4/-4)
src/graphic/text/rt_errors.h (+2/-2)
src/graphic/text/rt_parse.h (+2/-2)
src/graphic/text/rt_render.cc (+5/-5)
src/graphic/text/textstream.h (+1/-1)
src/graphic/text/texture_cache.h (+1/-1)
src/graphic/text/transient_cache.h (+1/-1)
src/graphic/texture_atlas.h (+1/-1)
src/io/filesystem/disk_filesystem.cc (+3/-3)
src/io/filesystem/disk_filesystem.h (+1/-1)
src/io/filesystem/zip_filesystem.h (+1/-1)
src/logic/cmd_calculate_statistics.h (+1/-1)
src/logic/cmd_queue.h (+3/-3)
src/logic/editor_game_base.h (+1/-1)
src/logic/findbob.h (+2/-2)
src/logic/findimmovable.h (+6/-6)
src/logic/map_objects/bob.cc (+1/-1)
src/logic/map_objects/bob.h (+2/-2)
src/logic/map_objects/immovable.h (+2/-2)
src/logic/map_objects/map_object.h (+1/-1)
src/logic/map_objects/tribes/bill_of_materials.h (+1/-1)
src/logic/map_objects/tribes/building.h (+1/-1)
src/logic/map_objects/tribes/carrier.h (+1/-1)
src/logic/map_objects/tribes/constructionsite.h (+1/-1)
src/logic/map_objects/tribes/dismantlesite.h (+2/-2)
src/logic/map_objects/tribes/militarysite.h (+1/-1)
src/logic/map_objects/tribes/partially_finished_building.h (+1/-1)
src/logic/map_objects/tribes/production_program.h (+7/-7)
src/logic/map_objects/tribes/productionsite.h (+1/-1)
src/logic/map_objects/tribes/requirements.h (+1/-1)
src/logic/map_objects/tribes/ship.h (+1/-1)
src/logic/map_objects/tribes/soldier.cc (+1/-1)
src/logic/map_objects/tribes/soldier.h (+2/-2)
src/logic/map_objects/tribes/trainingsite.h (+1/-1)
src/logic/map_objects/tribes/tribe_basic_info.h (+1/-1)
src/logic/map_objects/tribes/warehouse.h (+2/-2)
src/logic/map_objects/tribes/worker.cc (+2/-2)
src/logic/map_objects/tribes/worker.h (+1/-1)
src/logic/map_objects/world/critter.h (+1/-1)
src/logic/map_objects/world/critter_program.h (+1/-1)
src/logic/map_objects/world/editor_category.h (+1/-1)
src/logic/map_objects/world/map_gen.h (+1/-1)
src/logic/map_objects/world/resource_description.h (+1/-1)
src/logic/map_objects/world/terrain_description.h (+1/-1)
src/logic/mapastar.h (+2/-2)
src/logic/objective.h (+1/-1)
src/logic/pathfield.h (+1/-1)
src/logic/playercommand.h (+31/-31)
src/logic/playersmanager.h (+1/-1)
src/logic/replay.cc (+1/-1)
src/logic/replay_game_controller.h (+1/-1)
src/logic/widelands_geometry_io.h (+1/-1)
src/map_io/map_players_view_packet.cc (+3/-3)
src/map_io/world_legacy_lookup_table.cc (+1/-1)
src/network/gamehost.cc (+3/-3)
src/network/netclient.h (+1/-1)
src/network/nethost.h (+2/-2)
src/network/network_lan_promotion.h (+1/-1)
src/network/network_player_settings_backend.h (+1/-1)
src/notifications/test/notifications_test.cc (+1/-1)
src/profile/profile.h (+3/-3)
src/scripting/logic.h (+2/-2)
src/scripting/lua_bases.h (+3/-3)
src/scripting/lua_coroutine.h (+1/-1)
src/scripting/lua_editor.h (+2/-2)
src/scripting/lua_errors.h (+2/-2)
src/scripting/lua_game.h (+6/-6)
src/scripting/lua_map.h (+72/-72)
src/scripting/lua_path.cc (+1/-1)
src/scripting/lua_root.h (+4/-4)
src/scripting/lua_table.h (+1/-1)
src/scripting/lua_ui.h (+10/-10)
src/scripting/test/test_luna.cc (+4/-4)
src/sound/fxset.h (+1/-1)
src/ui_basic/progresswindow.h (+1/-1)
src/ui_basic/table.h (+1/-1)
src/ui_fsmenu/campaign_select.h (+1/-1)
src/ui_fsmenu/options.h (+2/-2)
src/wui/interactive_base.cc (+1/-1)
src/wui/login_box.h (+1/-1)
src/wui/quicknavigation.h (+1/-1)
lp:~widelands-dev/widelands/bug-986611-cppcheck-uninitialized-variables
- SirVer: Approve
- GunChleoc: Needs Resubmitting
-
Diff: 1837 lines (+238/-263)71 files modifiedsrc/ai/defaultai.cc (+2/-2)
src/ai/defaultai_warfare.cc (+4/-4)
src/base/i18n.cc (+1/-1)
src/base/md5.h (+2/-2)
src/chat/CMakeLists.txt (+1/-0)
src/chat/chat.h (+6/-2)
src/economy/shippingitem.h (+1/-1)
src/editor/ui_menus/categorized_item_selection_menu.h (+1/-1)
src/game_io/game_preload_packet.h (+6/-5)
src/graphic/gl/fields_to_draw.h (+2/-0)
src/graphic/graphic.h (+4/-4)
src/graphic/render_queue.h (+8/-10)
src/graphic/text/rt_render.cc (+2/-2)
src/graphic/texture_atlas.h (+1/-1)
src/io/filesystem/filesystem.cc (+0/-2)
src/io/filesystem/filesystem.h (+1/-1)
src/logic/field.h (+17/-17)
src/logic/game.cc (+4/-3)
src/logic/game.h (+2/-1)
src/logic/game_controller.h (+5/-4)
src/logic/game_settings.h (+2/-2)
src/logic/map_objects/map_object.cc (+1/-3)
src/logic/map_objects/tribes/battle.cc (+3/-1)
src/logic/map_objects/tribes/building.cc (+1/-1)
src/logic/map_objects/tribes/building.h (+0/-1)
src/logic/map_objects/tribes/militarysite.cc (+9/-17)
src/logic/map_objects/tribes/militarysite.h (+7/-7)
src/logic/map_objects/tribes/production_program.cc (+1/-1)
src/logic/map_objects/tribes/productionsite.cc (+1/-6)
src/logic/map_objects/tribes/ship.cc (+1/-4)
src/logic/map_objects/tribes/ship.h (+4/-4)
src/logic/map_objects/world/critter_program.h (+2/-2)
src/logic/map_objects/world/map_gen.cc (+19/-19)
src/logic/map_objects/world/map_gen.h (+7/-8)
src/logic/maptriangleregion.h (+8/-8)
src/logic/player.cc (+2/-4)
src/logic/player.h (+1/-1)
src/logic/playercommand.cc (+4/-6)
src/logic/playercommand.h (+6/-5)
src/logic/replay_game_controller.cc (+1/-1)
src/logic/save_handler.cc (+0/-1)
src/logic/single_player_game_controller.cc (+1/-1)
src/map_io/map_buildingdata_packet.cc (+8/-4)
src/map_io/map_elemental_packet.cc (+2/-1)
src/map_io/map_elemental_packet.h (+3/-1)
src/map_io/s2map.cc (+9/-9)
src/map_io/s2map.h (+4/-4)
src/network/gameclient.cc (+7/-10)
src/network/gamehost.cc (+5/-15)
src/network/internet_gaming.cc (+2/-4)
src/network/network.h (+1/-1)
src/scripting/lua_game.cc (+2/-2)
src/scripting/lua_game.h (+1/-2)
src/scripting/lua_map.cc (+1/-1)
src/scripting/lua_ui.cc (+1/-1)
src/sound/sound_handler.cc (+0/-1)
src/ui_basic/checkbox.cc (+1/-2)
src/ui_basic/multilineeditbox.cc (+4/-4)
src/ui_basic/slider.cc (+1/-0)
src/ui_basic/table.h (+9/-9)
src/ui_basic/window.cc (+1/-0)
src/ui_basic/window.h (+1/-1)
src/ui_fsmenu/loadgame.cc (+8/-6)
src/ui_fsmenu/loadgame.h (+1/-1)
src/wui/building_statistics_menu.cc (+1/-1)
src/wui/debugconsole.cc (+2/-4)
src/wui/field_overlay_manager.cc (+1/-1)
src/wui/game_message_menu.cc (+1/-1)
src/wui/mapdata.cc (+0/-2)
src/wui/soldierlist.cc (+9/-8)
src/wui/tribal_encyclopedia.cc (+1/-1)
lp:~widelands-dev/widelands/bug-986611-cppcheck-pass-by-reference
- SirVer: Needs Fixing
-
Diff: 315 lines (+29/-30)20 files modifiedsrc/base/i18n.cc (+2/-2)
src/base/i18n.h (+2/-2)
src/editor/tools/tool_action.h (+1/-1)
src/graphic/text/rt_errors_impl.h (+1/-1)
src/graphic/text/rt_parse.h (+1/-1)
src/graphic/text/textstream.cc (+2/-2)
src/graphic/text/textstream.h (+2/-3)
src/logic/map_objects/map_object.h (+1/-1)
src/logic/map_objects/tribes/tribe_basic_info.h (+1/-1)
src/network/gamehost.cc (+2/-2)
src/network/gamehost.h (+2/-2)
src/network/internet_gaming.cc (+3/-3)
src/network/internet_gaming.h (+1/-1)
src/notifications/notifications_impl.h (+1/-1)
src/wlapplication.h (+1/-1)
src/wui/game_debug_ui.cc (+2/-2)
src/wui/game_main_menu_save_game.cc (+1/-1)
src/wui/game_main_menu_save_game.h (+1/-1)
src/wui/game_message_menu.cc (+1/-1)
src/wui/game_message_menu.h (+1/-1)
lp:~widelands-dev/widelands/bug-986611-cppcheck-minimal
- Klaus Halfmann: Approve (test)
-
Diff: 279 lines (+21/-32)14 files modifiedsrc/economy/fleet.cc (+1/-2)
src/editor/tools/info_tool.cc (+1/-2)
src/graphic/minimap_renderer.cc (+1/-1)
src/graphic/text/bidi.cc (+2/-2)
src/logic/map.cc (+3/-4)
src/logic/map_objects/map_object.cc (+1/-1)
src/logic/map_objects/tribes/ship.cc (+1/-1)
src/logic/save_handler.cc (+0/-1)
src/logic/single_player_game_settings_provider.cc (+1/-1)
src/map_io/s2map.cc (+0/-4)
src/wui/field_overlay_manager.cc (+3/-3)
src/wui/game_summary.cc (+4/-4)
src/wui/interactive_base.cc (+1/-1)
src/wui/soldierlist.cc (+2/-5)
lp:~widelands-dev/widelands/bug-986611-cppcheck-uninitialized_variables2
- SirVer: Approve
-
Diff: 600 lines (+111/-161)13 files modifiedsrc/ai/ai_help_structs.cc (+43/-81)
src/ai/ai_help_structs.h (+45/-49)
src/ai/defaultai.cc (+1/-1)
src/economy/ware_instance.cc (+0/-3)
src/economy/ware_instance.h (+3/-3)
src/network/gamehost.cc (+1/-0)
src/network/network_player_settings_backend.h (+1/-1)
src/ui_fsmenu/load_map_or_game.cc (+0/-7)
src/ui_fsmenu/load_map_or_game.h (+9/-8)
src/wui/constructionsitewindow.cc (+1/-1)
src/wui/dismantlesitewindow.cc (+1/-1)
src/wui/productionsitewindow.cc (+3/-1)
src/wui/suggested_teams_box.cc (+3/-5)
lp:~widelands-dev/widelands/bug-986611-cppcheck-mopup
- SirVer: Approve (code review)
- TiborB: Pending requested
-
Diff: 1266 lines (+58/-326)58 files modifiedsrc/ai/ai_help_structs.cc (+1/-15)
src/ai/ai_help_structs.h (+0/-3)
src/ai/defaultai.cc (+5/-25)
src/ai/defaultai.h (+0/-1)
src/ai/defaultai_warfare.cc (+0/-10)
src/chat/chat.h (+1/-1)
src/economy/shippingitem.cc (+0/-13)
src/economy/shippingitem.h (+0/-1)
src/economy/trackptr.h (+2/-3)
src/editor/map_generator.cc (+2/-2)
src/editor/map_generator.h (+2/-2)
src/editor/tools/set_port_space_tool.h (+1/-1)
src/graphic/font.cc (+0/-7)
src/graphic/font.h (+0/-1)
src/graphic/font_handler.cc (+0/-12)
src/graphic/font_handler.h (+0/-1)
src/graphic/image_io.cc (+1/-1)
src/graphic/text/rt_render.cc (+0/-3)
src/io/filesystem/disk_filesystem.cc (+0/-13)
src/io/filesystem/disk_filesystem.h (+0/-1)
src/io/filesystem/layered_filesystem.cc (+0/-11)
src/io/filesystem/layered_filesystem.h (+0/-2)
src/io/filewrite.cc (+0/-5)
src/io/filewrite.h (+1/-5)
src/logic/cookie_priority_queue.h (+6/-3)
src/logic/findimmovable.h (+1/-1)
src/logic/findnode.h (+9/-9)
src/logic/map_objects/tribes/dismantlesite.cc (+1/-1)
src/logic/map_objects/tribes/dismantlesite.h (+1/-1)
src/logic/map_objects/tribes/warehouse.cc (+0/-4)
src/logic/map_objects/tribes/warehouse.h (+0/-1)
src/logic/map_revision.cc (+1/-3)
src/logic/mapastar.h (+1/-1)
src/logic/mapdifferenceregion.cc (+0/-30)
src/logic/mapdifferenceregion.h (+0/-9)
src/logic/maphollowregion.cc (+1/-1)
src/logic/maphollowregion.h (+1/-1)
src/logic/path.cc (+1/-1)
src/logic/path.h (+1/-1)
src/logic/widelands_geometry_io.cc (+0/-11)
src/logic/widelands_geometry_io.h (+0/-5)
src/map_io/map_players_view_packet.cc (+5/-5)
src/map_io/s2map.cc (+4/-2)
src/network/gamehost.cc (+3/-3)
src/profile/profile.cc (+1/-1)
src/scripting/lua_map.h (+1/-2)
src/ui_basic/checkbox.cc (+1/-1)
src/ui_basic/listselect.cc (+2/-41)
src/ui_basic/listselect.h (+0/-7)
src/ui_basic/multilineeditbox.cc (+0/-13)
src/ui_basic/multilineeditbox.h (+0/-2)
src/ui_basic/table.h (+0/-5)
src/wui/general_statistics_menu.cc (+0/-7)
src/wui/general_statistics_menu.h (+0/-1)
src/wui/minimap.cc (+1/-1)
src/wui/ware_statistics_menu.h (+0/-1)
src/wui/waresdisplay.cc (+0/-10)
src/wui/waresdisplay.h (+0/-2)
Changed in widelands: | |
milestone: | build18-rc1 → none |
description: | updated |
description: | updated |
description: | updated |
tags: | added: lowhangingfruit |
tags: | added: cleanups |
To post a comment you must log in.
Based on widelands r6346 (with a few additional fixes not yet merged) and cppcheck 1.54.
Note that while generating your own report will list roughly ~40 more issues, but these already have suggested patches, so please don't waste your time doing duplicate work.
Also note that cppcheck 1.49-1 (at least in Ubuntu 11.10) will list all issues each time it finds it, while later versions only lists each issue only once. Without the duplicate lines, the report is a lot less noisy and easier to read. (The difference was ~260 vs ~12000 lines)