Fix const qualifier warnings
authorRobert Pengelly <robertapengelly@hotmail.com>
Thu, 1 Oct 2026 00:02:48 +0000 (01:02 +0100)
committerRobert Pengelly <robertapengelly@hotmail.com>
Thu, 1 Oct 2026 00:02:48 +0000 (01:02 +0100)
amd64.c
cc.c
i386.c
pp.c
token.c

diff --git a/amd64.c b/amd64.c
index 74eb9a6681831b559315e87a174dd2f2e2235c49..ffa7b7af52a0128b79fc6a42edf3599b84477ce0 100644 (file)
--- 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 48dbbced1a299ad56018e06ea5548c1cea8edb10..8101df9d1fc7bdf89b43cf47363411ee2722e5fb 100755 (executable)
--- 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 49d11c45546fd751a23d966c7e4145234052c6e9..47a0a098db716130cde54eadd41132b28e0d2c38 100644 (file)
--- 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 03389b22a2919904c2b124a325defee5e0fa461d..a356df44173277977311377f49949f4277a5b337 100755 (executable)
--- 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 e4b90ef4dbb47bfb28f3b03d09d56748308af974..e2c9521bb62ce405baa262bdc3890929282b0b38 100755 (executable)
--- 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 != '<') {