|Summary:||ASTERISK-02500: [patch] remove warning from localtime.c|
|Date Opened:||2004-09-29 05:58:21||Date Closed:||2011-06-07 14:12:00|
|Environment:||Attachments:||( 0) localtime.c.diff|
( 1) localtime.c.diff.txt
warning: assignment discards qualifiers from pointer target type.
****** ADDITIONAL INFORMATION ******
get the same warning for
usage elsewhere but not sure how to get around that.
|Comments:||By: Brian West (bkw918) 2004-09-29 09:11:43|
Please add .txt on all diff's so we can view them online.
By: Tilghman Lesher (tilghman) 2004-09-30 22:15:57
Exactly which line are you getting this error on? I'm not getting this warning at all. Even if I were getting this error, disposing of the const qualifier generally isn't the right action (instead, you should fix the actual problem, not the symptom).
By: jacs (jacs) 2004-10-01 03:00:35
Lets start by saying I am using gcc 3.4.2. Its also a warning not an error, I've been going through and trying to get rid of as many warnings as possible. the cont string gmt is used only once in localtime.c
struct tm * const tmp;
tmp->TM_ZONE = gmt;
You will also notice, if you look at the code, that there is a similar definition and usage for wildabbr.
static char wildabbr = "WILDABBR";
tmp->TM_ZONE = wildabbr;
but wildabbr was not made constant so all I did was made the two definitions consistent.
By: Tilghman Lesher (tilghman) 2004-10-02 12:53:44
Appears to be a bug in the compiler.