mirror of
https://git.openafs.org/openafs.git
synced 2025-01-31 13:38:01 +00:00
bucoord: Fix doDispatch() array-parameter gcc warning
The doDispatch() prototype does not match the function definition. The targv parameter is declared as an unbounded array in the prototype, but is defined as a bounded array. As of GCC 12, a warning is issued for the mismatch. main.c:346:18: error: argument 2 of type ‘char *[100]’ with mismatched bound [-Werror=array-parameter=] bucoord_internal.h:123:40: note: previously declared as ‘char *[]’ Within doDispatch(), the targv argument is just passed to cmd_Dispatch() (this is the only use of targv). Since cmd_Displatch() expects an unbounded array, update the doDispatch() definition to match the prototype. Change-Id: I50a170b3490d0d4e5d971b9ccb483cccb6833686 Reviewed-on: https://gerrit.openafs.org/14771 Reviewed-by: Michael Meffie <mmeffie@sinenomine.net> Reviewed-by: Cheyenne Wills <cwills@sinenomine.net> Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
This commit is contained in:
parent
b0cafad62a
commit
92a6242de2
@ -343,7 +343,7 @@ struct Lock dispatchLock; /* lock on the Dispatch call */
|
||||
|
||||
afs_int32
|
||||
doDispatch(afs_int32 targc,
|
||||
char *targv[MAXV],
|
||||
char *targv[],
|
||||
afs_int32 dispatchCount) /* to prevent infinite recursion */
|
||||
{
|
||||
char *sargv[MAXV];
|
||||
|
Loading…
x
Reference in New Issue
Block a user