godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
91.1k stars 21.18k forks source link

List of warnings listed by -Wshadow=local #25316

Closed marxin closed 5 years ago

marxin commented 5 years ago

I've just done stupid -Wshadow=local error in #25314. My question is whether the project will be interested in fixing these.

There's a list of 267 warnings I see:

    673 ./core/math/face3.h:244:12: warning: declaration of 'd' shadows a previous local [-Wshadow=local]
     12 ./core/math/octree.h:944:67: warning: declaration of 'E' shadows a previous local [-Wshadow=local]
     12 ./core/math/octree.h:919:66: warning: declaration of 'E' shadows a previous local [-Wshadow=local]
      7 ./servers/visual/rasterizer.h:953:16: warning: declaration of 'i' shadows a previous local [-Wshadow=local]
      7 ./servers/visual/rasterizer.h:942:16: warning: declaration of 'i' shadows a previous local [-Wshadow=local]
      4 servers/visual/rasterizer.h:953:16: warning: declaration of 'i' shadows a previous local [-Wshadow=local]
      4 servers/visual/rasterizer.h:942:16: warning: declaration of 'i' shadows a previous local [-Wshadow=local]
      3 servers/physics/collision_solver_sat.cpp:824:12: warning: declaration of 'i' shadows a previous local [-Wshadow=local]
      1 servers/visual/visual_server_scene.cpp:2906:14: warning: declaration of 'r' shadows a previous local [-Wshadow=local]
      1 servers/visual/visual_server_canvas.cpp:270:29: warning: declaration of 'ci' shadows a previous local [-Wshadow=local]
      1 servers/visual/shader_language.cpp:4106:26: warning: declaration of 'uniform' shadows a previous local [-Wshadow=local]
      1 servers/visual/shader_language.cpp:3377:15: warning: declaration of 'i' shadows a previous local [-Wshadow=local]
      1 servers/visual/shader_language.cpp:2900:10: warning: declaration of 'pos' shadows a previous local [-Wshadow=local]
      1 servers/visual/shader_language.cpp:2187:12: warning: declaration of 'i' shadows a previous local [-Wshadow=local]
      1 servers/visual_server.cpp:1166:9: warning: declaration of 'err' shadows a previous local [-Wshadow=local]
      1 servers/physics/space_sw.cpp:858:14: warning: declaration of 'i' shadows a previous local [-Wshadow=local]
      1 servers/physics/space_sw.cpp:280:12: warning: declaration of 'i' shadows a previous local [-Wshadow=local]
      1 servers/physics/joints/cone_twist_joint_sw.cpp:208:11: warning: declaration of 'b2Axis2' shadows a previous local [-Wshadow=local]
      1 servers/physics_2d/space_2d_sw.cpp:283:12: warning: declaration of 'i' shadows a previous local [-Wshadow=local]
      1 servers/physics_2d/shape_2d_sw.cpp:795:15: warning: declaration of 'b' shadows a previous local [-Wshadow=local]
      1 servers/physics_2d/shape_2d_sw.cpp:1044:15: warning: declaration of 'b' shadows a previous local [-Wshadow=local]
      1 servers/audio/audio_stream.cpp:86:14: warning: declaration of 'i' shadows a previous local [-Wshadow=local]
      1 scene/resources/texture.cpp:647:8: warning: declaration of 'mipmaps' shadows a previous local [-Wshadow=local]
      1 scene/resources/primitive_meshes.cpp:379:10: warning: declaration of 'u' shadows a previous local [-Wshadow=local]
      1 scene/resources/polygon_path_finder.cpp:444:28: warning: declaration of 'pr' shadows a previous local [-Wshadow=local]
      1 scene/resources/packed_scene.cpp:752:10: warning: declaration of 'exists' shadows a previous local [-Wshadow=local]
      1 scene/resources/packed_scene.cpp:299:13: warning: declaration of 'n' shadows a previous local [-Wshadow=local]
      1 scene/resources/packed_scene.cpp:239:18: warning: declaration of 'base' shadows a previous local [-Wshadow=local]
      1 scene/resources/mesh.cpp:94:13: warning: declaration of 'i' shadows a previous local [-Wshadow=local]
      1 scene/resources/mesh.cpp:87:13: warning: declaration of 'i' shadows a previous local [-Wshadow=local]
      1 scene/resources/animation.cpp:271:18: warning: declaration of 'd' shadows a previous local [-Wshadow=local]
      1 scene/main/viewport.cpp:543:45: warning: declaration of 'E' shadows a previous local [-Wshadow=local]
      1 scene/main/viewport.cpp:1723:14: warning: declaration of 'pos' shadows a previous local [-Wshadow=local]
      1 scene/gui/tree.cpp:2954:8: warning: declaration of 'ofs' shadows a previous local [-Wshadow=local]
      1 scene/gui/tree.cpp:2701:11: warning: declaration of 's' shadows a previous local [-Wshadow=local]
      1 scene/gui/tree.cpp:1168:17: warning: declaration of 'ofs' shadows a previous local [-Wshadow=local]
      1 scene/gui/tree.cpp:1074:7: warning: declaration of 'skip' shadows a previous local [-Wshadow=local]
      1 scene/gui/texture_button.cpp:209:15: warning: declaration of 'ofs' shadows a previous local [-Wshadow=local]
      1 scene/gui/text_edit.cpp:3376:11: warning: declaration of 'i' shadows a previous local [-Wshadow=local]
      1 scene/gui/text_edit.cpp:1717:19: warning: declaration of 'rows' shadows a previous local [-Wshadow=local]
      1 scene/gui/text_edit.cpp:1384:11: warning: declaration of 'size' shadows a previous local [-Wshadow=local]
      1 scene/gui/rich_text_label.cpp:547:23: warning: declaration of 'Point2 shadow_ofs' shadows a parameter [-Wshadow=local]
      1 scene/gui/popup_menu.cpp:522:13: warning: declaration of 'text' shadows a previous local [-Wshadow=local]
      1 scene/gui/item_list.cpp:1117:13: warning: declaration of 'size' shadows a previous local [-Wshadow=local]
      1 scene/gui/graph_edit.cpp:983:18: warning: declaration of 'gn' shadows a previous local [-Wshadow=local]
      1 scene/gui/graph_edit.cpp:972:18: warning: declaration of 'gn' shadows a previous local [-Wshadow=local]
      1 scene/gui/graph_edit.cpp:961:18: warning: declaration of 'gn' shadows a previous local [-Wshadow=local]
      1 scene/gui/graph_edit.cpp:224:14: warning: declaration of 'gn' shadows a previous local [-Wshadow=local]
      1 scene/gui/button.cpp:143:18: warning: declaration of 'style' shadows a previous local [-Wshadow=local]
      1 scene/animation/animation_tree_player.cpp:877:32: warning: declaration of 'E' shadows a previous local [-Wshadow=local]
      1 scene/animation/animation_tree_player.cpp:318:35: warning: declaration of 'E' shadows a previous local [-Wshadow=local]
      1 scene/animation/animation_tree_player.cpp:300:35: warning: declaration of 'E' shadows a previous local [-Wshadow=local]
      1 scene/animation/animation_tree_player.cpp:281:35: warning: declaration of 'E' shadows a previous local [-Wshadow=local]
      1 scene/animation/animation_tree_player.cpp:165:14: warning: declaration of 'i' shadows a previous local [-Wshadow=local]
      1 scene/animation/animation_tree_player.cpp:153:14: warning: declaration of 'i' shadows a previous local [-Wshadow=local]
      1 scene/animation/animation_tree_player.cpp:139:14: warning: declaration of 'i' shadows a previous local [-Wshadow=local]
      1 scene/animation/animation_tree.cpp:1147:24: warning: declaration of 'player' shadows a previous local [-Wshadow=local]
      1 scene/animation/animation_tree.cpp:1005:32: warning: declaration of 'E' shadows a previous local [-Wshadow=local]
      1 scene/animation/animation_cache.cpp:136:9: warning: declaration of 'res' shadows a previous local [-Wshadow=local]
      1 scene/animation/animation_blend_space_2d.cpp:464:13: warning: declaration of 'closest' shadows a previous local [-Wshadow=local]
      1 scene/3d/voxel_light_baker.cpp:1836:12: warning: declaration of 'i' shadows a previous local [-Wshadow=local]
      1 scene/3d/voxel_light_baker.cpp:1762:13: warning: declaration of 'i' shadows a previous local [-Wshadow=local]
      1 scene/3d/voxel_light_baker.cpp:1733:13: warning: declaration of 'i' shadows a previous local [-Wshadow=local]
      1 scene/3d/skeleton.cpp:73:14: warning: declaration of 'path' shadows a previous local [-Wshadow=local]
      1 scene/3d/skeleton.cpp:118:13: warning: declaration of 'path' shadows a previous local [-Wshadow=local]
      1 scene/3d/path.cpp:129:11: warning: declaration of 'pos' shadows a previous local [-Wshadow=local]
      1 scene/3d/navigation_mesh.cpp:295:35: warning: declaration of 'E' shadows a previous local [-Wshadow=local]
      1 scene/3d/audio_stream_player_3d.cpp:410:13: warning: declaration of 'sr' shadows a previous local [-Wshadow=local]
      1 scene/2d/tile_map.cpp:85:52: warning: declaration of 'E' shadows a previous local [-Wshadow=local]
      1 scene/2d/tile_map.cpp:78:52: warning: declaration of 'E' shadows a previous local [-Wshadow=local]
      1 scene/2d/tile_map.cpp:604:29: warning: declaration of 'E' shadows a previous local [-Wshadow=local]
      1 scene/2d/tile_map.cpp:542:18: warning: declaration of 'i' shadows a previous local [-Wshadow=local]
      1 scene/2d/tile_map.cpp:534:19: warning: declaration of 'i' shadows a previous local [-Wshadow=local]
      1 scene/2d/tile_map.cpp:465:13: warning: declaration of 'i' shadows a previous local [-Wshadow=local]
      1 scene/2d/tile_map.cpp:138:50: warning: declaration of 'E' shadows a previous local [-Wshadow=local]
      1 scene/2d/tile_map.cpp:132:50: warning: declaration of 'E' shadows a previous local [-Wshadow=local]
      1 scene/2d/tile_map.cpp:1056:28: warning: declaration of 'E' shadows a previous local [-Wshadow=local]
      1 scene/2d/animated_sprite.cpp:279:12: warning: declaration of 'i' shadows a previous local [-Wshadow=local]
      1 platform/android/export/export.cpp:304:12: warning: declaration of 'ec' shadows a previous local [-Wshadow=local]
      1 modules/websocket/lws_server.cpp:112:12: warning: declaration of 'String reason' shadows a parameter [-Wshadow=local]
      1 modules/websocket/lws_client.cpp:147:11: warning: declaration of 'String reason' shadows a parameter [-Wshadow=local]
      1 modules/visual_script/visual_script_property_selector.cpp:532:45: warning: declaration of 'E' shadows a previous local [-Wshadow=local]
      1 modules/visual_script/visual_script_property_selector.cpp:524:45: warning: declaration of 'E' shadows a previous local [-Wshadow=local]
      1 modules/visual_script/visual_script_property_selector.cpp:517:45: warning: declaration of 'E' shadows a previous local [-Wshadow=local]
      1 modules/visual_script/visual_script_expression.cpp:957:15: warning: declaration of 'expr' shadows a previous local [-Wshadow=local]
      1 modules/visual_script/visual_script_expression.cpp:950:12: warning: declaration of 'cofs' shadows a previous local [-Wshadow=local]
      1 modules/visual_script/visual_script_expression.cpp:851:13: warning: declaration of 'expr' shadows a previous local [-Wshadow=local]
      1 modules/visual_script/visual_script_expression.cpp:810:13: warning: declaration of 'expr' shadows a previous local [-Wshadow=local]
      1 modules/visual_script/visual_script_expression.cpp:726:13: warning: declaration of 'expr' shadows a previous local [-Wshadow=local]
      1 modules/visual_script/visual_script_expression.cpp:682:13: warning: declaration of 'expr' shadows a previous local [-Wshadow=local]
      1 modules/visual_script/visual_script_expression.cpp:1429:11: warning: declaration of 'ret' shadows a previous local [-Wshadow=local]
      1 modules/visual_script/visual_script.cpp:1168:12: warning: declaration of 'i' shadows a previous local [-Wshadow=local]
      1 modules/theora/video_stream_theora.cpp:299:8: warning: declaration of 'ret' shadows a previous local [-Wshadow=local]
      1 modules/recast/navigation_mesh_generator.cpp:81:13: warning: declaration of 'i' shadows a previous local [-Wshadow=local]
      1 modules/recast/navigation_mesh_generator.cpp:73:13: warning: declaration of 'i' shadows a previous local [-Wshadow=local]
      1 modules/recast/navigation_mesh_generator.cpp:69:13: warning: declaration of 'i' shadows a previous local [-Wshadow=local]
      1 modules/gridmap/grid_map_editor_plugin.cpp:292:14: warning: declaration of 'xf' shadows a previous local [-Wshadow=local]
      1 modules/gdscript/gdscript_tokenizer.cpp:1001:17: warning: declaration of 'i' shadows a previous local [-Wshadow=local]
      1 modules/gdscript/gdscript_parser.cpp:7579:10: warning: declaration of 'i' shadows a previous local [-Wshadow=local]
      1 modules/gdscript/gdscript_parser.cpp:6622:17: warning: declaration of 'return_type' shadows a previous local [-Wshadow=local]
      1 modules/gdscript/gdscript_parser.cpp:5502:18: warning: declaration of 'scr' shadows a previous local [-Wshadow=local]
      1 modules/gdscript/gdscript_parser.cpp:2925:13: warning: declaration of 'condition' shadows a previous local [-Wshadow=local]
      1 modules/gdscript/gdscript_parser.cpp:2738:18: warning: declaration of 'nl' shadows a previous local [-Wshadow=local]
      1 modules/gdscript/gdscript_parser.cpp:2697:17: warning: declaration of 'nl' shadows a previous local [-Wshadow=local]
      1 modules/gdscript/gdscript_parser.cpp:2643:20: warning: declaration of 'id' shadows a previous local [-Wshadow=local]
      1 modules/gdscript/gdscript_editor.cpp:776:36: warning: declaration of 'c' shadows a previous local [-Wshadow=local]
      1 modules/gdscript/gdscript_editor.cpp:2797:35: warning: declaration of 'c' shadows a previous local [-Wshadow=local]
      1 modules/gdscript/gdscript_editor.cpp:2228:37: warning: declaration of 'E' shadows a previous local [-Wshadow=local]
      1 modules/gdscript/gdscript_editor.cpp:1273:42: warning: declaration of 'E' shadows a previous local [-Wshadow=local]
      1 modules/gdscript/gdscript.cpp:1106:48: warning: declaration of 'E' shadows a previous local [-Wshadow=local]
      1 modules/gdscript/gdscript_compiler.cpp:2122:59: warning: declaration of 'E' shadows a previous local [-Wshadow=local]
      1 modules/gdscript/gdscript_compiler.cpp:1424:14: warning: declaration of 'err' shadows a previous local [-Wshadow=local]
      1 modules/gdscript/gdscript_compiler.cpp:1363:12: warning: declaration of 'ret' shadows a previous local [-Wshadow=local]
      1 modules/gdnative/register_types.cpp:128:12: warning: declaration of 'i' shadows a previous local [-Wshadow=local]
      1 modules/dds/texture_loader_dds.cpp:267:7: warning: declaration of 'h' shadows a previous local [-Wshadow=local]
      1 modules/dds/texture_loader_dds.cpp:266:7: warning: declaration of 'w' shadows a previous local [-Wshadow=local]
      1 modules/csg/csg.cpp:669:14: warning: declaration of 'e' shadows a previous local [-Wshadow=local]
      1 main/tests/test_shader_lang.cpp:339:10: warning: declaration of 'code' shadows a previous local [-Wshadow=local]
      1 main/tests/test_shader_lang.cpp:152:14: warning: declaration of 'i' shadows a previous local [-Wshadow=local]
      1 main/tests/test_gdscript.cpp:1044:19: warning: declaration of 'buf' shadows a previous local [-Wshadow=local]
      1 main/main.cpp:1546:19: warning: declaration of 's' shadows a previous local [-Wshadow=local]
      1 main/main.cpp:1147:10: warning: declaration of 'err' shadows a previous local [-Wshadow=local]
      1 editor/spatial_editor_gizmos.cpp:3610:35: warning: declaration of 'E' shadows a previous local [-Wshadow=local]
      1 editor/spatial_editor_gizmos.cpp:3476:28: warning: declaration of 'cs' shadows a previous local [-Wshadow=local]
      1 editor/spatial_editor_gizmos.cpp:3461:21: warning: declaration of 'points' shadows a previous local [-Wshadow=local]
      1 editor/spatial_editor_gizmos.cpp:3361:22: warning: declaration of 'cs' shadows a previous local [-Wshadow=local]
      1 editor/spatial_editor_gizmos.cpp:3286:21: warning: declaration of 'cs' shadows a previous local [-Wshadow=local]
      1 editor/spatial_editor_gizmos.cpp:3075:22: warning: declaration of 'cs' shadows a previous local [-Wshadow=local]
      1 editor/spatial_editor_gizmos.cpp:3056:21: warning: declaration of 'cs' shadows a previous local [-Wshadow=local]
      1 editor/spatial_editor_gizmos.cpp:2989:17: warning: declaration of 'cs' shadows a previous local [-Wshadow=local]
      1 editor/spatial_editor_gizmos.cpp:2983:22: warning: declaration of 'cs' shadows a previous local [-Wshadow=local]
      1 editor/spatial_editor_gizmos.cpp:2977:21: warning: declaration of 'cs' shadows a previous local [-Wshadow=local]
      1 editor/spatial_editor_gizmos.cpp:1193:13: warning: declaration of 'gt' shadows a previous local [-Wshadow=local]
      1 editor/script_editor_debugger.cpp:862:13: warning: declaration of 'i' shadows a previous local [-Wshadow=local]
      1 editor/script_editor_debugger.cpp:780:11: warning: declaration of 'method' shadows a previous local [-Wshadow=local]
      1 editor/script_editor_debugger.cpp:1535:18: warning: declaration of 'res' shadows a previous local [-Wshadow=local]
      1 editor/script_editor_debugger.cpp:1001:10: warning: declaration of 'h' shadows a previous local [-Wshadow=local]
      1 editor/script_create_dialog.cpp:258:13: warning: declaration of 'int l' shadows a parameter [-Wshadow=local]
      1 editor/scene_tree_dock.cpp:1605:32: warning: declaration of 'E' shadows a previous local [-Wshadow=local]
      1 editor/scene_tree_dock.cpp:1236:54: warning: declaration of 'E' shadows a previous local [-Wshadow=local]
      1 editor/scene_tree_dock.cpp:1155:53: warning: declaration of 'E' shadows a previous local [-Wshadow=local]
      1 editor/property_editor.cpp:924:17: warning: declaration of 'i' shadows a previous local [-Wshadow=local]
      1 editor/property_editor.cpp:918:33: warning: declaration of 'E' shadows a previous local [-Wshadow=local]
      1 editor/property_editor.cpp:908:15: warning: declaration of 'i' shadows a previous local [-Wshadow=local]
      1 editor/project_settings_editor.cpp:715:14: warning: declaration of 'action' shadows a previous local [-Wshadow=local]
      1 editor/project_settings_editor.cpp:1546:13: warning: declaration of 's' shadows a previous local [-Wshadow=local]
      1 editor/project_settings_editor.cpp:1037:12: warning: declaration of 'i' shadows a previous local [-Wshadow=local]
      1 editor/project_manager.cpp:435:11: warning: declaration of 'dir' shadows a previous local [-Wshadow=local]
      1 editor/plugins/visual_shader_editor_plugin.cpp:1119:12: warning: declaration of 'i' shadows a previous local [-Wshadow=local]
      1 editor/plugins/tile_set_editor_plugin.cpp:2551:10: warning: declaration of 'name' shadows a previous local [-Wshadow=local]
      1 editor/plugins/tile_map_editor_plugin.cpp:514:7: warning: declaration of 'selected' shadows a previous local [-Wshadow=local]
      1 editor/plugins/tile_map_editor_plugin.cpp:482:20: warning: declaration of 'entries' shadows a previous local [-Wshadow=local]
      1 editor/plugins/tile_map_editor_plugin.cpp:480:34: warning: declaration of 'tiles' shadows a previous local [-Wshadow=local]
      1 editor/plugins/spatial_editor_plugin.cpp:4813:11: warning: declaration of 'col' shadows a previous local [-Wshadow=local]
      1 editor/plugins/spatial_editor_plugin.cpp:4684:11: warning: declaration of 'col' shadows a previous local [-Wshadow=local]
      1 editor/plugins/polygon_2d_editor_plugin.cpp:1048:12: warning: declaration of 'i' shadows a previous local [-Wshadow=local]
      1 editor/plugins/path_2d_editor_plugin.cpp:183:12: warning: declaration of 'gpoint' shadows a previous local [-Wshadow=local]
      1 editor/plugins/mesh_instance_editor_plugin.cpp:226:14: warning: declaration of 'mesh' shadows a previous local [-Wshadow=local]
      1 editor/plugins/mesh_instance_editor_plugin.cpp:217:14: warning: declaration of 'mesh' shadows a previous local [-Wshadow=local]
      1 editor/plugins/mesh_instance_editor_plugin.cpp:201:19: warning: declaration of 'mesh' shadows a previous local [-Wshadow=local]
      1 editor/plugins/canvas_item_editor_plugin.cpp:819:36: warning: declaration of 'E' shadows a previous local [-Wshadow=local]
      1 editor/plugins/canvas_item_editor_plugin.cpp:401:15: warning: declaration of 'canvas_item' shadows a previous local [-Wshadow=local]
      1 editor/plugins/canvas_item_editor_plugin.cpp:2068:25: warning: declaration of 'selection' shadows a previous local [-Wshadow=local]
      1 editor/plugins/canvas_item_editor_plugin.cpp:1924:18: warning: declaration of 'm' shadows a previous local [-Wshadow=local]
      1 editor/plugins/animation_state_machine_editor.cpp:717:12: warning: declaration of 'i' shadows a previous local [-Wshadow=local]
      1 editor/plugins/animation_player_editor_plugin.cpp:1210:19: warning: declaration of 'anim' shadows a previous local [-Wshadow=local]
      1 editor/plugins/animation_player_editor_plugin.cpp:1209:11: warning: declaration of 'current' shadows a previous local [-Wshadow=local]
      1 editor/plugins/animation_player_editor_plugin.cpp:1171:19: warning: declaration of 'anim' shadows a previous local [-Wshadow=local]
      1 editor/plugins/animation_player_editor_plugin.cpp:1164:19: warning: declaration of 'anim' shadows a previous local [-Wshadow=local]
      1 editor/plugins/animation_player_editor_plugin.cpp:1163:11: warning: declaration of 'current' shadows a previous local [-Wshadow=local]
      1 editor/plugins/animation_blend_tree_editor_plugin.cpp:788:11: warning: declaration of 'new_name' shadows a previous local [-Wshadow=local]
      1 editor/plugins/abstract_polygon_2d_editor.cpp:327:24: warning: declaration of 'vertices' shadows a previous local [-Wshadow=local]
      1 editor/import/resource_importer_scene.cpp:1346:11: warning: declaration of 'err' shadows a previous local [-Wshadow=local]
      1 editor/import/resource_importer_scene.cpp:1334:27: warning: declaration of 'progress' shadows a previous local [-Wshadow=local]
      1 editor/import/resource_importer_scene.cpp:1317:10: warning: declaration of 'err' shadows a previous local [-Wshadow=local]
      1 editor/import/resource_importer_layered_texture.cpp:135:14: warning: declaration of 'i' shadows a previous local [-Wshadow=local]
      1 editor/import/editor_scene_importer_gltf.cpp:967:15: warning: declaration of 'i' shadows a previous local [-Wshadow=local]
      1 editor/import/editor_scene_importer_gltf.cpp:953:15: warning: declaration of 'i' shadows a previous local [-Wshadow=local]
      1 editor/import/editor_scene_importer_gltf.cpp:925:15: warning: declaration of 'j' shadows a previous local [-Wshadow=local]
      1 editor/import/editor_scene_importer_gltf.cpp:882:50: warning: declaration of 'primitives' shadows a previous local [-Wshadow=local]
      1 editor/import/editor_scene_importer_gltf.cpp:247:13: warning: declaration of 'i' shadows a previous local [-Wshadow=local]
      1 editor/import/editor_import_collada.cpp:729:12: warning: declaration of 'p_i' shadows a previous local [-Wshadow=local]
      1 editor/import/editor_import_collada.cpp:1752:13: warning: declaration of 'i' shadows a previous local [-Wshadow=local]
      1 editor/import/editor_import_collada.cpp:1632:10: warning: declaration of 'cn' shadows a previous local [-Wshadow=local]
      1 editor/import/editor_import_collada.cpp:1310:9: warning: declaration of 'err' shadows a previous local [-Wshadow=local]
      1 editor/import/editor_import_collada.cpp:1301:9: warning: declaration of 'err' shadows a previous local [-Wshadow=local]
      1 editor/import/editor_import_collada.cpp:1190:15: warning: declaration of 'meshid' shadows a previous local [-Wshadow=local]
      1 editor/import/editor_import_collada.cpp:1105:27: warning: declaration of 'ng' shadows a previous local [-Wshadow=local]
      1 editor/find_in_files.cpp:769:38: warning: declaration of 'E' shadows a previous local [-Wshadow=local]
      1 editor/fileserver/editor_file_server.cpp:83:10: warning: declaration of 'String s' shadows a parameter [-Wshadow=local]
      1 editor/fileserver/editor_file_server.cpp:149:12: warning: declaration of 'String s' shadows a parameter [-Wshadow=local]
      1 editor/editor_sub_scene.cpp:190:31: warning: declaration of 'E' shadows a previous local [-Wshadow=local]
      1 editor/editor_spin_slider.cpp:216:17: warning: declaration of 'updown' shadows a previous local [-Wshadow=local]
      1 editor/editor_properties.cpp:668:12: warning: declaration of 'rect' shadows a previous local [-Wshadow=local]
      1 editor/editor_properties.cpp:2284:15: warning: declaration of 'i' shadows a previous local [-Wshadow=local]
      1 editor/editor_properties.cpp:2278:31: warning: declaration of 'E' shadows a previous local [-Wshadow=local]
      1 editor/editor_properties.cpp:2268:13: warning: declaration of 'i' shadows a previous local [-Wshadow=local]
      1 editor/editor_plugin_settings.cpp:95:9: warning: declaration of 'err' shadows a previous local [-Wshadow=local]
      1 editor/editor_plugin_settings.cpp:111:11: warning: declaration of 'd' shadows a previous local [-Wshadow=local]
      1 editor/editor_node.cpp:884:34: warning: declaration of 'E' shadows a previous local [-Wshadow=local]
      1 editor/editor_node.cpp:4880:27: warning: declaration of 'import_obj' shadows a previous local [-Wshadow=local]
      1 editor/editor_inspector.cpp:265:15: warning: declaration of 'color' shadows a previous local [-Wshadow=local]
      1 editor/editor_inspector.cpp:239:15: warning: declaration of 'color' shadows a previous local [-Wshadow=local]
      1 editor/editor_inspector.cpp:218:15: warning: declaration of 'color' shadows a previous local [-Wshadow=local]
      1 editor/editor_inspector.cpp:1642:46: warning: declaration of 'E' shadows a previous local [-Wshadow=local]
      1 editor/editor_inspector.cpp:1485:16: warning: declaration of 'type' shadows a previous local [-Wshadow=local]
      1 editor/editor_folding.cpp:193:22: warning: declaration of 'unfolds' shadows a previous local [-Wshadow=local]
      1 editor/editor_folding.cpp:184:10: warning: declaration of 'path' shadows a previous local [-Wshadow=local]
      1 editor/editor_folding.cpp:174:12: warning: declaration of 'path' shadows a previous local [-Wshadow=local]
      1 editor/editor_file_system.cpp:689:9: warning: declaration of 'idx' shadows a previous local [-Wshadow=local]
      1 editor/editor_file_system.cpp:263:18: warning: declaration of 'f' shadows a previous local [-Wshadow=local]
      1 editor/editor_autoload_settings.cpp:613:36: warning: declaration of 'E' shadows a previous local [-Wshadow=local]
      1 editor/editor_autoload_settings.cpp:601:36: warning: declaration of 'E' shadows a previous local [-Wshadow=local]
      1 editor/editor_audio_buses.cpp:381:20: warning: declaration of 'effect' shadows a previous local [-Wshadow=local]
      1 editor/doc/doc_data.cpp:923:15: warning: declaration of 'name' shadows a previous local [-Wshadow=local]
      1 editor/doc/doc_data.cpp:894:15: warning: declaration of 'name' shadows a previous local [-Wshadow=local]
      1 editor/doc/doc_data.cpp:859:15: warning: declaration of 'name' shadows a previous local [-Wshadow=local]
      1 editor/doc/doc_data.cpp:851:12: warning: declaration of 'err' shadows a previous local [-Wshadow=local]
      1 editor/doc/doc_data.cpp:846:12: warning: declaration of 'err' shadows a previous local [-Wshadow=local]
      1 editor/doc/doc_data.cpp:826:15: warning: declaration of 'name' shadows a previous local [-Wshadow=local]
      1 editor/doc/doc_data.cpp:809:12: warning: declaration of 'name' shadows a previous local [-Wshadow=local]
      1 editor/doc/doc_data.cpp:737:10: warning: declaration of 'err' shadows a previous local [-Wshadow=local]
      1 editor/doc/doc_data.cpp:623:14: warning: declaration of 'i' shadows a previous local [-Wshadow=local]
      1 editor/doc/doc_data.cpp:500:13: warning: declaration of 'i' shadows a previous local [-Wshadow=local]
      1 editor/create_dialog.cpp:302:11: warning: declaration of 'type' shadows a previous local [-Wshadow=local]
      1 editor/connections_dialog.cpp:769:20: warning: declaration of 'node_signals' shadows a previous local [-Wshadow=local]
      1 editor/collada/collada.cpp:2074:12: warning: declaration of 'name' shadows a previous local [-Wshadow=local]
      1 editor/animation_track_editor_plugins.cpp:486:7: warning: declaration of 'frame' shadows a previous local [-Wshadow=local]
      1 editor/animation_track_editor_plugins.cpp:319:7: warning: declaration of 'fh' shadows a previous local [-Wshadow=local]
      1 editor/animation_track_editor_plugins.cpp:318:13: warning: declaration of 'font' shadows a previous local [-Wshadow=local]
      1 editor/animation_track_editor.cpp:4321:15: warning: declaration of 'i' shadows a previous local [-Wshadow=local]
      1 editor/animation_track_editor.cpp:377:17: warning: declaration of 'name' shadows a previous local [-Wshadow=local]
      1 editor/animation_track_editor.cpp:2922:12: warning: declaration of 'path' shadows a previous local [-Wshadow=local]
      1 editor/animation_track_editor.cpp:2827:12: warning: declaration of 'path' shadows a previous local [-Wshadow=local]
      1 editor/animation_track_editor.cpp:134:11: warning: declaration of 'trans' shadows a previous local [-Wshadow=local]
      1 core/variant_parser.cpp:885:11: warning: declaration of 'id' shadows a previous local [-Wshadow=local]
      1 core/variant_parser.cpp:731:10: warning: declaration of 'VariantParser::Token token' shadows a parameter [-Wshadow=local]
      1 core/variant_op.cpp:3502:10: warning: declaration of 'float a' shadows a parameter [-Wshadow=local]
      1 core/variant_op.cpp:3501:10: warning: declaration of 'float b' shadows a parameter [-Wshadow=local]
      1 core/variant_call.cpp:1408:38: warning: declaration of 'E' shadows a previous local [-Wshadow=local]
      1 core/variant_call.cpp:1298:33: warning: declaration of 'fd' shadows a previous local [-Wshadow=local]
      1 core/ustring.cpp:606:14: warning: declaration of 'a' shadows a previous local [-Wshadow=local]
      1 core/translation.cpp:1055:9: warning: declaration of 'near_match' shadows a previous local [-Wshadow=local]
      1 core/script_language.cpp:528:43: warning: declaration of 'E' shadows a previous local [-Wshadow=local]
      1 core/project_settings.cpp:697:10: warning: declaration of 'err' shadows a previous local [-Wshadow=local]
      1 core/project_settings.cpp:659:9: warning: declaration of 'err' shadows a previous local [-Wshadow=local]
      1 core/project_settings.cpp:504:9: warning: declaration of 'err' shadows a previous local [-Wshadow=local]
      1 core/math/quick_hull.cpp:441:46: warning: declaration of 'E' shadows a previous local [-Wshadow=local]
      1 core/math/face3.h:244:12: warning: declaration of 'd' shadows a previous local [-Wshadow=local]
      1 core/math/expression.cpp:2073:10: warning: declaration of 'ret' shadows a previous local [-Wshadow=local]
      1 core/math/expression.cpp:1905:10: warning: declaration of 'ret' shadows a previous local [-Wshadow=local]
      1 core/math/expression.cpp:1594:15: warning: declaration of 'expr' shadows a previous local [-Wshadow=local]
      1 core/math/expression.cpp:1587:12: warning: declaration of 'cofs' shadows a previous local [-Wshadow=local]
      1 core/math/expression.cpp:1488:13: warning: declaration of 'expr' shadows a previous local [-Wshadow=local]
      1 core/math/expression.cpp:1447:13: warning: declaration of 'expr' shadows a previous local [-Wshadow=local]
      1 core/math/expression.cpp:1365:14: warning: declaration of 'expr' shadows a previous local [-Wshadow=local]
      1 core/math/expression.cpp:1358:11: warning: declaration of 'cofs' shadows a previous local [-Wshadow=local]
      1 core/math/expression.cpp:1311:13: warning: declaration of 'expr' shadows a previous local [-Wshadow=local]
      1 core/math/expression.cpp:1267:13: warning: declaration of 'expr' shadows a previous local [-Wshadow=local]
      1 core/math/a_star.cpp:374:10: warning: declaration of 'p' shadows a previous local [-Wshadow=local]
      1 core/io/resource_format_binary.cpp:349:14: warning: declaration of 'type' shadows a previous local [-Wshadow=local]
      1 core/io/resource_format_binary.cpp:320:13: warning: declaration of 'type' shadows a previous local [-Wshadow=local]
      1 core/io/resource_format_binary.cpp:299:13: warning: declaration of 'type' shadows a previous local [-Wshadow=local]
      1 core/io/resource_format_binary.cpp:1317:9: warning: declaration of 'val' shadows a previous local [-Wshadow=local]
      1 core/io/marshalls.cpp:892:14: warning: declaration of 'flags' shadows a previous local [-Wshadow=local]
      1 core/io/file_access_zip.cpp:205:8: warning: declaration of 'f' shadows a previous local [-Wshadow=local]
      1 core/image.cpp:2901:21: warning: declaration of 'rp' shadows a previous local [-Wshadow=local]
akien-mga commented 5 years ago

I think it would be good to fix those indeed. -Wshadow=local can be added to https://github.com/godotengine/godot/blob/master/SConstruct#L335-L340 as you suggested, preferably after or while fixing the warnings listed above (otherwise our CI builds with -Werror will start failing now).

marxin commented 5 years ago

Good, let me work on it.

marxin commented 5 years ago

I was thinking about that one more time and it's probably too strict to deal with all the warnings. That said, I'm not planning to work on that. Maybe we can close it?

akien-mga commented 5 years ago

Well even if we don't add -Wshadow=local to the warnings, I think it would be good to fix some of those warnings, so the issue can be kept.

marxin commented 5 years ago

Ok, if you see it profitable, then I can prepare patch for it.