mirror of
https://sourceware.org/git/glibc.git
synced 2025-11-06 19:29:35 +03:00
GCC 15 turned -Wincompatible-pointer-types into a compiler error instead
of a warning by default. This patch prevents the following error:
$ gcc manual/examples/subopt.c
manual/examples/subopt.c: In function ‘main’:
manual/examples/subopt.c:64:40: error: passing argument 2 of ‘getsubopt’ from incompatible pointer type [-Wincompatible-pointer-types]
64 | switch (getsubopt (&subopts, mount_opts, &value))
| ^~~~~~~~~~
| |
| const char **
In file included from manual/examples/subopt.c:19:
/usr/include/stdlib.h:1100:47: note: expected ‘char * const* restrict’ but argument is of type ‘const char **’
1100 | char *const *__restrict __tokens,
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2.2 KiB
2.2 KiB