瀏覽代碼

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