diff options
| author | Rye <rye@alchemyviewer.org> | 2025-10-19 23:16:49 -0400 |
|---|---|---|
| committer | Rye <rye@alchemyviewer.org> | 2025-10-27 04:59:14 -0400 |
| commit | 8890372a116cd6db0a1a43dcce753b9070d86b49 (patch) | |
| tree | 10735da602e77aa7864b11af48e6069420b91cfe /indra | |
| parent | 4abc945bd9dd666c99965adecdfc29aa1c1fdb0d (diff) | |
Fix numerous compiler warnings from GCC under Ubuntu 22.04
Signed-off-by: Rye <rye@alchemyviewer.org>
Diffstat (limited to 'indra')
| -rw-r--r-- | indra/llcommon/classic_callback.h | 4 | ||||
| -rw-r--r-- | indra/llcommon/llerror.h | 7 | ||||
| -rw-r--r-- | indra/llcommon/llkeybind.cpp | 9 | ||||
| -rw-r--r-- | indra/llcommon/llkeybind.h | 1 | ||||
| -rw-r--r-- | indra/llcommon/llsdserialize.cpp | 1 | ||||
| -rw-r--r-- | indra/llcommon/tests/llerror_test.cpp | 2 | ||||
| -rw-r--r-- | indra/llinventory/llsettingsbase.cpp | 4 | ||||
| -rw-r--r-- | indra/llinventory/llsettingsdaycycle.cpp | 2 | ||||
| -rw-r--r-- | indra/llinventory/llsettingssky.cpp | 2 | ||||
| -rw-r--r-- | indra/llinventory/llsettingswater.cpp | 1 | ||||
| -rw-r--r-- | indra/llmessage/llavatarname.h | 2 | ||||
| -rw-r--r-- | indra/llmessage/llexperiencecache.cpp | 2 | ||||
| -rw-r--r-- | indra/llmessage/llstoredmessage.cpp | 2 | ||||
| -rw-r--r-- | indra/llmessage/lltemplatemessagedispatcher.cpp | 1 | ||||
| -rw-r--r-- | indra/llprimitive/llmodelloader.cpp | 2 | ||||
| -rw-r--r-- | indra/llrender/llglcommonfunc.cpp | 2 | ||||
| -rw-r--r-- | indra/llrender/lltexturemanagerbridge.cpp | 2 | ||||
| -rw-r--r-- | indra/llwindow/llwindowmesaheadless.h | 1 | ||||
| -rw-r--r-- | indra/newview/llappviewerlinux.cpp | 27 | ||||
| -rw-r--r-- | indra/newview/llinventorygallerymenu.cpp | 4 |
20 files changed, 29 insertions, 49 deletions
diff --git a/indra/llcommon/classic_callback.h b/indra/llcommon/classic_callback.h index 009c25d67c..8a6ac7f7ff 100644 --- a/indra/llcommon/classic_callback.h +++ b/indra/llcommon/classic_callback.h @@ -184,8 +184,8 @@ protected: template <typename SIGNATURE, typename USERDATA=void*, typename CALLABLE=void(*)()> auto makeClassicCallback(CALLABLE&& callable) { - return std::move(ClassicCallback<SIGNATURE, USERDATA, CALLABLE> - (std::forward<CALLABLE>(callable))); + return ClassicCallback<SIGNATURE, USERDATA, CALLABLE> + (std::forward<CALLABLE>(callable)); } /***************************************************************************** diff --git a/indra/llcommon/llerror.h b/indra/llcommon/llerror.h index 41893a35e5..343cc47e4c 100644 --- a/indra/llcommon/llerror.h +++ b/indra/llcommon/llerror.h @@ -91,13 +91,8 @@ const int LL_ERR_NOERR = 0; #define llverify(func) do {if (func) {}} while(0) #endif -#ifdef LL_WINDOWS #define LL_STATIC_ASSERT(func, msg) static_assert(func, msg) -#define LL_BAD_TEMPLATE_INSTANTIATION(type, msg) static_assert(false, msg) -#else -#define LL_STATIC_ASSERT(func, msg) BOOST_STATIC_ASSERT(func) -#define LL_BAD_TEMPLATE_INSTANTIATION(type, msg) BOOST_STATIC_ASSERT(sizeof(type) != 0 && false); -#endif +#define LL_BAD_TEMPLATE_INSTANTIATION(type, msg) static_assert(sizeof(type) != 0 && false, msg) /** Error Logging Facility diff --git a/indra/llcommon/llkeybind.cpp b/indra/llcommon/llkeybind.cpp index e36c1d0a4c..abb0df0b87 100644 --- a/indra/llcommon/llkeybind.cpp +++ b/indra/llcommon/llkeybind.cpp @@ -114,15 +114,6 @@ void LLKeyData::reset() mIgnoreMasks = false; } -LLKeyData& LLKeyData::operator=(const LLKeyData& rhs) -{ - mMouse = rhs.mMouse; - mKey = rhs.mKey; - mMask = rhs.mMask; - mIgnoreMasks = rhs.mIgnoreMasks; - return *this; -} - bool LLKeyData::operator==(const LLKeyData& rhs) { if (mMouse != rhs.mMouse) return false; diff --git a/indra/llcommon/llkeybind.h b/indra/llcommon/llkeybind.h index 1bbb2fadb5..0a9d4600cc 100644 --- a/indra/llcommon/llkeybind.h +++ b/indra/llcommon/llkeybind.h @@ -43,7 +43,6 @@ public: bool isEmpty() const; bool empty() const { return isEmpty(); }; void reset(); - LLKeyData& operator=(const LLKeyData& rhs); bool operator==(const LLKeyData& rhs); bool operator!=(const LLKeyData& rhs); diff --git a/indra/llcommon/llsdserialize.cpp b/indra/llcommon/llsdserialize.cpp index 37af366a20..c42eebebd1 100644 --- a/indra/llcommon/llsdserialize.cpp +++ b/indra/llcommon/llsdserialize.cpp @@ -2397,6 +2397,7 @@ U8* unzip_llsdNavMesh( bool& valid, size_t& outsize, std::istream& is, S32 size { case Z_NEED_DICT: ret = Z_DATA_ERROR; + [[fallthrough]]; case Z_DATA_ERROR: case Z_MEM_ERROR: inflateEnd(&strm); diff --git a/indra/llcommon/tests/llerror_test.cpp b/indra/llcommon/tests/llerror_test.cpp index 3ec429530c..e39c402972 100644 --- a/indra/llcommon/tests/llerror_test.cpp +++ b/indra/llcommon/tests/llerror_test.cpp @@ -61,6 +61,8 @@ namespace { #ifdef __clang__ # pragma clang diagnostic ignored "-Wunused-function" +#elif defined(LL_GNUC) +# pragma GCC diagnostic ignored "-Wunused-function" #endif void test_that_error_h_includes_enough_things_to_compile_a_message() { diff --git a/indra/llinventory/llsettingsbase.cpp b/indra/llinventory/llsettingsbase.cpp index d7a94d61a5..fe2503966e 100644 --- a/indra/llinventory/llsettingsbase.cpp +++ b/indra/llinventory/llsettingsbase.cpp @@ -25,6 +25,8 @@ * $/LicenseInfo$ */ +#include "linden_common.h" + #include "llsettingsbase.h" #include "llmath.h" @@ -757,7 +759,7 @@ void LLSettingsBlender::update(const LLSettingsBase::BlendFactor& blendf) F64 LLSettingsBlender::setBlendFactor(const LLSettingsBase::BlendFactor& blendf_in) { LLSettingsBase::TrackPosition blendf = (F32)blendf_in; - llassert(!isnan(blendf)); + llassert(!std::isnan(blendf)); if (blendf >= 1.0) { triggerComplete(); diff --git a/indra/llinventory/llsettingsdaycycle.cpp b/indra/llinventory/llsettingsdaycycle.cpp index 2baf140e6a..ebd8602c8d 100644 --- a/indra/llinventory/llsettingsdaycycle.cpp +++ b/indra/llinventory/llsettingsdaycycle.cpp @@ -25,6 +25,8 @@ * $/LicenseInfo$ */ +#include "linden_common.h" + #include "llsettingsdaycycle.h" #include "llerror.h" #include <algorithm> diff --git a/indra/llinventory/llsettingssky.cpp b/indra/llinventory/llsettingssky.cpp index 4957cf3c02..fd3e49041c 100644 --- a/indra/llinventory/llsettingssky.cpp +++ b/indra/llinventory/llsettingssky.cpp @@ -25,6 +25,8 @@ * $/LicenseInfo$ */ +#include "linden_common.h" + #include "llsettingssky.h" #include "indra_constants.h" #include <algorithm> diff --git a/indra/llinventory/llsettingswater.cpp b/indra/llinventory/llsettingswater.cpp index b5d59dc497..427f06457f 100644 --- a/indra/llinventory/llsettingswater.cpp +++ b/indra/llinventory/llsettingswater.cpp @@ -24,6 +24,7 @@ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA * $/LicenseInfo$ */ +#include "linden_common.h" #include "llsettingswater.h" #include <algorithm> diff --git a/indra/llmessage/llavatarname.h b/indra/llmessage/llavatarname.h index eec966d51b..86b2931ed9 100644 --- a/indra/llmessage/llavatarname.h +++ b/indra/llmessage/llavatarname.h @@ -32,7 +32,7 @@ class LLSD; -class LL_COMMON_API LLAvatarName +class LLAvatarName { public: LLAvatarName(); diff --git a/indra/llmessage/llexperiencecache.cpp b/indra/llmessage/llexperiencecache.cpp index 78cca47456..9d940d8d71 100644 --- a/indra/llmessage/llexperiencecache.cpp +++ b/indra/llmessage/llexperiencecache.cpp @@ -23,6 +23,8 @@ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA * $/LicenseInfo$ */ +#include "linden_common.h" + #include "llexperiencecache.h" #include "llavatarname.h" diff --git a/indra/llmessage/llstoredmessage.cpp b/indra/llmessage/llstoredmessage.cpp index 39696ea235..ff8afde657 100644 --- a/indra/llmessage/llstoredmessage.cpp +++ b/indra/llmessage/llstoredmessage.cpp @@ -24,6 +24,8 @@ * $/LicenseInfo$ */ +#include "linden_common.h" + #include "llstoredmessage.h" LLStoredMessage::LLStoredMessage(const std::string& name, const LLSD& message) : mMessage(message), mName(name) diff --git a/indra/llmessage/lltemplatemessagedispatcher.cpp b/indra/llmessage/lltemplatemessagedispatcher.cpp index edbeb4acc1..02e5b56c8d 100644 --- a/indra/llmessage/lltemplatemessagedispatcher.cpp +++ b/indra/llmessage/lltemplatemessagedispatcher.cpp @@ -24,6 +24,7 @@ * $/LicenseInfo$ */ +#include "linden_common.h" #include "lltemplatemessagedispatcher.h" diff --git a/indra/llprimitive/llmodelloader.cpp b/indra/llprimitive/llmodelloader.cpp index 0383659f62..bce5f6adce 100644 --- a/indra/llprimitive/llmodelloader.cpp +++ b/indra/llprimitive/llmodelloader.cpp @@ -24,6 +24,8 @@ * $/LicenseInfo$ */ +#include "linden_common.h" + #include "llmodelloader.h" #include "llapp.h" diff --git a/indra/llrender/llglcommonfunc.cpp b/indra/llrender/llglcommonfunc.cpp index 13b08de7cc..bf4d337b50 100644 --- a/indra/llrender/llglcommonfunc.cpp +++ b/indra/llrender/llglcommonfunc.cpp @@ -24,6 +24,8 @@ * $/LicenseInfo$ */ +#include "linden_common.h" + #include "llglheaders.h" #include "llglcommonfunc.h" diff --git a/indra/llrender/lltexturemanagerbridge.cpp b/indra/llrender/lltexturemanagerbridge.cpp index c243f0697a..67838418bf 100644 --- a/indra/llrender/lltexturemanagerbridge.cpp +++ b/indra/llrender/lltexturemanagerbridge.cpp @@ -24,6 +24,8 @@ * $/LicenseInfo$ */ +#include "linden_common.h" + #include "lltexturemanagerbridge.h" // Define a null texture manager bridge. Applications must provide their own bridge implementaton. diff --git a/indra/llwindow/llwindowmesaheadless.h b/indra/llwindow/llwindowmesaheadless.h index ad08c4f065..47cd6320b1 100644 --- a/indra/llwindow/llwindowmesaheadless.h +++ b/indra/llwindow/llwindowmesaheadless.h @@ -53,6 +53,7 @@ public: bool switchContext(bool fullscreen, const LLCoordScreen &size, bool disable_vsync, const LLCoordScreen * const posp = NULL) override {return false;}; bool setCursorPosition(LLCoordWindow position) override {return false;}; bool getCursorPosition(LLCoordWindow *position) override {return false;}; + bool isWrapMouse() const override { return true; } void showCursor() override {}; void hideCursor() override {}; void showCursorFromMouseMove() override {}; diff --git a/indra/newview/llappviewerlinux.cpp b/indra/newview/llappviewerlinux.cpp index 4a96c45c69..c924771816 100644 --- a/indra/newview/llappviewerlinux.cpp +++ b/indra/newview/llappviewerlinux.cpp @@ -51,27 +51,6 @@ #ifdef LL_GLIB #include <gio/gio.h> #endif -#include <resolv.h> - -#if (__GLIBC__*1000 + __GLIBC_MINOR__) >= 2034 -extern "C" -{ - int __res_nquery(res_state statep, - const char *dname, int qclass, int type, - unsigned char *answer, int anslen) - { - return res_nquery( statep, dname, qclass, type, answer, anslen ); - } - - int __dn_expand(const unsigned char *msg, - const unsigned char *eomorig, - const unsigned char *comp_dn, char *exp_dn, - int length) - { - return dn_expand( msg,eomorig,comp_dn,exp_dn,length); - } -} -#endif #define VIEWERAPI_SERVICE "com.secondlife.ViewerAppAPIService" #define VIEWERAPI_PATH "/com/secondlife/ViewerAppAPI" @@ -299,12 +278,6 @@ void SDL_AppQuit(void *appstate, SDL_AppResult result) bool LLAppViewerLinux::init() { - // g_thread_init() must be called before *any* use of glib, *and* - // before any mutexes are held, *and* some of our third-party - // libraries likes to use glib functions; in short, do this here - // really early in app startup! - if (!g_thread_supported ()) g_thread_init (NULL); - bool success = LLAppViewer::init(); #if LL_SEND_CRASH_REPORTS diff --git a/indra/newview/llinventorygallerymenu.cpp b/indra/newview/llinventorygallerymenu.cpp index eda93e3e79..b63aa0997b 100644 --- a/indra/newview/llinventorygallerymenu.cpp +++ b/indra/newview/llinventorygallerymenu.cpp @@ -334,11 +334,11 @@ void LLInventoryGalleryContextMenu::doToSelected(const LLSD& userdata) } else if ("copy_slurl" == action) { - boost::function<void(LLLandmark*)> copy_slurl_cb = [](LLLandmark* landmark) + std::function<void(LLLandmark*)> copy_slurl_cb = [](LLLandmark* landmark) { LLVector3d global_pos; landmark->getGlobalPos(global_pos); - boost::function<void(std::string& slurl)> copy_slurl_to_clipboard_cb = [](const std::string& slurl) + std::function<void(std::string& slurl)> copy_slurl_to_clipboard_cb = [](const std::string& slurl) { gViewerWindow->getWindow()->copyTextToClipboard(utf8str_to_wstring(slurl)); LLSD args; |
