Make GCC shut up about some warnings

master
Nicky 2022-02-10 22:06:05 +01:00
parent 6d94e02868
commit 2a03afe85c
4 changed files with 26 additions and 0 deletions

View File

@ -47,6 +47,12 @@
#include <set>
#include <boost/range.hpp>
// <FS:ND> Suppress warnings about the string fiddling
#if LL_LINUX
#pragma GCC diagnostic ignored "-Wstringop-truncation"
#endif
// </FS:ND>
// U32
LLSD ll_sd_from_U32(const U32 val)
{

View File

@ -35,6 +35,12 @@
#include "llstring.h"
#include "llstringtable.h"
// <FS:ND> Suppress warnings about the string fiddling
#if LL_LINUX
#pragma GCC diagnostic ignored "-Wstringop-truncation"
#endif
// </FS:ND>
// 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

View File

@ -28,6 +28,11 @@
#include "llurl.h"
#include "llerror.h"
#if LL_LINUX
#pragma GCC diagnostic ignored "-Wstringop-truncation"
#endif
LLURL::LLURL()
{
init("");

View File

@ -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);