From 9264edf7ed279fd667df9fcec90eb8c678c32fa6 Mon Sep 17 00:00:00 2001 From: Robert Pengelly Date: Thu, 1 Oct 2026 01:02:48 +0100 Subject: [PATCH] Fix const qualifier warnings --- amd64.c | 4 ++-- cc.c | 3 ++- i386.c | 4 ++-- pp.c | 4 +++- token.c | 3 ++- 5 files changed, 11 insertions(+), 7 deletions(-) diff --git a/amd64.c b/amd64.c index 74eb9a6..ffa7b7a 100644 --- a/amd64.c +++ b/amd64.c @@ -42178,9 +42178,9 @@ void compile_translation_unit64 (void) { if (vec_dllexports.length || vec_dllaliases.length) { - char *p, *tmp; + const char *name, *p; - const char *name; + char *tmp; long i; FILE *fp; diff --git a/cc.c b/cc.c index 48dbbce..8101df9 100755 --- a/cc.c +++ b/cc.c @@ -37,7 +37,8 @@ static void cleanup (void) { int main (int argc, char **argv) { - char *p, *root; + const char *p; + char *root; if (argc && *argv) { diff --git a/i386.c b/i386.c index 49d11c4..47a0a09 100644 --- a/i386.c +++ b/i386.c @@ -39666,9 +39666,9 @@ void compile_translation_unit32 (void) { if (vec_dllexports.length || vec_dllaliases.length) { - char *p, *tmp; + const char *name, *p; - const char *name; + char *tmp; long i; FILE *fp; diff --git a/pp.c b/pp.c index 03389b2..a356df4 100755 --- a/pp.c +++ b/pp.c @@ -379,7 +379,9 @@ static int handler_include (char *start, char **pp) { struct hashtab_name *key; struct macro *m; - char *current_directory,*p; + const char *p; + + char *current_directory; int len; if (**pp != '"' && **pp != '<') { diff --git a/token.c b/token.c index e4b90ef..e2c9521 100755 --- a/token.c +++ b/token.c @@ -60,10 +60,11 @@ static int handler_include (char *start, char **pp) { char *inc_path, *tmp; FILE *fp; - char *current_directory,*p; + char *current_directory; int len; struct history *history; + const char *p; if (**pp != '"' && **pp != '<') { -- 2.34.1