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:
@@ -34,7 +34,7 @@ staticfn void free_config_sections(void);
|
||||
staticfn char *is_config_section(char *);
|
||||
staticfn boolean handle_config_section(char *);
|
||||
boolean parse_config_line(char *);
|
||||
staticfn char *find_optparam(const char *);
|
||||
staticfn char *find_optparam(char *);
|
||||
#ifndef SFCTOOL
|
||||
staticfn boolean cnf_line_OPTIONS(char *);
|
||||
staticfn boolean cnf_line_AUTOPICKUP_EXCEPTION(char *);
|
||||
@@ -583,7 +583,7 @@ handle_config_section(char *buf)
|
||||
|
||||
/* find the '=' or ':' */
|
||||
staticfn char *
|
||||
find_optparam(const char *buf)
|
||||
find_optparam(char *buf)
|
||||
{
|
||||
char *bufp, *altp;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user