bucoord: Fix doDispatch() array-parameter gcc warning 71/14771/8
authorMichael Meffie <mmeffie@sinenomine.net>
Mon, 23 Aug 2021 19:37:13 +0000 (15:37 -0400)
committerBenjamin Kaduk <kaduk@mit.edu>
Sun, 13 Mar 2022 03:30:40 +0000 (22:30 -0500)
commit92a6242de2d8ea280debc283a7c089f97c1670bc
tree2b7498e867472962c3a46050092041e9080f6fe7
parentb0cafad62ab0707c9b36cbeeb57204beb4ecfa9a
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>
src/bucoord/main.c