clear up some warnings appearing with gcc 15.2.0
allmain.c: In function ‘debug_fields’:
allmain.c:1133:16: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
1133 | while ((op = strchr(opts, ',')) != 0) {
| ^
cfgfiles.c: In function ‘find_optparam’:
cfgfiles.c:590:10: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
590 | bufp = strchr(buf, '=');
| ^
cfgfiles.c:591:10: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
591 | altp = strchr(buf, ':');
| ^
end.c: In function ‘should_query_disclose_option’:
end.c:482:14: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
482 | if ((dop = strchr(disclosure_options, category)) != 0) {
| ^
invent.c: In function ‘loot_classify’:
invent.c:175:7: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
175 | p = strchr(classorder, oclass);
| ^
o_init.c: In function ‘dodiscovered’:
o_init.c:774:33: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
774 | if (!flags.discosort || !(p = strchr(disco_order_let, flags.discosort)))
| ^
o_init.c: In function ‘doclassdisco’:
o_init.c:907:33: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
907 | if (!flags.discosort || !(p = strchr(disco_order_let, flags.discosort)))
| ^
objnam.c: In function ‘the’:
objnam.c:2200:19: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
2200 | if (((tmp = strrchr(str, ' ')) != 0 || (tmp = strrchr(str, '-')) != 0)
| ^
objnam.c:2200:53: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
2200 | if (((tmp = strrchr(str, ' ')) != 0 || (tmp = strrchr(str, '-')) != 0)
| ^
options.c: In function ‘optfn_disclose’:
options.c:1529:17: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
1529 | dop = strchr(disclosure_options, c);
| ^
pager.c: In function ‘add_cmap_descr’:
pager.c:1212:28: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
1212 | || ((p = strchr(x_str, ' ')) != 0 && !strcmpi(p, " ice"))
| ^
This commit is contained in:
@@ -2193,7 +2193,8 @@ the(const char *str)
|
||||
insert_the = TRUE;
|
||||
} else {
|
||||
/* Probably a proper name, might not need an article */
|
||||
char *tmp, *named, *called;
|
||||
char *named, *called;
|
||||
const char *tmp;
|
||||
int l;
|
||||
|
||||
/* some objects have capitalized adjectives in their names */
|
||||
|
||||
Reference in New Issue
Block a user