summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2018-09-27 13:11:41 +0200
committerRémi Verschelde <rverschelde@gmail.com>2018-09-27 16:33:52 +0200
commitcdc411fd54fbafc414b29abb1d50a0ff327f0d89 (patch)
treed6efd627de853bc73cd496f4f5872393590882cb /core
parentd95bbb89227cab293f17f325040084ea780652ab (diff)
Fix various warnings: [-Waddress], [-Wpointer-arith], [-Wwrite-strings], [-Wreturn-local-addr] and more
Fixes the following GCC 5 warnings: ``` core/os/file_access.cpp:49:19: warning: the address of 'FileAccess::create_func' will always evaluate as 'true' [-Waddress] servers/audio_server.cpp:192:70: warning: comparison with string literal results in unspecified behaviour [-Waddress] drivers/gles2/rasterizer_storage_gles2.cpp:4095:90: warning: NULL used in arithmetic [-Wpointer-arith] modules/gdnative/register_types.cpp:237:3: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings] platform/android/export/export.cpp:207:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings] modules/gdscript/gdscript.h:150:67: warning: returning reference to temporary [-Wreturn-local-addr] servers/physics_2d/collision_object_2d_sw.h:119:56: warning: returning reference to temporary [-Wreturn-local-addr] servers/physics_2d/collision_object_2d_sw.h:123:56: warning: returning reference to temporary [-Wreturn-local-addr] servers/physics_2d/collision_object_2d_sw.h:127:50: warning: returning reference to temporary [-Wreturn-local-addr] servers/physics_2d/collision_object_2d_sw.h:131:52: warning: returning reference to temporary [-Wreturn-local-addr] editor/plugins/skeleton_editor_plugin.cpp:34:36: warning: extra tokens at end of #include directive modules/bullet/bullet_types_converter.cpp:31:9: warning: #pragma once in main file editor/import/editor_scene_importer_gltf.cpp:1996:51: warning: name lookup of 'i' changed modules/visual_script/visual_script_property_selector.cpp:402:45: warning: name lookup of 'E' changed scene/gui/tree.cpp:1268:25: warning: name lookup of 'i' changed scene/resources/visual_shader.cpp:808:32: warning: name lookup of 'i' changed ```
Diffstat (limited to 'core')
-rw-r--r--core/os/file_access.cpp1
1 files changed, 0 insertions, 1 deletions
diff --git a/core/os/file_access.cpp b/core/os/file_access.cpp
index 224dea3343..7749d45d4a 100644
--- a/core/os/file_access.cpp
+++ b/core/os/file_access.cpp
@@ -46,7 +46,6 @@ bool FileAccess::backup_save = false;
FileAccess *FileAccess::create(AccessType p_access) {
- ERR_FAIL_COND_V(!create_func, 0);
ERR_FAIL_INDEX_V(p_access, ACCESS_MAX, 0);
FileAccess *ret = create_func[p_access]();