lwIP - A Lightweight TCP/IP stack - Bugs: bug #26523, Compiler Warnings
You are not allowed to post comments on this tracker with your current authentication level.
bug #26523: Compiler Warnings
Submitter: | Rikke Ottesen <ro03> | ||
Submitted: | Mon 11 May 2009 08:39:15 AM UTC | ||
Category: | None | Severity: | 2 - Minor |
Item Group: | Compiler Warning | Status: | Fixed |
Privacy: | Public | Assigned to: | goldsimon |
Open/Closed: | Closed | Planned Release: | None |
lwIP version: | 1.3.0 |
Jump to the original submission
Sun 24 Jan 2010 02:52:15 PM UTC, comment #12: |
Simon Goldschmidt <goldsimon> |
Sat 23 Jan 2010 06:10:44 PM UTC, comment #11: I hope to have fixed all compiler warnings (aside from 'conditional expression is constant' caused by while(0)/while(1) in macros) in all the code except for snmp and ppp.
|
Simon Goldschmidt <goldsimon> |
Wed 13 May 2009 01:43:29 PM UTC, comment #10: The problem is, standard C forces upcasting in some cases (most notably the >> and << operators) and you're going to get a downsize warning that you didn't even create in your code. Few if any compilers turn this warning on by default for the reason we see: causing many downsize warnings that really have no effect. Anding and shifting bytes for endian swaps will cause warnings without casting the result of the and to a u8_t. If the warnings are a problem, I find it falls out pretty quickly in testing. |
Bill Auerbach <billauerbach> |
Wed 13 May 2009 09:06:30 AM UTC, comment #9: I totally agree with you on the downsizing, so you know the writer have though about this and it does not cause any problems!
|
Rikke Ottesen <ro03> |
Wed 13 May 2009 08:58:54 AM UTC, comment #8: I would favour explicit casts when downsizing from a u16 to a u8 for example, but the reverse should not need a cast. I prefer it this way as it shows the writer of the code has (maybe) thought about the implication of the change in size, and thinks it is OK. Without the explicit cast it could just be something they overlooked, so the compiler is right to warn. Similarly for changes between signed and unsigned variables.
|
Kieran Mansley <kieranm> |
Wed 13 May 2009 08:58:04 AM UTC, comment #7: Ok ;)
|
Rikke Ottesen <ro03> |
Wed 13 May 2009 08:48:58 AM UTC, comment #6:
|
Simon Goldschmidt <goldsimon> |
Wed 13 May 2009 08:46:57 AM UTC, comment #5: I use the ARM/Thumb C/C++ Compiler, RVCT3.0 [Build 617] under 32 bit.
|
Rikke Ottesen <ro03> |
Wed 13 May 2009 08:17:15 AM UTC, comment #4: From the error message, I guess you are compiling on MS-VS under 32-bit, then? That would be strange since I don't see the warnings with the VS-projects in contrib.
|
Simon Goldschmidt <goldsimon> |
Wed 13 May 2009 08:04:13 AM UTC, comment #3: I'm not compiling for 64 bit OS.
|
Rikke Ottesen <ro03> |
Wed 13 May 2009 06:03:55 AM UTC, comment #2: I had a quick look over some of the lines mentioned, and I think at least most of these are not solved by patch #6521.
|
Simon Goldschmidt <goldsimon> |
Mon 11 May 2009 02:54:18 PM UTC, comment #1: Is this compiling on a 64 bit OS? There's a task that should have improved things in that case:
|
Kieran Mansley <kieranm> |
Mon 11 May 2009 08:39:15 AM UTC, original submission:
I see these warnings when I compile.
|
Rikke Ottesen <ro03> |
No files currently attached
Depends on the following items: None found
Items that depend on this one: None found
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Follow 5 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2010-01-24 | goldsimon | Status | In Progress | Fixed | |
Open/Closed | Open | Closed | |||
2010-01-23 | goldsimon | Status | None | In Progress | |
Assigned to | None | goldsimon | |||
2009-05-13 | kieranm | Severity | 3 - Normal | 2 - Minor |
Powered by Savane 3.13-4448.
Corresponding source code
I'm now not getting any more warnings (aside from httpd.h) throughout the code (both with the win32 and unix port - aside from the missing casts mentioned in bug #28659) so please report back anything that I might have overlooked.