From gerrit@openafs.org Mon May 5 23:44:36 2025 From: gerrit@openafs.org (Gerrit Code Review) Date: Mon, 5 May 2025 18:44:36 -0400 Subject: OpenAFS Master Repository branch, master, updated. openafs-devel-1_9_2-220-geddd5a0 Message-ID: <202505052244.545MiaP3166511@openafs.MIT.EDU> The following commit has been merged in the master branch: commit eddd5a060e9ed5acf10ee23359d54e22d4681592 Author: Cheyenne Wills Date: Fri Apr 25 11:43:01 2025 -0600 ubik: Use typedef for ubik_call function parameter One of ubik_Call()/ubik_CallIter()/ubik_Call_SingleServer() parameters is a function pointer (aproc). A function signature for this parameter is not specified which leads to a strict-prototype warning which has been addressed by suppressing the check by adding the -Wno-strict-prototypes compiler flag for the files that need it. A new C standard (C23) is coming out and newer versions of C compilers (e.g. gcc 15) are using the new standard (or an extension of that standard) as their default. The C23 standard has removed the ability to declare functions with unspecified parameters; now any function that is declared as: int foo(); is treated as: int foo(void); Building with gcc-15 results in the following types of compile time errors (even when -Wno-strict-prototypes is used): ubikclient.c: In function ‘CallIter’: ubikclient.c:391:10: error: too many arguments to function ‘aproc’; expected 0, have 17 391 | (*aproc) (tc, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, | ~^~~~~~~ ~~ ubikclient.c: In function ‘ubik_Call’: ubikclient.c:577:18: error: too many arguments to function ‘aproc’; expected 0, have 17 577 | (*aproc) (tc, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, | ~^~~~~~~ ~~ To avoid this error, we must declare the parameters for the 'aproc' function pointer. Define a typedef, ubik_call_func, that can be used to define the data type for the function parameter and can also be used as a cast on the function parameter when calling ubik_Call() ubik_CallIter() or ubik_Call_SingleServer(). Update the function prototypes and definitions for ubik_Call() ubik_CallIter() and ubik_Call_SingleServer(), and add casts where needed. Define "UBIK_LEGACY_CALLITER" in ubik_db_if.c, so it can also use the ubik_call_func typedef for its ubik_Call_SingleServer variant. Remove the -Wno-strict-prototypes for the files that were updated. The CFLAGS_NOSTRICT_PROTOTYPES autoconf var is now unused, so remove it. Some minor whitespace/indentation cleanup. Note: This problem occurred on Fedora 42 which comes with gcc 15. Change-Id: Ib5e069ac3a0c16498161b70ee121666f02e5276e Reviewed-on: https://gerrit.openafs.org/16370 Reviewed-by: Michael Meffie Tested-by: BuildBot Reviewed-by: Cheyenne Wills Tested-by: Cheyenne Wills Reviewed-by: Andrew Deason doc/process/compiler-warnings.md | 5 ----- src/bucoord/Makefile.in | 1 - src/bucoord/ubik_db_if.c | 7 ++++--- src/cf/osconf.m4 | 3 --- src/kauth/Makefile.in | 3 --- src/kauth/admin_tools.c | 4 ++-- src/kauth/authclient.c | 8 ++++---- src/libadmin/kas/Makefile.in | 1 - src/libadmin/kas/afs_kasAdmin.c | 4 ++-- src/tbutc/Makefile.in | 1 - src/ubik/Makefile.in | 2 -- src/ubik/ubik.p.h | 13 ++++++++++--- src/ubik/ubikclient.c | 8 ++++---- 13 files changed, 26 insertions(+), 34 deletions(-) -- OpenAFS Master Repository