gcc 9.1.1 emits a slew of warnings for many of the command field
accesses. I.e. warnings of the form:
libndctl.c:2586:21: warning: taking address of packed member of ‘struct
nd_cmd_get_config_data_hdr’ may result in an unaligned pointer value
[-Waddress-of-packed-member]
2586 | cmd->iter.offset = &cmd->get_data->in_offset;
| ^~~~~~~~~~~~~~~~~~~~~~~~~
Suppress these as fixing the warning would defeat the abstraction of being able
to have common code that operates on commands with common fields at different
offsets in the payload.
Signed-off-by: Dan Williams <dan.j.williams(a)intel.com>
---
configure.ac | 1 +
1 file changed, 1 insertion(+)
diff --git a/configure.ac b/configure.ac
index 4737cfff77f2..79f82977fa44 100644
--- a/configure.ac
+++ b/configure.ac
@@ -214,6 +214,7 @@ my_CFLAGS="\
-Wmaybe-uninitialized \
-Wdeclaration-after-statement \
-Wunused-result \
+-Wno-address-of-packed-member \
-D_FORTIFY_SOURCE=2 \
-O2
"