From 09c5c313030b5f8f4e882b15f60371ff70bc2ce4 Mon Sep 17 00:00:00 2001 From: Oleg Gerasimov Date: Sat, 13 Aug 2016 21:05:49 +0300 Subject: [PATCH 1/3] Fix clang build warnings --- src/gfx_compilers.h | 4 ++-- src/gos/gos_osx.h | 1 + src/gos/gos_qt.cpp | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/gfx_compilers.h b/src/gfx_compilers.h index 31f2ce39..9a8792fc 100644 --- a/src/gfx_compilers.h +++ b/src/gfx_compilers.h @@ -335,8 +335,8 @@ #define GFX_COMPILER_TESTED TRUE #define GFX_COMPILER_VERSION_MAJOR (__clang_major__) #define GFX_COMPILER_VERSION_MINOR (__clang_minor__) - #define GFX_COMPILER_VERSION_PATCH (__clang_patchlevel__) - #define DEPRECATED(msg) __attribute__((deprecated(msg))); + #define GFX_COMPILER_VERSION_PATCH (__clang_patchlevel__) + #define DEPRECATED(msg) __attribute__((deprecated(msg))) #elif GFX_COMPILER == GFX_COMPILER_COMEAU #define GFX_COMPILER_NAME "Comeau C++" #define GFX_COMPILER_VERSION_MAJOR ((__COMO_VERSION__)/100) diff --git a/src/gos/gos_osx.h b/src/gos/gos_osx.h index 44853937..9a8e10d9 100644 --- a/src/gos/gos_osx.h +++ b/src/gos/gos_osx.h @@ -13,6 +13,7 @@ #include #include #include +#include /* Already defined int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, size_t */ diff --git a/src/gos/gos_qt.cpp b/src/gos/gos_qt.cpp index 1708a478..e3a0f0ca 100644 --- a/src/gos/gos_qt.cpp +++ b/src/gos/gos_qt.cpp @@ -7,12 +7,12 @@ #include "../../gfx.h" +#if GFX_USE_OS_QT #include #include #include #include -#if GFX_USE_OS_QT class Thread : public QThread { From 026379bafda46c83957ab7f58b4144ed84129d31 Mon Sep 17 00:00:00 2001 From: Oleg Gerasimov Date: Sat, 13 Aug 2016 21:40:51 +0300 Subject: [PATCH 2/3] Fix function SendKeyboardEvent name conflict in single file build --- src/gwin/gwin_keyboard.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/gwin/gwin_keyboard.c b/src/gwin/gwin_keyboard.c index f3dd6fb0..45021910 100644 --- a/src/gwin/gwin_keyboard.c +++ b/src/gwin/gwin_keyboard.c @@ -114,7 +114,7 @@ static int NumKeyRows(const char **keyset) { return len; } -static void SendKeyboardEventToListener(GSourceListener *psl, GKeyboardObject *gk) { +static void _SendKeyboardEventToListener(GSourceListener *psl, GKeyboardObject *gk) { GEventKeyboard *pe; const GVSpecialKey *skey; unsigned i; @@ -157,18 +157,18 @@ static void SendKeyboardEventToListener(GSourceListener *psl, GKeyboardObject *g geventSendEvent(psl); } -static void SendKeyboardEvent(GKeyboardObject *gk) { +static void _SendKeyboardEvent(GKeyboardObject *gk) { GSourceListener *psl; // Send to the "All Keyboards" source listeners psl = 0; while ((psl = geventGetSourceListener(AllKeyboards, psl))) - SendKeyboardEventToListener(psl, gk); + _SendKeyboardEventToListener(psl, gk); // Send to the keyboard specific source listeners psl = 0; while ((psl = geventGetSourceListener((GSourceHandle)gk, psl))) - SendKeyboardEventToListener(psl, gk); + _SendKeyboardEventToListener(psl, gk); } @@ -257,7 +257,7 @@ static void SendKeyboardEvent(GKeyboardObject *gk) { // Send the key if required if (skey->sendkey && skey->sendkey[0]) - SendKeyboardEvent(gk); + _SendKeyboardEvent(gk); // Update the display _gwinUpdate((GHandle)gw); @@ -274,7 +274,7 @@ static void SendKeyboardEvent(GKeyboardObject *gk) { } // Send the key - SendKeyboardEvent(gk); + _SendKeyboardEvent(gk); // Update the display _gwinUpdate((GHandle)gw); From fe84a7b9dda687363ead3d4a13f9161560f3d7a0 Mon Sep 17 00:00:00 2001 From: Oleg Gerasimov Date: Sat, 20 Aug 2016 17:54:48 +0300 Subject: [PATCH 3/3] Fix formatting --- src/gfx_compilers.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gfx_compilers.h b/src/gfx_compilers.h index 9a8792fc..2c58ec5c 100644 --- a/src/gfx_compilers.h +++ b/src/gfx_compilers.h @@ -335,7 +335,7 @@ #define GFX_COMPILER_TESTED TRUE #define GFX_COMPILER_VERSION_MAJOR (__clang_major__) #define GFX_COMPILER_VERSION_MINOR (__clang_minor__) - #define GFX_COMPILER_VERSION_PATCH (__clang_patchlevel__) + #define GFX_COMPILER_VERSION_PATCH (__clang_patchlevel__) #define DEPRECATED(msg) __attribute__((deprecated(msg))) #elif GFX_COMPILER == GFX_COMPILER_COMEAU #define GFX_COMPILER_NAME "Comeau C++"