use no-stringop-truncation for pel library
GCC 10 fails to build the openpower-pels extension due to the error seen
below:
|phosphor-logging/extensions/openpower-pels/fru_identity.cpp:199:12: error: 'char* strncpy(char*, const char*, size_t)' specified bound 8 equals destination size [-Werror=stringop-truncation]
| 199 | strncpy(_pnOrProcedureID.data(), pn.c_str(), _pnOrProcedureID.size());
PEL is written in a way that fields like this have very specific size
limits and code that processes PEL's understands these size limits.
Therefore disable the check for null in this extension library.
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
Change-Id: I7c08aa7ec7394b5cfee1c55631d67ae729c3a7c9
diff --git a/extensions/openpower-pels/openpower-pels.mk b/extensions/openpower-pels/openpower-pels.mk
index d18947e..cd1ab10 100644
--- a/extensions/openpower-pels/openpower-pels.mk
+++ b/extensions/openpower-pels/openpower-pels.mk
@@ -57,7 +57,8 @@
$(SYSTEMD_CFLAGS) \
$(SDBUSPLUS_CFLAGS) \
$(SDEVENTPLUS_CFLAGS) \
- $(PHOSPHOR_DBUS_INTERFACES_CFLAGS)
+ $(PHOSPHOR_DBUS_INTERFACES_CFLAGS) \
+ -Wno-stringop-truncation
libpel_la_CXXFLAGS = $(libpel_cxx_flags)