summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorHein-Pieter van Braam <hp@tmm.cx>2017-09-01 22:33:39 +0200
committerHein-Pieter van Braam <hp@tmm.cx>2017-09-02 01:59:26 +0200
commit9c63ab99f0a505b0f60079bb30cc453b4415fddc (patch)
tree7014cb6e8c2e71a0583656f76d3d37d719a74fb0 /platform
parentdac150108ab3c1f41d5fd86cc6853f883064caaf (diff)
Fix use of unitialized variables
The second in my quest to make Godot 3.x compile with -Werror on GCC7
Diffstat (limited to 'platform')
-rw-r--r--platform/android/export/export.cpp16
-rw-r--r--platform/uwp/export/export.cpp4
2 files changed, 11 insertions, 9 deletions
diff --git a/platform/android/export/export.cpp b/platform/android/export/export.cpp
index 3c5c0fda23..d691bd7629 100644
--- a/platform/android/export/export.cpp
+++ b/platform/android/export/export.cpp
@@ -540,14 +540,14 @@ class EditorExportAndroid : public EditorExportPlatform {
//print_line("FILESIZE: "+itos(filesize)+" ACTUAL: "+itos(p_manifest.size()));
- uint32_t string_count;
- uint32_t styles_count;
- uint32_t string_flags;
- uint32_t string_data_offset;
-
- uint32_t styles_offset;
- uint32_t string_table_begins;
- uint32_t string_table_ends;
+ uint32_t string_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 string_table_begins = 0;
+ uint32_t string_table_ends = 0;
Vector<uint8_t> stable_extra;
String version_name = p_preset->get("version/name");
diff --git a/platform/uwp/export/export.cpp b/platform/uwp/export/export.cpp
index f9b8422004..a2be126c58 100644
--- a/platform/uwp/export/export.cpp
+++ b/platform/uwp/export/export.cpp
@@ -866,7 +866,7 @@ class EditorExportUWP : public EditorExportPlatform {
Vector<uint8_t> _get_image_data(const Ref<EditorExportPreset> &p_preset, const String &p_path) {
Vector<uint8_t> data;
- StreamTexture *image;
+ StreamTexture *image = NULL;
if (p_path.find("StoreLogo") != -1) {
image = p_preset->get("images/store_logo").is_zero() ? NULL : Object::cast_to<StreamTexture>(((Object *)p_preset->get("images/store_logo")));
@@ -882,6 +882,8 @@ class EditorExportUWP : public EditorExportPlatform {
image = p_preset->get("images/wide310x150_logo").is_zero() ? NULL : Object::cast_to<StreamTexture>(((Object *)p_preset->get("images/wide310x150_logo")));
} else if (p_path.find("SplashScreen") != -1) {
image = p_preset->get("images/splash_screen").is_zero() ? NULL : Object::cast_to<StreamTexture>(((Object *)p_preset->get("images/splash_screen")));
+ } else {
+ ERR_PRINT("Unable to load logo");
}
if (!image) return data;