diff mbox

acpi/madt: fix build fail for i386

Message ID 1469600689-24714-1-git-send-email-ivan.hu@canonical.com
State Accepted
Headers show

Commit Message

Ivan Hu July 27, 2016, 6:24 a.m. UTC
In file included from ../src/lib/include/fwts_binpaths.h:27:0,
                 from ../src/lib/include/fwts.h:54,
                 from acpi/madt/madt.c:16:
acpi/madt/madt.c: In function ‘madt_find_processor_uid’:
acpi/madt/madt.c:304:20: error: format ‘%lu’ expects argument of type
‘long unsigned int’, but argument 8 has type ‘uint64_t {aka long long unsigned
int}’ [-Werror=format=]
    fwts_passed(fw, "MADT %s has matching processor "
                    ^
../src/lib/include/fwts_framework.h:231:84: note: in definition of macro
‘fwts_passed’
  fwts_framework_log(fw, LOG_PASSED, NULL, LOG_LEVEL_NONE, &fw->minor_tests.passed, fmt, ## args)
                                                                                    ^
acpi/madt/madt.c:312:20: error: format ‘%lu’ expects argument of type
‘long unsigned int’, but argument 8 has type ‘uint64_t {aka long long unsigned
int}’ [-Werror=format=]
       table_label, "%s has no matching processor UID %lu",
                    ^
../src/lib/include/fwts_framework.h:233:76: note: in definition of macro
‘fwts_failed’
  fwts_framework_log(fw, LOG_FAILED, label, level, &fw->minor_tests.failed, fmt, ## args)
                                                                            ^
cc1: all warnings being treated as errors

Signed-off-by: Ivan Hu <ivan.hu@canonical.com>
---
 src/acpi/madt/madt.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Alex Hung July 27, 2016, 6:30 a.m. UTC | #1
On 2016-07-27 02:24 PM, Ivan Hu wrote:
> In file included from ../src/lib/include/fwts_binpaths.h:27:0,
>                  from ../src/lib/include/fwts.h:54,
>                  from acpi/madt/madt.c:16:
> acpi/madt/madt.c: In function ‘madt_find_processor_uid’:
> acpi/madt/madt.c:304:20: error: format ‘%lu’ expects argument of type
> ‘long unsigned int’, but argument 8 has type ‘uint64_t {aka long long unsigned
> int}’ [-Werror=format=]
>     fwts_passed(fw, "MADT %s has matching processor "
>                     ^
> ../src/lib/include/fwts_framework.h:231:84: note: in definition of macro
> ‘fwts_passed’
>   fwts_framework_log(fw, LOG_PASSED, NULL, LOG_LEVEL_NONE, &fw->minor_tests.passed, fmt, ## args)
>                                                                                     ^
> acpi/madt/madt.c:312:20: error: format ‘%lu’ expects argument of type
> ‘long unsigned int’, but argument 8 has type ‘uint64_t {aka long long unsigned
> int}’ [-Werror=format=]
>        table_label, "%s has no matching processor UID %lu",
>                     ^
> ../src/lib/include/fwts_framework.h:233:76: note: in definition of macro
> ‘fwts_failed’
>   fwts_framework_log(fw, LOG_FAILED, label, level, &fw->minor_tests.failed, fmt, ## args)
>                                                                             ^
> cc1: all warnings being treated as errors
>
> Signed-off-by: Ivan Hu <ivan.hu@canonical.com>
> ---
>  src/acpi/madt/madt.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/acpi/madt/madt.c b/src/acpi/madt/madt.c
> index 3032e7b..257d7d9 100644
> --- a/src/acpi/madt/madt.c
> +++ b/src/acpi/madt/madt.c
> @@ -302,14 +302,14 @@ static ACPI_OBJECT_TYPE madt_find_processor_uid(fwts_framework *fw,
>  		listint = fwts_list_data(struct acpi_integer *, item);
>  		if (uid == listint->value) {
>  			fwts_passed(fw, "MADT %s has matching processor "
> -				    "UID %lu.", table_name, uid);
> +				    "UID %" PRIu64 ".", table_name, uid);
>  			return listint->type;
>  		}
>  	}
>
>  	sprintf(table_label, "MADT%sUidMismatch", table_name);
>  	fwts_failed(fw, LOG_LEVEL_MEDIUM,
> -		    table_label, "%s has no matching processor UID %lu",
> +		    table_label, "%s has no matching processor UID %" PRIu64,
>  		    table_name, uid);
>  	return ACPI_NUM_TYPES;
>  }
>


Acked-by: Alex Hung <alex.hung@canonical.com>
Colin Ian King July 27, 2016, 6:57 a.m. UTC | #2
On 27/07/16 07:24, Ivan Hu wrote:
> In file included from ../src/lib/include/fwts_binpaths.h:27:0,
>                  from ../src/lib/include/fwts.h:54,
>                  from acpi/madt/madt.c:16:
> acpi/madt/madt.c: In function ‘madt_find_processor_uid’:
> acpi/madt/madt.c:304:20: error: format ‘%lu’ expects argument of type
> ‘long unsigned int’, but argument 8 has type ‘uint64_t {aka long long unsigned
> int}’ [-Werror=format=]
>     fwts_passed(fw, "MADT %s has matching processor "
>                     ^
> ../src/lib/include/fwts_framework.h:231:84: note: in definition of macro
> ‘fwts_passed’
>   fwts_framework_log(fw, LOG_PASSED, NULL, LOG_LEVEL_NONE, &fw->minor_tests.passed, fmt, ## args)
>                                                                                     ^
> acpi/madt/madt.c:312:20: error: format ‘%lu’ expects argument of type
> ‘long unsigned int’, but argument 8 has type ‘uint64_t {aka long long unsigned
> int}’ [-Werror=format=]
>        table_label, "%s has no matching processor UID %lu",
>                     ^
> ../src/lib/include/fwts_framework.h:233:76: note: in definition of macro
> ‘fwts_failed’
>   fwts_framework_log(fw, LOG_FAILED, label, level, &fw->minor_tests.failed, fmt, ## args)
>                                                                             ^
> cc1: all warnings being treated as errors
> 
> Signed-off-by: Ivan Hu <ivan.hu@canonical.com>
> ---
>  src/acpi/madt/madt.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/src/acpi/madt/madt.c b/src/acpi/madt/madt.c
> index 3032e7b..257d7d9 100644
> --- a/src/acpi/madt/madt.c
> +++ b/src/acpi/madt/madt.c
> @@ -302,14 +302,14 @@ static ACPI_OBJECT_TYPE madt_find_processor_uid(fwts_framework *fw,
>  		listint = fwts_list_data(struct acpi_integer *, item);
>  		if (uid == listint->value) {
>  			fwts_passed(fw, "MADT %s has matching processor "
> -				    "UID %lu.", table_name, uid);
> +				    "UID %" PRIu64 ".", table_name, uid);
>  			return listint->type;
>  		}
>  	}
>  
>  	sprintf(table_label, "MADT%sUidMismatch", table_name);
>  	fwts_failed(fw, LOG_LEVEL_MEDIUM,
> -		    table_label, "%s has no matching processor UID %lu",
> +		    table_label, "%s has no matching processor UID %" PRIu64,
>  		    table_name, uid);
>  	return ACPI_NUM_TYPES;
>  }
> 
Acked-by: Colin Ian King <colin.king@canonical.com>
diff mbox

Patch

diff --git a/src/acpi/madt/madt.c b/src/acpi/madt/madt.c
index 3032e7b..257d7d9 100644
--- a/src/acpi/madt/madt.c
+++ b/src/acpi/madt/madt.c
@@ -302,14 +302,14 @@  static ACPI_OBJECT_TYPE madt_find_processor_uid(fwts_framework *fw,
 		listint = fwts_list_data(struct acpi_integer *, item);
 		if (uid == listint->value) {
 			fwts_passed(fw, "MADT %s has matching processor "
-				    "UID %lu.", table_name, uid);
+				    "UID %" PRIu64 ".", table_name, uid);
 			return listint->type;
 		}
 	}
 
 	sprintf(table_label, "MADT%sUidMismatch", table_name);
 	fwts_failed(fw, LOG_LEVEL_MEDIUM,
-		    table_label, "%s has no matching processor UID %lu",
+		    table_label, "%s has no matching processor UID %" PRIu64,
 		    table_name, uid);
 	return ACPI_NUM_TYPES;
 }