Преглед на файлове

fix release compilation

Kajetan Johannes Hammerle преди 2 години
родител
ревизия
2d93901ad1
променени са 1 файла, в които са добавени 6 реда и са изтрити 0 реда
  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