ptserver: Fix CreateEntry() mismatched array parameter warning 68/14768/3
authorMichael Meffie <mmeffie@sinenomine.net>
Tue, 24 Aug 2021 20:40:22 +0000 (16:40 -0400)
committerBenjamin Kaduk <kaduk@mit.edu>
Sat, 4 Sep 2021 22:31:37 +0000 (18:31 -0400)
commitfe64ddd3b49bf15222d32d443ff226dd4c2b899e
tree8947b7d0512cd8c0830213ff2b3e736ff32eac95
parent36796bbb83af2650a872234fdb5cf7124bf6cfa8
ptserver: Fix CreateEntry() mismatched array parameter warning

The CreateEntry() prototype does not match the function definition. The
aname 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.

    error: argument 2 of type ‘char[64]’ with mismatched bound
           [-Werror=array-parameter=]
           CreateEntry(struct ubik_trans *at, char aname[PR_MAXNAMELEN], ...

    note: previously declared as ‘char[]’
          extern afs_int32 CreateEntry(struct ubik_trans *at, char aname[], ...

Fix the prototype to declare the 'aname' parameter as a bounded array as
expected for this function.

Change-Id: I6d4dadcdd3f80c2b6f1b17670bbbc1e9e6076559
Reviewed-on: https://gerrit.openafs.org/14768
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
src/ptserver/ptprototypes.h