From d804e95f392b5906e04c83623b7ad845855fa24c Mon Sep 17 00:00:00 2001 From: Kor Nielsen Date: Thu, 15 Jan 2026 21:45:17 -0800 Subject: [PATCH] Fix compiler warnings from GCC 15. --- examples/htool_key_rotation.c | 9 ++++++--- examples/htool_key_rotation.h | 6 +++--- examples/htool_payload.c | 3 ++- examples/htool_payload.h | 2 +- examples/htool_payload_update.c | 3 ++- examples/htool_payload_update.h | 2 +- examples/htool_statistics.c | 3 ++- examples/htool_statistics.h | 3 ++- 8 files changed, 19 insertions(+), 12 deletions(-) diff --git a/examples/htool_key_rotation.c b/examples/htool_key_rotation.c index f5cf655..516eddd 100644 --- a/examples/htool_key_rotation.c +++ b/examples/htool_key_rotation.c @@ -43,7 +43,8 @@ static const char *get_validation_method_string(uint32_t validation_method) { } } -int htool_key_rotation_get_status(void) { +int htool_key_rotation_get_status(const struct htool_invocation* inv) { + (void)inv; struct libhoth_device *dev = htool_libhoth_device(); if (!dev) { return -1; @@ -65,7 +66,8 @@ int htool_key_rotation_get_status(void) { return 0; } -int htool_key_rotation_get_version(void) { +int htool_key_rotation_get_version(const struct htool_invocation* inv) { + (void)inv; struct libhoth_device *dev = htool_libhoth_device(); if (!dev) { return -1; @@ -161,7 +163,8 @@ int htool_key_rotation_update(const struct htool_invocation *inv) { return result; } -int htool_key_rotation_payload_status() { +int htool_key_rotation_payload_status(const struct htool_invocation* inv) { + (void)inv; struct libhoth_device *dev = htool_libhoth_device(); if (!dev) { return -1; diff --git a/examples/htool_key_rotation.h b/examples/htool_key_rotation.h index 9c15ebf..f5a9671 100644 --- a/examples/htool_key_rotation.h +++ b/examples/htool_key_rotation.h @@ -23,9 +23,9 @@ extern "C" { #endif struct htool_invocation; -int htool_key_rotation_get_status(); -int htool_key_rotation_get_version(); -int htool_key_rotation_payload_status(); +int htool_key_rotation_get_status(const struct htool_invocation* inv); +int htool_key_rotation_get_version(const struct htool_invocation* inv); +int htool_key_rotation_payload_status(const struct htool_invocation* inv); int htool_key_rotation_read(const struct htool_invocation* inv); int htool_key_rotation_read_chunk_type(const struct htool_invocation* inv); int htool_key_rotation_update(const struct htool_invocation* inv); diff --git a/examples/htool_payload.c b/examples/htool_payload.c index cada560..481ef70 100644 --- a/examples/htool_payload.c +++ b/examples/htool_payload.c @@ -29,7 +29,8 @@ #include "protocol/payload_info.h" #include "protocol/payload_status.h" -int htool_payload_status() { +int htool_payload_status(const struct htool_invocation* inv) { + (void)inv; struct libhoth_device* dev = htool_libhoth_device(); if (!dev) { return -1; diff --git a/examples/htool_payload.h b/examples/htool_payload.h index f218034..82c77ac 100644 --- a/examples/htool_payload.h +++ b/examples/htool_payload.h @@ -24,7 +24,7 @@ extern "C" { #endif -int htool_payload_status(); +int htool_payload_status(const struct htool_invocation* inv); int htool_payload_info(const struct htool_invocation* inv); #ifdef __cplusplus diff --git a/examples/htool_payload_update.c b/examples/htool_payload_update.c index c26e77b..258ccb6 100644 --- a/examples/htool_payload_update.c +++ b/examples/htool_payload_update.c @@ -172,7 +172,8 @@ const char* payload_update_getstatus_half_string(uint8_t h) { } } -int htool_payload_update_getstatus() { +int htool_payload_update_getstatus(const struct htool_invocation* inv) { + (void)inv; struct libhoth_device* dev = htool_libhoth_device(); if (!dev) { return -1; diff --git a/examples/htool_payload_update.h b/examples/htool_payload_update.h index a5d85bc..f9c6a16 100644 --- a/examples/htool_payload_update.h +++ b/examples/htool_payload_update.h @@ -25,7 +25,7 @@ extern "C" { struct htool_invocation; int htool_payload_update(const struct htool_invocation* inv); int htool_payload_read(const struct htool_invocation* inv); -int htool_payload_update_getstatus(); +int htool_payload_update_getstatus(const struct htool_invocation* inv); #ifdef __cplusplus } diff --git a/examples/htool_statistics.c b/examples/htool_statistics.c index 4c5b536..f79363d 100644 --- a/examples/htool_statistics.c +++ b/examples/htool_statistics.c @@ -178,7 +178,8 @@ const char* PayloadUpdateErrorToString(uint16_t reason) { } } -int htool_statistics() { +int htool_statistics(const struct htool_invocation* inv) { + (void)inv; struct libhoth_device* dev = htool_libhoth_device(); if (!dev) { return -1; diff --git a/examples/htool_statistics.h b/examples/htool_statistics.h index 2dd59b6..fe54eda 100644 --- a/examples/htool_statistics.h +++ b/examples/htool_statistics.h @@ -19,7 +19,8 @@ extern "C" { #endif -int htool_statistics(); +struct htool_invocation; +int htool_statistics(const struct htool_invocation* inv); #ifdef __cplusplus }