https://git.reactos.org/?p=reactos.git;a=commitdiff;h=612b1f2e6e4025600db47…
commit 612b1f2e6e4025600db4715a4478a0b36d5b647b
Author: Jérôme Gardou <jerome.gardou(a)reactos.org>
AuthorDate: Thu Oct 15 11:29:09 2020 +0200
Commit: Jérôme Gardou <jerome.gardou(a)reactos.org>
CommitDate: Thu Oct 15 11:29:09 2020 +0200
[UDFS] Fix build with lower optimization level
---
drivers/filesystems/udfs/Include/mem_tools.h | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/drivers/filesystems/udfs/Include/mem_tools.h
b/drivers/filesystems/udfs/Include/mem_tools.h
index 11d92544dbc..ff64d7a3b4d 100644
--- a/drivers/filesystems/udfs/Include/mem_tools.h
+++ b/drivers/filesystems/udfs/Include/mem_tools.h
@@ -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__