diff mbox series

s4: clean up pedantic static analysis warnings

Message ID 20211130082037.27521-1-ivan.hu@canonical.com
State Accepted
Headers show
Series s4: clean up pedantic static analysis warnings | expand

Commit Message

ivanhu Nov. 30, 2021, 8:20 a.m. UTC
Static analysis is warning Unchecked return value (CHECKED_RETURN) by
call fwts_set. Clean up this warning with adding (void).

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

Comments

Alex Hung Dec. 4, 2021, 2:03 a.m. UTC | #1
On 2021-11-30 1:20 a.m., Ivan Hu wrote:
> Static analysis is warning Unchecked return value (CHECKED_RETURN) by
> call fwts_set. Clean up this warning with adding (void).
> 
> Signed-off-by: Ivan Hu <ivan.hu@canonical.com>
> ---
>  src/acpi/s4/s4.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/src/acpi/s4/s4.c b/src/acpi/s4/s4.c
> index f92ecc2d..fbd968c8 100644
> --- a/src/acpi/s4/s4.c
> +++ b/src/acpi/s4/s4.c
> @@ -413,7 +413,7 @@ static int s4_test_multiple(fwts_framework *fw)
>  
>  					fwts_log_info(fw, "Setting tracing buffer size to 1K for subsequent tests.");
>  
> -					fwts_set("1", FWTS_TRACING_BUFFER_SIZE);
> +					(void)fwts_set("1", FWTS_TRACING_BUFFER_SIZE);
>  					failed_alloc_image = 0;
>  
>  					if (s4_hibernate(fw,
> @@ -463,7 +463,7 @@ static int s4_test_multiple(fwts_framework *fw)
>  
>  		/* Restore tracking buffer size */
>  		snprintf(tmp, sizeof(tmp), "%d", tracing_buffer_size);
> -		fwts_set(tmp, FWTS_TRACING_BUFFER_SIZE);
> +		(void)fwts_set(tmp, FWTS_TRACING_BUFFER_SIZE);
>  	}
>  
>  	if (klog_errors > 0)
> 


Acked-by: Alex Hung <alex.hung@canonical.com>
diff mbox series

Patch

diff --git a/src/acpi/s4/s4.c b/src/acpi/s4/s4.c
index f92ecc2d..fbd968c8 100644
--- a/src/acpi/s4/s4.c
+++ b/src/acpi/s4/s4.c
@@ -413,7 +413,7 @@  static int s4_test_multiple(fwts_framework *fw)
 
 					fwts_log_info(fw, "Setting tracing buffer size to 1K for subsequent tests.");
 
-					fwts_set("1", FWTS_TRACING_BUFFER_SIZE);
+					(void)fwts_set("1", FWTS_TRACING_BUFFER_SIZE);
 					failed_alloc_image = 0;
 
 					if (s4_hibernate(fw,
@@ -463,7 +463,7 @@  static int s4_test_multiple(fwts_framework *fw)
 
 		/* Restore tracking buffer size */
 		snprintf(tmp, sizeof(tmp), "%d", tracing_buffer_size);
-		fwts_set(tmp, FWTS_TRACING_BUFFER_SIZE);
+		(void)fwts_set(tmp, FWTS_TRACING_BUFFER_SIZE);
 	}
 
 	if (klog_errors > 0)