diff --git a/Subtrees/beast/modules/beast_core/native/beast_android_Files.cpp b/Subtrees/beast/modules/beast_core/native/beast_android_Files.cpp index 5e3972347b..5a6c56674a 100644 --- a/Subtrees/beast/modules/beast_core/native/beast_android_Files.cpp +++ b/Subtrees/beast/modules/beast_core/native/beast_android_Files.cpp @@ -227,6 +227,7 @@ bool Process::openDocument (const String& fileName, const String& parameters) { const LocalRef t (javaString (fileName)); android.activity.callVoidMethod (BeastAppActivity.launchURL, t.get()); + return true; } void File::revealToUser() const diff --git a/Subtrees/beast/modules/beast_core/native/beast_android_Misc.cpp b/Subtrees/beast/modules/beast_core/native/beast_android_Misc.cpp index d2d236a180..275fd6e114 100644 --- a/Subtrees/beast/modules/beast_core/native/beast_android_Misc.cpp +++ b/Subtrees/beast/modules/beast_core/native/beast_android_Misc.cpp @@ -23,5 +23,5 @@ void Logger::outputDebugString (const String& text) { - __android_log_print (ANDROID_LOG_INFO, "BEAST", text.toUTF8()); + __android_log_print (ANDROID_LOG_INFO, "BEAST", "%", text.toUTF8().getAddress()); } diff --git a/Subtrees/beast/modules/beast_core/network/beast_IPAddress.cpp b/Subtrees/beast/modules/beast_core/network/beast_IPAddress.cpp index 2a15c9315d..789cc46f4c 100644 --- a/Subtrees/beast/modules/beast_core/network/beast_IPAddress.cpp +++ b/Subtrees/beast/modules/beast_core/network/beast_IPAddress.cpp @@ -121,7 +121,7 @@ static void findIPAddresses (int sock, Array& result) cfg.ifc_buf += IFNAMSIZ + cfg.ifc_req->ifr_addr.sa_len; } #else - for (int i = 0; i < cfg.ifc_len / sizeof (struct ifreq); ++i) + for (size_t i = 0; i < cfg.ifc_len / sizeof (struct ifreq); ++i) { const ifreq& item = cfg.ifc_req[i]; diff --git a/Subtrees/beast/modules/beast_core/threads/beast_Thread.cpp b/Subtrees/beast/modules/beast_core/threads/beast_Thread.cpp index a2f7289743..0a5fffae4e 100644 --- a/Subtrees/beast/modules/beast_core/threads/beast_Thread.cpp +++ b/Subtrees/beast/modules/beast_core/threads/beast_Thread.cpp @@ -58,10 +58,15 @@ struct CurrentThreadHolder : public SharedObject static char currentThreadHolderLock [sizeof (SpinLock)]; // (statically initialised to zeros). +static SpinLock* castToSpinLockWithoutAliasingWarning (void* s) +{ + return static_cast (s); +} + static CurrentThreadHolder::Ptr getCurrentThreadHolder() { static CurrentThreadHolder::Ptr currentThreadHolder; - SpinLock::ScopedLockType lock (*reinterpret_cast (currentThreadHolderLock)); + SpinLock::ScopedLockType lock (*castToSpinLockWithoutAliasingWarning (currentThreadHolderLock)); if (currentThreadHolder == nullptr) currentThreadHolder = new CurrentThreadHolder();