git: df109c131954 - stable/12 - Adjust check_struct_sizes() definition to avoid clang 15 warning
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 29 Jul 2022 18:48:51 UTC
The branch stable/12 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=df109c1319545af39b287ed909cebc21df0a0fbc commit df109c1319545af39b287ed909cebc21df0a0fbc Author: Dimitry Andric <dim@FreeBSD.org> AuthorDate: 2022-07-26 11:20:58 +0000 Commit: Dimitry Andric <dim@FreeBSD.org> CommitDate: 2022-07-29 18:45:14 +0000 Adjust check_struct_sizes() definition to avoid clang 15 warning With clang 15, the following -Werror warning is produced: sys/dev/smartpqi/smartpqi_helper.c:374:19: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] check_struct_sizes() ^ void This is because check_struct_sizes() is declared with a (void) argument list, but defined with an empty argument list. Make the definition match the declaration. MFC after: 3 days (cherry picked from commit fb1c21688c5702d0bc50d67359dee4af12d0c693) --- sys/dev/smartpqi/smartpqi_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/smartpqi/smartpqi_helper.c b/sys/dev/smartpqi/smartpqi_helper.c index 390b299fd5df..30e13aa4052a 100644 --- a/sys/dev/smartpqi/smartpqi_helper.c +++ b/sys/dev/smartpqi/smartpqi_helper.c @@ -327,7 +327,7 @@ pqisrc_display_device_info(pqisrc_softstate_t *softs, /* validate the structure sizes */ void -check_struct_sizes() +check_struct_sizes(void) { ASSERT(sizeof(SCSI3Addr_struct)== 2);