]> git.ipfire.org Git - thirdparty/glibc.git/commit
sunrpc: Adjust RPC function declarations to match Sun's (bug 26686]
authorMartin Sebor <msebor@redhat.com>
Thu, 8 Oct 2020 18:53:09 +0000 (12:53 -0600)
committerMartin Sebor <msebor@redhat.com>
Thu, 8 Oct 2020 18:53:09 +0000 (12:53 -0600)
commitc5db00dc30e0513dc17ad8aefe54c807f55ec967
treebfb371777b8604fba5703de0f74fa2ae58380fe7
parent3eff7504cab0c406dbd27a1b07a413dafc39634d
sunrpc: Adjust RPC function declarations to match Sun's (bug 26686]

Building Glibc with the latest GCC 11 shows a number of instances
of the new -Warray-parameter warning designed to encourage
consistency in the forms of array arguments in redeclarations of
the same function (and, ultimately, to enable the detection of out
of bounds accesses via such arguments).

To avoid the subset of these warnings for the RPC APIs, this patch
changes the declarations of these functions to match both their
definitions and the Oracle RPC documentation.

Besides avoiding the -Warray-parameter warnings the effect of this
change is for GCC to issue warnings when either the functions are
passed an array with fewer than MAXNETNAMELEN + 1 elements, or when
the functions themselves access elements outside the array bounds.
sunrpc/netname.c
sunrpc/rpc/auth.h