[UDFS] Fix build with lower optimization level
authorJérôme Gardou <jerome.gardou@reactos.org>
Thu, 15 Oct 2020 09:29:09 +0000 (11:29 +0200)
committerJérôme Gardou <jerome.gardou@reactos.org>
Thu, 15 Oct 2020 09:29:09 +0000 (11:29 +0200)
drivers/filesystems/udfs/Include/mem_tools.h

index 11d9254..ff64d7a 100644 (file)
@@ -221,6 +221,12 @@ VOID inline MyFreePool__(PVOID addr) {
 
 #endif //MY_MEM_BOUNDS_CHECK
 
+/* This function just scares the hell out of GCC */
+#ifdef __GNUC__
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wstringop-overflow"
+#endif
+
 ULONG inline MyReallocPool__(PCHAR addr, ULONG len, PCHAR *pnewaddr, ULONG newlen) {
     ULONG _len, _newlen;
     _newlen = MyAlignSize__(newlen);
@@ -292,6 +298,9 @@ ULONG inline MyReallocPool__(PCHAR addr, ULONG len, PCHAR *pnewaddr, ULONG newle
 */
     return newlen;
 }
+#ifdef __GNUC__
+#pragma GCC diagnostic pop
+#endif
 
 #ifndef MY_USE_ALIGN
 #undef  MyAlignSize__