diff --git a/indra/llcommon/llsdutil.cpp b/indra/llcommon/llsdutil.cpp index d5cc14ff55..a1ee1cb7ba 100644 --- a/indra/llcommon/llsdutil.cpp +++ b/indra/llcommon/llsdutil.cpp @@ -47,6 +47,12 @@ #include #include +// Suppress warnings about the string fiddling +#if LL_LINUX +#pragma GCC diagnostic ignored "-Wstringop-truncation" +#endif +// + // U32 LLSD ll_sd_from_U32(const U32 val) { diff --git a/indra/llmessage/llnamevalue.cpp b/indra/llmessage/llnamevalue.cpp index c51883ee3d..6076439518 100644 --- a/indra/llmessage/llnamevalue.cpp +++ b/indra/llmessage/llnamevalue.cpp @@ -35,6 +35,12 @@ #include "llstring.h" #include "llstringtable.h" +// Suppress warnings about the string fiddling +#if LL_LINUX +#pragma GCC diagnostic ignored "-Wstringop-truncation" +#endif +// + // Anonymous enumeration to provide constants in this file. // *NOTE: These values may be used in sscanf statements below as their // value-1, so search for '2047' if you cange NV_BUFFER_LEN or '63' if diff --git a/indra/newview/llurl.cpp b/indra/newview/llurl.cpp index 01a81c5f83..46cdbf9ed3 100644 --- a/indra/newview/llurl.cpp +++ b/indra/newview/llurl.cpp @@ -28,6 +28,11 @@ #include "llurl.h" #include "llerror.h" +#if LL_LINUX +#pragma GCC diagnostic ignored "-Wstringop-truncation" +#endif + + LLURL::LLURL() { init(""); diff --git a/indra/newview/llviewerjoystick.cpp b/indra/newview/llviewerjoystick.cpp index d147560011..c81fa22b13 100644 --- a/indra/newview/llviewerjoystick.cpp +++ b/indra/newview/llviewerjoystick.cpp @@ -493,7 +493,16 @@ void LLViewerJoystick::initDevice(void * preffered_device /*LPDIRECTINPUTDEVICE8 #if LIB_NDOF mLastDeviceUUID = guid; +#ifdef LL_LINUX +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wstringop-truncation" +#endif strncpy(mNdofDev->product, name.c_str(), sizeof(mNdofDev->product)); +#ifdef LL_LINUX +#pragma GCC diagnostic pop +#endif + + mNdofDev->product[ sizeof(mNdofDev->product)-1 ] = 0; mNdofDev->manufacturer[0] = '\0'; initDevice(preffered_device);