ACK: [PATCH 2/3] Re-work include of acpi.h to work around warnings

Alex Hung alex.hung at canonical.com
Fri Jul 4 09:02:47 UTC 2014


On 06/28/2014 03:17 AM, Colin King wrote:
> From: Colin Ian King <colin.king at canonical.com>
>
> ACPICA unfortunately trips some warnings which need to be worked
> around for the latest release of ACPICA.  Move the include of
> acpi.h into fwts_acpi_object_eval.h in a handful of tests and then
> relax the need for -Wunused-parameter on some of the inlined code
> in acpi.h that don't do anything with their parameters.
>
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
>   src/acpi/crsdump/crsdump.c              | 4 ----
>   src/acpi/crsdump/prsdump.c              | 3 ---
>   src/acpi/gpedump/gpedump.c              | 4 +---
>   src/acpi/method/method.c                | 3 ---
>   src/acpi/pcc/pcc.c                      | 3 ---
>   src/acpi/plddump/plddump.c              | 3 ---
>   src/acpi/wmi/wmi.c                      | 3 ---
>   src/lib/include/fwts_acpi_object_eval.h | 3 +++
>   src/lib/src/fwts_acpi_object_eval.c     | 3 +++
>   9 files changed, 7 insertions(+), 22 deletions(-)
>
> diff --git a/src/acpi/crsdump/crsdump.c b/src/acpi/crsdump/crsdump.c
> index 982b97b..a34c014 100644
> --- a/src/acpi/crsdump/crsdump.c
> +++ b/src/acpi/crsdump/crsdump.c
> @@ -23,11 +23,7 @@
>   #include <string.h>
>   #include <unistd.h>
>   #include <inttypes.h>
> -
> -/* acpica headers */
> -#include "acpi.h"
>   #include "fwts_acpi_object_eval.h"
> -#include "crsdump.h"
>
>   typedef struct {
>   	const char *label;				/* Field label */
> diff --git a/src/acpi/crsdump/prsdump.c b/src/acpi/crsdump/prsdump.c
> index d1009af..3b78b45 100644
> --- a/src/acpi/crsdump/prsdump.c
> +++ b/src/acpi/crsdump/prsdump.c
> @@ -17,9 +17,6 @@
>    *
>    */
>   #include "fwts.h"
> -
> -/* acpica headers */
> -#include "acpi.h"
>   #include "fwts_acpi_object_eval.h"
>   #include "crsdump.h"
>
> diff --git a/src/acpi/gpedump/gpedump.c b/src/acpi/gpedump/gpedump.c
> index f0fb410..66c7602 100644
> --- a/src/acpi/gpedump/gpedump.c
> +++ b/src/acpi/gpedump/gpedump.c
> @@ -21,14 +21,12 @@
>   #include <stdbool.h>
>   #include <inttypes.h>
>   #include <unistd.h>
> -
> -/* acpica headers */
> +#include "fwts_acpi_object_eval.h"
>   #include "acpi.h"
>   #include "aclocal.h"
>   #include "acobject.h"
>   #include "acstruct.h"
>   #include "acglobal.h"
> -#include "fwts_acpi_object_eval.h"
>
>   /*
>    *  gpedump_init()
> diff --git a/src/acpi/method/method.c b/src/acpi/method/method.c
> index 9b789cf..ea87c14 100644
> --- a/src/acpi/method/method.c
> +++ b/src/acpi/method/method.c
> @@ -25,9 +25,6 @@
>   #include <unistd.h>
>   #include <ctype.h>
>   #include <inttypes.h>
> -
> -/* acpica headers */
> -#include "acpi.h"
>   #include "fwts_acpi_object_eval.h"
>
>   /*
> diff --git a/src/acpi/pcc/pcc.c b/src/acpi/pcc/pcc.c
> index f752705..a23145a 100644
> --- a/src/acpi/pcc/pcc.c
> +++ b/src/acpi/pcc/pcc.c
> @@ -25,9 +25,6 @@
>   #include <string.h>
>   #include <unistd.h>
>   #include <inttypes.h>
> -
> -/* acpica headers */
> -#include "acpi.h"
>   #include "fwts_acpi_object_eval.h"
>
>   /*
> diff --git a/src/acpi/plddump/plddump.c b/src/acpi/plddump/plddump.c
> index 34a0b77..1f87318 100644
> --- a/src/acpi/plddump/plddump.c
> +++ b/src/acpi/plddump/plddump.c
> @@ -22,9 +22,6 @@
>   #include <unistd.h>
>   #include <stdint.h>
>   #include <inttypes.h>
> -
> -/* acpica headers */
> -#include "acpi.h"
>   #include "fwts_acpi_object_eval.h"
>
>   /*
> diff --git a/src/acpi/wmi/wmi.c b/src/acpi/wmi/wmi.c
> index d7950ab..77edad2 100644
> --- a/src/acpi/wmi/wmi.c
> +++ b/src/acpi/wmi/wmi.c
> @@ -29,9 +29,6 @@
>   #include <ctype.h>
>   #include <stdint.h>
>   #include <inttypes.h>
> -
> -/* acpica headers */
> -#include "acpi.h"
>   #include "fwts_acpi_object_eval.h"
>
>   typedef enum {
> diff --git a/src/lib/include/fwts_acpi_object_eval.h b/src/lib/include/fwts_acpi_object_eval.h
> index 6a2d8e8..255bc0c 100644
> --- a/src/lib/include/fwts_acpi_object_eval.h
> +++ b/src/lib/include/fwts_acpi_object_eval.h
> @@ -23,7 +23,10 @@
>   #include "fwts.h"
>
>   /* acpica headers */
> +#pragma GCC diagnostic push
> +#pragma GCC diagnostic ignored "-Wunused-parameter"
>   #include "acpi.h"
> +#pragma GCC diagnostic pop
>
>   int fwts_acpi_init(fwts_framework *fw);
>   int fwts_acpi_deinit(fwts_framework *fw);
> diff --git a/src/lib/src/fwts_acpi_object_eval.c b/src/lib/src/fwts_acpi_object_eval.c
> index 177d2d2..5cc19a3 100644
> --- a/src/lib/src/fwts_acpi_object_eval.c
> +++ b/src/lib/src/fwts_acpi_object_eval.c
> @@ -24,7 +24,10 @@
>   #include <unistd.h>
>
>   /* acpica headers */
> +#pragma GCC diagnostic push
> +#pragma GCC diagnostic ignored "-Wunused-parameter"
>   #include "acpi.h"
> +#pragma GCC diagnostic pop
>   #include "fwts_acpi_object_eval.h"
>
>   typedef struct {
>
Acked-by: Alex Hung <alex.hung at canonical.com>



More information about the fwts-devel mailing list