summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2018-09-27 12:07:59 +0200
committerRémi Verschelde <rverschelde@gmail.com>2018-09-27 16:25:24 +0200
commitd95bbb89227cab293f17f325040084ea780652ab (patch)
tree9b45824fdb2ee7a3d2047e1b93d11861f170a3af /platform
parentcda5b0bfe17203b5da261f23bd31f0967522a147 (diff)
Fix warnings about set but unused variables [-Wunused-but-set-variable]
Fixes the following GCC 5 warnings: ``` drivers/gles2/rasterizer_canvas_gles2.cpp:814:8: warning: variable 'rt_size' set but not used [-Wunused-but-set-variable] drivers/gles2/rasterizer_scene_gles2.cpp:2270:11: warning: variable 'vp_height' set but not used [-Wunused-but-set-variable] drivers/gles2/rasterizer_scene_gles2.cpp:2673:22: warning: variable 'e' set but not used [-Wunused-but-set-variable] drivers/gles2/rasterizer_scene_gles2.cpp:715:7: warning: variable 'no_cull' set but not used [-Wunused-but-set-variable] drivers/gles2/shader_gles2.cpp:693:14: warning: variable 'cc' set but not used [-Wunused-but-set-variable] drivers/gles3/rasterizer_canvas_gles3.cpp:1226:8: warning: variable 'rt_size' set but not used [-Wunused-but-set-variable] drivers/gles3/rasterizer_scene_gles3.cpp:3039:10: warning: variable 'contrib' set but not used [-Wunused-but-set-variable] drivers/gles3/rasterizer_scene_gles3.cpp:4504:32: warning: variable 'vp_height' set but not used [-Wunused-but-set-variable] editor/editor_inspector.cpp:272:9: warning: variable 'guide_color' set but not used [-Wunused-but-set-variable] editor/editor_themes.cpp:1067:14: warning: variable 'alpha3' set but not used [-Wunused-but-set-variable] editor/editor_themes.cpp:263:8: warning: variable 'script_bg_color' set but not used [-Wunused-but-set-variable] editor/plugins/collision_shape_2d_editor_plugin.cpp:326:11: warning: variable 'cpoint' set but not used [-Wunused-but-set-variable] editor/plugins/mesh_editor_plugin.cpp:72:9: warning: variable 'size' set but not used [-Wunused-but-set-variable] editor/plugins/shader_editor_plugin.cpp:471:12: warning: variable 'mpos' set but not used [-Wunused-but-set-variable] editor/plugins/shader_editor_plugin.cpp:89:8: warning: variable 'basetype_color' set but not used [-Wunused-but-set-variable] editor/plugins/shader_editor_plugin.cpp:90:8: warning: variable 'type_color' set but not used [-Wunused-but-set-variable] editor/plugins/shader_editor_plugin.cpp:92:8: warning: variable 'string_color' set but not used [-Wunused-but-set-variable] modules/visual_script/visual_script_editor.cpp:2521:7: warning: variable 'seq_connect' set but not used [-Wunused-but-set-variable] platform/android/export/export.cpp:580:12: warning: variable 'styles_count' set but not used [-Wunused-but-set-variable] platform/android/export/export.cpp:584:12: warning: variable 'styles_offset' set but not used [-Wunused-but-set-variable] platform/osx/export/export.cpp:464:9: warning: variable 'zerr' set but not used [-Wunused-but-set-variable] scene/2d/tile_map.cpp:260:10: warning: variable 'tcenter' set but not used [-Wunused-but-set-variable] scene/3d/light.cpp:166:7: warning: variable 'editor_ok' set but not used [-Wunused-but-set-variable] scene/3d/navigation.cpp:566:11: warning: variable 'closest_navmesh' set but not used [-Wunused-but-set-variable] scene/gui/rich_text_label.cpp:869:8: warning: variable 'size' set but not used [-Wunused-but-set-variable] scene/main/viewport.cpp:705:14: warning: variable 'xform' set but not used [-Wunused-but-set-variable] scene/main/viewport.cpp:706:8: warning: variable 'ss' set but not used [-Wunused-but-set-variable] scene/main/viewport.cpp:726:14: warning: variable 'xform' set but not used [-Wunused-but-set-variable] scene/main/viewport.cpp:727:8: warning: variable 'ss' set but not used [-Wunused-but-set-variable] scene/resources/material.cpp:430:7: warning: variable 'using_world' set but not used [-Wunused-but-set-variable] servers/visual/shader_language.cpp:2026:7: warning: variable 'all_const' set but not used [-Wunused-but-set-variable] servers/visual/visual_server_scene.cpp:1383:28: warning: variable 'z_max_cam' set but not used [-Wunused-but-set-variable] ``` Also fixes two [-Wunused-value] warnings: ``` scene/gui/text_edit.cpp:4405:20: warning: statement has no effect [-Wunused-value] servers/visual/visual_server_scene.cpp:905:48: warning: value computed is not used [-Wunused-value] ``` Some of those are bugs and need further work, they are identified with `// FIXME` comments.
Diffstat (limited to 'platform')
-rw-r--r--platform/android/export/export.cpp10
-rw-r--r--platform/osx/export/export.cpp4
2 files changed, 7 insertions, 7 deletions
diff --git a/platform/android/export/export.cpp b/platform/android/export/export.cpp
index e74693893d..056a3e62e0 100644
--- a/platform/android/export/export.cpp
+++ b/platform/android/export/export.cpp
@@ -577,11 +577,11 @@ class EditorExportAndroid : public EditorExportPlatform {
uint32_t ofs = 8;
uint32_t string_count = 0;
- uint32_t styles_count = 0;
+ //uint32_t styles_count = 0;
uint32_t string_flags = 0;
uint32_t string_data_offset = 0;
- uint32_t styles_offset = 0;
+ //uint32_t styles_offset = 0;
uint32_t string_table_begins = 0;
uint32_t string_table_ends = 0;
Vector<uint8_t> stable_extra;
@@ -631,16 +631,16 @@ class EditorExportAndroid : public EditorExportPlatform {
int iofs = ofs + 8;
string_count = decode_uint32(&p_manifest[iofs]);
- styles_count = decode_uint32(&p_manifest[iofs + 4]);
+ //styles_count = decode_uint32(&p_manifest[iofs + 4]);
string_flags = decode_uint32(&p_manifest[iofs + 8]);
string_data_offset = decode_uint32(&p_manifest[iofs + 12]);
- styles_offset = decode_uint32(&p_manifest[iofs + 16]);
+ //styles_offset = decode_uint32(&p_manifest[iofs + 16]);
/*
printf("string count: %i\n",string_count);
printf("flags: %i\n",string_flags);
printf("sdata ofs: %i\n",string_data_offset);
printf("styles ofs: %i\n",styles_offset);
- */
+ */
uint32_t st_offset = iofs + 20;
string_table.resize(string_count);
uint32_t string_end = 0;
diff --git a/platform/osx/export/export.cpp b/platform/osx/export/export.cpp
index b0232e2990..27b4fdc228 100644
--- a/platform/osx/export/export.cpp
+++ b/platform/osx/export/export.cpp
@@ -461,7 +461,7 @@ Error EditorExportPlatformOSX::export_project(const Ref<EditorExportPreset> &p_p
fi.internal_fa = info.internal_fa;
fi.external_fa = info.external_fa;
- int zerr = zipOpenNewFileInZip(dst_pkg_zip,
+ zipOpenNewFileInZip(dst_pkg_zip,
file.utf8().get_data(),
&fi,
NULL,
@@ -472,7 +472,7 @@ Error EditorExportPlatformOSX::export_project(const Ref<EditorExportPreset> &p_p
Z_DEFLATED,
Z_DEFAULT_COMPRESSION);
- zerr = zipWriteInFileInZip(dst_pkg_zip, data.ptr(), data.size());
+ zipWriteInFileInZip(dst_pkg_zip, data.ptr(), data.size());
zipCloseFileInZip(dst_pkg_zip);
}
}