[PATCH] wmi.c: fix build error when using gcc 4.6.3

Colin Ian King colin.king at canonical.com
Thu Feb 21 08:11:54 UTC 2013


On 21/02/13 06:41, Ivan Hu wrote:
> With the precise of gcc 4.6.3 version we get the build error:
>
> acpi/wmi/wmi.c:256:2: error: expected ‘)’ before ‘PRIx8’
> acpi/wmi/wmi.c:256:2: error: conversion lacks type at end of format [-Werror=format]
> acpi/wmi/wmi.c:260:2: error: expected ‘)’ before ‘PRIx8’
> acpi/wmi/wmi.c:260:2: error: conversion lacks type at end of format [-Werror=format]
> acpi/wmi/wmi.c: In function ‘wmi_parse_wdg_data’:
> acpi/wmi/wmi.c:314:4: error: expected ‘)’ before ‘PRIx8’
> acpi/wmi/wmi.c:314:4: error: conversion lacks type at end of format [-Werror=format]
> acpi/wmi/wmi.c:316:4: error: expected ‘)’ before ‘PRIx8’
> acpi/wmi/wmi.c:316:4: error: conversion lacks type at end of format [-Werror=format]
> acpi/wmi/wmi.c:318:4: error: expected ‘)’ before ‘PRIx8’
> acpi/wmi/wmi.c:318:4: error: conversion lacks type at end of format [-Werror=format]
> acpi/wmi/wmi.c:320:4: error: expected ‘)’ before ‘PRIx8’
> acpi/wmi/wmi.c:320:4: error: conversion lacks type at end of format [-Werror=format]
>
> because some required headers were left out.
>
> Signed-off-by: Ivan Hu <ivan.hu at canonical.com>
> ---
>   src/acpi/wmi/wmi.c |    2 ++
>   1 file changed, 2 insertions(+)
>
> diff --git a/src/acpi/wmi/wmi.c b/src/acpi/wmi/wmi.c
> index 6401b41..2425be1 100644
> --- a/src/acpi/wmi/wmi.c
> +++ b/src/acpi/wmi/wmi.c
> @@ -27,6 +27,8 @@
>   #include <unistd.h>
>   #include <string.h>
>   #include <ctype.h>
> +#include <stdint.h>
> +#include <inttypes.h>
>
>   /* acpica headers */
>   #include "acpi.h"
>
Thanks for fixing my mistake.

Colin



More information about the fwts-devel mailing list