[11/12] sbbr/fadt: use inttype.h print format size specifiers
diff mbox series

Message ID 20180906142001.28381-12-colin.king@canonical.com
State Accepted
Headers show
Series
  • Fix up print format specifiers
Related show

Commit Message

Colin Ian King Sept. 6, 2018, 2:20 p.m. UTC
From: Colin Ian King <colin.king@canonical.com>

Use the correct size specifiers for the specific types.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 src/sbbr/fadt/fadt.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Comments

Alex Hung Sept. 6, 2018, 9:40 p.m. UTC | #1
On 2018-09-06 07:20 AM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> Use the correct size specifiers for the specific types.
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>   src/sbbr/fadt/fadt.c | 5 +++--
>   1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/src/sbbr/fadt/fadt.c b/src/sbbr/fadt/fadt.c
> index f7e16d9a..923bc1d7 100644
> --- a/src/sbbr/fadt/fadt.c
> +++ b/src/sbbr/fadt/fadt.c
> @@ -71,12 +71,13 @@ static int fadt_sbbr_revision_test1(fwts_framework *fw)
>   	if (major >= 5 && fadt->header.length >= 268)
>   		minor = fadt->minor_version;   /* field added ACPI 5.1 */
>   
> -	fwts_log_info(fw, "FADT revision: %d.%d", major, minor);
> +	fwts_log_info(fw, "FADT revision: %" PRIu8 ".%" PRIu8, major, minor);
>   
>   	if (major >= SBBR_LATEST_MAJOR && minor >= SBBR_LATEST_MINOR)
>   		fwts_passed(fw, "FADT revision is up to date.");
>   	else {
> -		fwts_failed(fw, LOG_LEVEL_CRITICAL, "fadt_revision:", "FADT revision is outdated: %d.%d",
> +		fwts_failed(fw, LOG_LEVEL_CRITICAL, "fadt_revision:",
> +			    "FADT revision is outdated: %" PRIu8 ".%" PRIu8,
>   			     major, minor);
>   	}
>   
> 



Acked-by: Alex Hung <alex.hung@canonical.com>
Ivan Hu Sept. 10, 2018, 4:29 a.m. UTC | #2
On 09/06/2018 10:20 PM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Use the correct size specifiers for the specific types.
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  src/sbbr/fadt/fadt.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/src/sbbr/fadt/fadt.c b/src/sbbr/fadt/fadt.c
> index f7e16d9a..923bc1d7 100644
> --- a/src/sbbr/fadt/fadt.c
> +++ b/src/sbbr/fadt/fadt.c
> @@ -71,12 +71,13 @@ static int fadt_sbbr_revision_test1(fwts_framework *fw)
>  	if (major >= 5 && fadt->header.length >= 268)
>  		minor = fadt->minor_version;   /* field added ACPI 5.1 */
>  
> -	fwts_log_info(fw, "FADT revision: %d.%d", major, minor);
> +	fwts_log_info(fw, "FADT revision: %" PRIu8 ".%" PRIu8, major, minor);
>  
>  	if (major >= SBBR_LATEST_MAJOR && minor >= SBBR_LATEST_MINOR)
>  		fwts_passed(fw, "FADT revision is up to date.");
>  	else {
> -		fwts_failed(fw, LOG_LEVEL_CRITICAL, "fadt_revision:", "FADT revision is outdated: %d.%d",
> +		fwts_failed(fw, LOG_LEVEL_CRITICAL, "fadt_revision:",
> +			    "FADT revision is outdated: %" PRIu8 ".%" PRIu8,
>  			     major, minor);
>  	}
>  
Acked-by: Ivan Hu <ivan.hu@canonical.com>

Patch
diff mbox series

diff --git a/src/sbbr/fadt/fadt.c b/src/sbbr/fadt/fadt.c
index f7e16d9a..923bc1d7 100644
--- a/src/sbbr/fadt/fadt.c
+++ b/src/sbbr/fadt/fadt.c
@@ -71,12 +71,13 @@  static int fadt_sbbr_revision_test1(fwts_framework *fw)
 	if (major >= 5 && fadt->header.length >= 268)
 		minor = fadt->minor_version;   /* field added ACPI 5.1 */
 
-	fwts_log_info(fw, "FADT revision: %d.%d", major, minor);
+	fwts_log_info(fw, "FADT revision: %" PRIu8 ".%" PRIu8, major, minor);
 
 	if (major >= SBBR_LATEST_MAJOR && minor >= SBBR_LATEST_MINOR)
 		fwts_passed(fw, "FADT revision is up to date.");
 	else {
-		fwts_failed(fw, LOG_LEVEL_CRITICAL, "fadt_revision:", "FADT revision is outdated: %d.%d",
+		fwts_failed(fw, LOG_LEVEL_CRITICAL, "fadt_revision:",
+			    "FADT revision is outdated: %" PRIu8 ".%" PRIu8,
 			     major, minor);
 	}