summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2018-10-04 11:09:55 +0200
committerRémi Verschelde <rverschelde@gmail.com>2018-10-04 11:50:16 +0200
commit97b9697ea2601f0fd92e3f326c6db29e0598638f (patch)
tree4883385e9ea2f977c38909b98cf385e82b3fe29b /drivers
parentcfa373c69f6af64d9fce8f1773a4b795f361a34c (diff)
Fix some OSX and iOS Clang warnings
Fixes the following XCode 9.4.1 warnings: ``` core/os/memory.cpp:175:13: warning: unused variable 's' [-Wunused-variable] drivers/coremidi/core_midi.cpp:68:14: warning: comparison between NULL and non-pointer ('MIDIEndpointRef' (aka 'unsigned int') and NULL) [-Wnull-arithmetic] drivers/gles2/rasterizer_gles2.cpp:77:24: warning: unused function '_gl_debug_print' [-Wunused-function,34] drivers/unix/thread_posix.cpp:106:12: warning: unused variable 'running_thread' [-Wunused-variable,34] modules/gdnative/nativescript/nativescript.h:371:16: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] platform/iphone/gl_view.mm:56:14: warning: unused variable 'video_previous_volume' [-Wunused-variable,34] platform/iphone/gl_view.mm:251:12: warning: unused function 'get_first_id' [-Wunused-function,34] platform/iphone/main.m:45:15: warning: unused variable 'app' [-Wunused-variable,34] platform/osx/os_osx.mm:79:15: warning: unused function 'convertRectToBacking' [-Wunused-function] ```
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gles2/rasterizer_gles2.cpp2
-rw-r--r--drivers/unix/thread_posix.cpp3
2 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gles2/rasterizer_gles2.cpp b/drivers/gles2/rasterizer_gles2.cpp
index 5f4b5428e8..848ac8b78f 100644
--- a/drivers/gles2/rasterizer_gles2.cpp
+++ b/drivers/gles2/rasterizer_gles2.cpp
@@ -74,6 +74,7 @@
#include <EGL/eglext.h>
#endif
+#ifndef IPHONE_ENABLED
static void GLAPIENTRY _gl_debug_print(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *message, const GLvoid *userParam) {
if (type == _EXT_DEBUG_TYPE_OTHER_ARB)
@@ -120,6 +121,7 @@ static void GLAPIENTRY _gl_debug_print(GLenum source, GLenum type, GLuint id, GL
ERR_PRINTS(output);
}
+#endif // IPHONE_ENABLED
typedef void (*DEBUGPROCARB)(GLenum source,
GLenum type,
diff --git a/drivers/unix/thread_posix.cpp b/drivers/unix/thread_posix.cpp
index fcefe0a3b3..54bbbf2dad 100644
--- a/drivers/unix/thread_posix.cpp
+++ b/drivers/unix/thread_posix.cpp
@@ -103,8 +103,6 @@ void ThreadPosix::wait_to_finish_func_posix(Thread *p_thread) {
Error ThreadPosix::set_name_func_posix(const String &p_name) {
- pthread_t running_thread = pthread_self();
-
#ifdef PTHREAD_NO_RENAME
return ERR_UNAVAILABLE;
@@ -117,6 +115,7 @@ Error ThreadPosix::set_name_func_posix(const String &p_name) {
#else
+ pthread_t running_thread = pthread_self();
#ifdef PTHREAD_BSD_SET_NAME
pthread_set_name_np(running_thread, p_name.utf8().get_data());
int err = 0; // Open/FreeBSD ignore errors in this function