From 7f5b5a2eaf9694536d49249b951f3c204674dd35 Mon Sep 17 00:00:00 2001 From: nirenjan Date: Thu, 5 Aug 2021 07:54:53 -0700 Subject: [PATCH] Disable -Wpacked compiler flag See issue #31. In systems with a newer version of libusb (1.0.24 onwards), GCC raises a warning that the packed attribute is unnecessary for `libusb_control_setup`. This is not really a problem for libx52, since it doesn't call libusb_control_setup directly, but since the libx52 build framework treats all warnings as errors by default, it will prevent the build from working. This change removes the -Wpacked flag from AX_COMPILER_FLAGS, and this should let the build pass without any issues. --- m4/ax_compiler_flags_cflags.m4 | 2 +- m4/ax_compiler_flags_cxxflags.m4 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/m4/ax_compiler_flags_cflags.m4 b/m4/ax_compiler_flags_cflags.m4 index 916f918..f7250d7 100644 --- a/m4/ax_compiler_flags_cflags.m4 +++ b/m4/ax_compiler_flags_cflags.m4 @@ -104,7 +104,7 @@ AC_DEFUN([AX_COMPILER_FLAGS_CFLAGS],[ -Wstrict-aliasing dnl -Wshadow dnl -Winline dnl - -Wpacked dnl + dnl -Wpacked dnl -Wmissing-format-attribute dnl -Wmissing-noreturn dnl -Winit-self dnl diff --git a/m4/ax_compiler_flags_cxxflags.m4 b/m4/ax_compiler_flags_cxxflags.m4 index 3067d9b..42abc7c 100644 --- a/m4/ax_compiler_flags_cxxflags.m4 +++ b/m4/ax_compiler_flags_cxxflags.m4 @@ -84,7 +84,7 @@ AC_DEFUN([AX_COMPILER_FLAGS_CXXFLAGS],[ -Wstrict-aliasing dnl -Wshadow dnl -Winline dnl - -Wpacked dnl + dnl -Wpacked dnl -Wmissing-format-attribute dnl -Wmissing-noreturn dnl -Winit-self dnl