diff options
author | Mike Frysinger <vapier@gentoo.org> | 2016-01-05 20:23:30 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gcc.gnu.org> | 2016-01-05 20:23:30 +0000 |
commit | 66f49f07d85b002777c45e8f3d1c529ecb65c1cf (patch) | |
tree | e33cdcaa1dabbad9bd07bef692c837f46907a560 /libiberty/functions.texi | |
parent | acf93f1edc9c6148ff34499975acf2f4a7cc9e75 (diff) | |
download | gcc-66f49f07d85b002777c45e8f3d1c529ecb65c1cf.tar.gz |
libiberty: {count,dup,write}argv: constify argv input slightly
Would be more useful if we could use "const char * const *", but there's
a long standing bug where gcc warns about incompatible pointers when you
try to pass in "char **". We can at least constify the array itself as
gcc will not warn in that case.
From-SVN: r232089
Diffstat (limited to 'libiberty/functions.texi')
-rw-r--r-- | libiberty/functions.texi | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libiberty/functions.texi b/libiberty/functions.texi index b5f4e809d06..24dcc373ac0 100644 --- a/libiberty/functions.texi +++ b/libiberty/functions.texi @@ -176,7 +176,7 @@ Concatenate zero or more of strings and return the result in freshly @end deftypefn @c argv.c:470 -@deftypefn Extension int countargv (char **@var{argv}) +@deftypefn Extension int countargv (char * const *@var{argv}) Return the number of elements in @var{argv}. Returns zero if @var{argv} is NULL. @@ -213,7 +213,7 @@ make it easy to compose the values of multiple blocks. @end deftypefn @c argv.c:52 -@deftypefn Extension char** dupargv (char **@var{vector}) +@deftypefn Extension char** dupargv (char * const *@var{vector}) Duplicate an argument vector. Simply scans through @var{vector}, duplicating each argument until the terminating @code{NULL} is found. @@ -1915,7 +1915,7 @@ does the return value. The third argument is unused in @libib{}. @end deftypefn @c argv.c:286 -@deftypefn Extension int writeargv (const char **@var{argv}, FILE *@var{file}) +@deftypefn Extension int writeargv (char * const *@var{argv}, FILE *@var{file}) Write each member of ARGV, handling all necessary quoting, to the file named by FILE, separated by whitespace. Return 0 on success, non-zero |