diff --git a/indra/llcommon/llsdutil.cpp b/indra/llcommon/llsdutil.cpp
index b70529ced7dda614801a84a3d5bb4a95cb05ede3..4090a8388775800e8acdd6acc3d6d3148c97c144 100644
--- a/indra/llcommon/llsdutil.cpp
+++ b/indra/llcommon/llsdutil.cpp
@@ -47,6 +47,10 @@
 #include <set>
 #include <boost/range.hpp>
 
+#if LL_GNUC
+#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 c51883ee3d80f767efb7d26cc4e99b4556565895..f7c0517b4c4e338b4a921e9d75634e5c41ea6830 100644
--- a/indra/llmessage/llnamevalue.cpp
+++ b/indra/llmessage/llnamevalue.cpp
@@ -35,6 +35,10 @@
 #include "llstring.h"
 #include "llstringtable.h"
 
+#if LL_GNUC
+#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/llvfs/tests/lldir_test.cpp b/indra/llvfs/tests/lldir_test.cpp
index 3cff622a4bac4091914f43a1220d4eb5d71f5a82..6cc4f741145062085841602d92a9e0c6d4409f1a 100644
--- a/indra/llvfs/tests/lldir_test.cpp
+++ b/indra/llvfs/tests/lldir_test.cpp
@@ -435,9 +435,7 @@ namespace tut
       
       for (counter=0, foundUnused=false; !foundUnused; counter++ )
       {
-         char counterStr[3];
-         sprintf(counterStr, "%02d", counter);
-         uniqueDir = dirbase + counterStr;
+         uniqueDir = dirbase + std::to_string(counter);
          foundUnused = ! ( LLFile::isdir(uniqueDir) || LLFile::isfile(uniqueDir) );
       }
       ensure("test directory '" + uniqueDir + "' creation failed", !LLFile::mkdir(uniqueDir));
diff --git a/indra/newview/llurl.cpp b/indra/newview/llurl.cpp
index 01a81c5f83e440433183e766819693db938304b7..64fc0815150d1aa79f947d565d1422986fe95a6b 100644
--- a/indra/newview/llurl.cpp
+++ b/indra/newview/llurl.cpp
@@ -28,6 +28,10 @@
 #include "llurl.h"
 #include "llerror.h"
 
+#if LL_GNUC
+#pragma GCC diagnostic ignored "-Wstringop-truncation"
+#endif
+
 LLURL::LLURL()
 {
 	init("");