Mantis Bugtracker

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0000035 [AckFUSS] code minor sometimes 2010-02-10 23:35 2010-02-13 17:00
Reporter Kline View Status public  
Assigned To Kline
Priority normal Resolution fixed  
Status closed   Product Version 4.4.1
Summary 0000035: strstr, strchr returning const on some distros
Description Fedora Core 12 x64 reporting the following errors. Had to have the user const_cast<char *>() the results of strstr and strchr to work around this.

build.c: In function void build_setroom(CHAR_DATA, char
build.c:2171: error: invalid conversion from const char to char
build.c: In function void build_dig(CHAR_DATA, char:
build.c:3080: error: invalid conversion from const char to char
build.c: In function void build_addreset(CHAR_DATA, char):
build.c:3741: error: invalid conversion from const char to char
build.c: In function int get_dir(char):
build.c:5448: error: invalid conversion from const char to char

strfuns.c: In function char* strip_out(const char*, const char*):
strfuns.c:1029: error: invalid conversion from const char* to char*
strfuns.c:1029: error: invalid conversion from const char* to char*
strfuns.c: In function char* strip_color(const char*, const char*):
strfuns.c:1053: error: invalid conversion from const char* to char*
strfuns.c:1053: error: invalid conversion from const char* to char*
Additional Information Currently I test build against Debian (testing) x86, x86_64, and Ubuntu (stable). Unable to reproduce in those distros. Marked 'sometimes' due to only certain distros displaying this behavior.
Tags No tags attached.
Attached Files

- Relationships

-  Notes
(0000042)
Kline (administrator)
2010-02-13 13:25

I just upgraded my Debian box to g++-4.4 from g++-4.3 and am now experiencing this. Seems to be more of a g++ issue than distro.
(0000043)
Kline (administrator)
2010-02-13 16:59

Rev 545: Fixed this by checking the overloaded strstr() types and properly declaring temp variables.

- Issue History
Date Modified Username Field Change
2010-02-10 23:35 Kline New Issue
2010-02-13 13:25 Kline Note Added: 0000042
2010-02-13 13:25 Kline Assigned To => Kline
2010-02-13 13:25 Kline Status new => confirmed
2010-02-13 16:59 Kline Note Added: 0000043
2010-02-13 16:59 Kline Status confirmed => resolved
2010-02-13 16:59 Kline Fixed in Version => 4.4.2
2010-02-13 16:59 Kline Resolution open => fixed
2010-02-13 17:00 Kline Status resolved => closed


Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker