Suppress : Stringop Overflow warning during build time
- gcc complains about the following warning during a build
and as -Werror is enforced, it is treated as an error which
is resulting in a build failure.
- error: ‘strncpy’ specified bound depends on the length of
the source argument [-Werror=stringop-overflow=]
- There are couple of workarounds that were discussed in this
commit, but at the moment we thought the best option to move
forward is to suppress the warning until we know a concrete
solution for this problem. Once we fix it , we can enforce the
warning again.
Tested By:
- bmcweb compiled without any warning or error.
Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com>
Change-Id: I36c595ab610523c8d50833cab0fdd20c509a8a2a
diff --git a/CMakeLists.txt b/CMakeLists.txt
index caecd04..98ccb28 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -209,6 +209,7 @@
-Wnull-dereference \
-Wdouble-promotion \
-Wformat=2 \
+ -Wno-stringop-overflow \
-Wunused-parameter \
"
)