Browse Source

fix release compilation

Kajetan Johannes Hammerle 2 years ago
parent
commit
2d93901ad1
1 changed files with 6 additions and 0 deletions
  1. 6 0
      utils/StringBuffer.h

+ 6 - 0
utils/StringBuffer.h

@@ -6,6 +6,10 @@
 
 #include "utils/Types.h"
 
+// ignore buffer overflow warnings with snprintf
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wformat-truncation"
+
 template<int N>
 class StringBuffer final {
     int length;
@@ -202,4 +206,6 @@ bool operator!=(const char* str, const StringBuffer<N> buffer) {
     return buffer != str;
 }
 
+#pragma GCC diagnostic pop
+
 #endif