Fix warnings about uninitialized vars [-Wsometimes-uninitialized]
Fixes the following Clang 7 warnings: ``` drivers/gles3/rasterizer_scene_gles3.cpp:1260:10: warning: variable 'target' is used uninitialized whenever switch case is taken [-Wsometimes-uninitialized] drivers/gles3/rasterizer_scene_gles3.cpp:1280:10: warning: variable 'target' is used uninitialized whenever switch case is taken [-Wsometimes-uninitialized] drivers/gles3/rasterizer_scene_gles3.cpp:1281:10: warning: variable 'target' is used uninitialized whenever switch case is taken [-Wsometimes-uninitialized] drivers/gles3/rasterizer_scene_gles3.cpp:1282:10: warning: variable 'target' is used uninitialized whenever switch case is taken [-Wsometimes-uninitialized] drivers/gles3/rasterizer_scene_gles3.cpp:1286:5: warning: variable 'target' is used uninitialized whenever switch default is taken [-Wsometimes-uninitialized] editor/editor_properties_array_dict.cpp:982:15: warning: variable 'change_index' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized] editor/editor_properties.cpp:2655:6: warning: variable 'lt' is used uninitialized whenever switch default is taken [-Wsometimes-uninitialized] editor/settings_config_dialog.cpp:367:11: warning: variable 'current_search_box' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized] ```
This commit is contained in:
parent
b1b625f4f5
commit
9258d7b5d0
|
@ -1182,7 +1182,7 @@ bool RasterizerSceneGLES3::_setup_material(RasterizerStorageGLES3::Material *p_m
|
|||
|
||||
glActiveTexture(GL_TEXTURE0 + i);
|
||||
|
||||
GLenum target;
|
||||
GLenum target = GL_TEXTURE_2D;
|
||||
GLuint tex = 0;
|
||||
|
||||
RasterizerStorageGLES3::Texture *t = storage->texture_owner.getptr(textures[i]);
|
||||
|
|
|
@ -2638,7 +2638,7 @@ bool EditorInspectorDefaultPlugin::parse_property(Object *p_object, Variant::Typ
|
|||
|
||||
} else if (p_hint == PROPERTY_HINT_LAYERS_2D_PHYSICS || p_hint == PROPERTY_HINT_LAYERS_2D_RENDER || p_hint == PROPERTY_HINT_LAYERS_3D_PHYSICS || p_hint == PROPERTY_HINT_LAYERS_3D_RENDER) {
|
||||
|
||||
EditorPropertyLayers::LayerType lt;
|
||||
EditorPropertyLayers::LayerType lt = EditorPropertyLayers::LAYER_RENDER_2D;
|
||||
switch (p_hint) {
|
||||
case PROPERTY_HINT_LAYERS_2D_RENDER:
|
||||
lt = EditorPropertyLayers::LAYER_RENDER_2D;
|
||||
|
|
|
@ -969,7 +969,7 @@ void EditorPropertyDictionary::update_property() {
|
|||
pc->add_child(add_vbox);
|
||||
}
|
||||
prop->set_object_and_property(object.ptr(), prop_name);
|
||||
int change_index;
|
||||
int change_index = 0;
|
||||
|
||||
if (i < amount) {
|
||||
String cs = key.get_construct_string();
|
||||
|
|
|
@ -361,7 +361,7 @@ void EditorSettingsDialog::_tabs_tab_changed(int p_tab) {
|
|||
void EditorSettingsDialog::_focus_current_search_box() {
|
||||
|
||||
Control *tab = tabs->get_current_tab_control();
|
||||
LineEdit *current_search_box;
|
||||
LineEdit *current_search_box = NULL;
|
||||
if (tab == tab_general)
|
||||
current_search_box = search_box;
|
||||
else if (tab == tab_shortcuts)
|
||||
|
|
Loading…
Reference in New Issue