summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2022-12-06 17:20:49 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2023-01-01 14:34:57 -0800
commit0da7cf06cea7837f78ee53c310453a32356227b8 (patch)
tree719b5d1095b6359e79d10ec2c41d8e9530854e1a /main.c
parent2bb1bd63e2e766ce281a61cadbffad7a12d5fd18 (diff)
downloadxorg-util-makedepend-0da7cf06cea7837f78ee53c310453a32356227b8.tar.gz
Store predefined -D values in const char fields
Clears up 28 -Wdiscarded-qualifiers warnings from gcc Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'main.c')
-rw-r--r--main.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/main.c b/main.c
index c125e99..571fe06 100644
--- a/main.c
+++ b/main.c
@@ -144,7 +144,6 @@ main(int argc, char *argv[])
struct inclist *ip;
char *makefile = NULL;
struct filepointer *filecontent;
- const struct symtab *psymp = predefs;
const char *endmarker = NULL;
char *defincdir = NULL;
char **undeflist = NULL;
@@ -152,9 +151,9 @@ main(int argc, char *argv[])
ProgramName = argv[0];
- while (psymp->s_name) {
+ for (const struct predef_symtab *psymp = predefs ;
+ psymp->s_name != NULL ; psymp++) {
define2(psymp->s_name, psymp->s_value, &maininclist);
- psymp++;
}
#ifdef __sun
/* Solaris predefined values that are computed, not hardcoded */