diff options
author | Z. Liu <zhixu.liu@gmail.com> | 2024-08-25 01:32:48 +0800 |
---|---|---|
committer | Gerrit Pape <pape@smarden.org> | 2024-09-25 23:34:19 +0000 |
commit | 977abd9a06683c29d6888aecbf941386587c7c0e (patch) | |
tree | 34b3850a2edd4755bca1d2270685d7b0f43610df /src/subgetopt.h | |
parent | 4b32d478dedfdcf292f0aaddc29d91768fe1585f (diff) | |
download | runit-977abd9a06683c29d6888aecbf941386587c7c0e.tar.gz runit-977abd9a06683c29d6888aecbf941386587c7c0e.tar.xz runit-977abd9a06683c29d6888aecbf941386587c7c0e.zip |
fix compilation warning(s): -Wincompatible-pointer-types-discards-qualifiers
found by using clang 18 with CFLAGS: -Wall since gcc 14, certain warnings (including this one, gcc report as -Wincompatible-pointer-types) are now errors, see https://gcc.gnu.org/gcc-14/porting_to.html link of debian's patches is: https://salsa.debian.org/debian/runit/-/tree/master/debian/patches 0014-fix-implicit-declarations-incompatible-types-argv-ty.patch pathexec_run.c: warning: passing 'const char *const *' to parameter of type 'char *const *' discards qualifiers in nested pointer types [-Wincompatible-pointer-types-discards-qualifiers] 19 | execve(file,argv,envp); | ^~~~ ^~~~ 36 | execve(tmp.s,argv,envp); | ^~~~ ^~~~ pathexec_env.c:67:21: warning: passing 'const char *const *' to parameter of type 'char *const *' discards qualifiers in nested pointer types [-Wincompatible-pointer-types-discards-qualifiers] 67 | pathexec_run(file,argv,e); | ^~~~ pathexec_env.c:67:26: warning: passing 'const char **' to parameter of type 'char *const *' discards qualifiers in nested pointer types [-Wincompatible-pointer-types-discards-qualifiers] 67 | pathexec_run(file,argv,e); | ^ runsvdir.c:74:25: warning: passing 'const char *[3]' to parameter of type 'char *const *' discards qualifiers in nested pointer types [-Wincompatible-pointer-types-discards-qualifiers] 74 | pathexec_run(*prog, prog, (const char* const*)environ); | ^~~~ runsvdir.c:74:31: warning: passing 'const char *const *' to parameter of type 'char *const *' discards qualifiers in nested pointer types [-Wincompatible-pointer-types-discards-qualifiers] 74 | pathexec_run(*prog, prog, (const char* const*)environ); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
Diffstat (limited to 'src/subgetopt.h')
-rw-r--r-- | src/subgetopt.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/subgetopt.h b/src/subgetopt.h index 41ad26a..5163148 100644 --- a/src/subgetopt.h +++ b/src/subgetopt.h @@ -15,7 +15,7 @@ #define SUBGETOPTDONE -1 -extern int subgetopt(int,const char *const *,const char *); +extern int subgetopt(int,char *const *,const char *); extern const char *subgetoptarg; extern int subgetoptind; extern int subgetoptpos; |