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:
@@ -21,7 +21,7 @@ staticfn void do_positionbar(void);
|
||||
staticfn void regen_pw(int);
|
||||
staticfn void regen_hp(int);
|
||||
staticfn void interrupt_multi(const char *);
|
||||
staticfn void debug_fields(const char *);
|
||||
staticfn void debug_fields(char *);
|
||||
#ifndef NODUMPENUMS
|
||||
staticfn void dump_enums(void);
|
||||
#endif
|
||||
@@ -1041,8 +1041,11 @@ argcheck(int argc, char *argv[], enum earlyarg e_arg)
|
||||
switch(e_arg) {
|
||||
case ARG_DEBUG:
|
||||
if (extended_opt) {
|
||||
extended_opt++;
|
||||
debug_fields(extended_opt);
|
||||
char *cpy_extended_opt;
|
||||
|
||||
cpy_extended_opt = dupstr(extended_opt);
|
||||
debug_fields(cpy_extended_opt + 1);
|
||||
free((genericptr_t) cpy_extended_opt);
|
||||
}
|
||||
return 1;
|
||||
case ARG_VERSION: {
|
||||
@@ -1125,7 +1128,7 @@ argcheck(int argc, char *argv[], enum earlyarg e_arg)
|
||||
* fuzzer - enable fuzzer without debugger intervention.
|
||||
*/
|
||||
staticfn void
|
||||
debug_fields(const char *opts)
|
||||
debug_fields(char *opts)
|
||||
{
|
||||
char *op;
|
||||
boolean negated = FALSE;
|
||||
|
||||
Reference in New Issue
Block a user