buglwIP - A Lightweight TCP/IP stack - Bugs: bug #1695, Compiler Warnings

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #1695: Compiler Warnings

Submitted by:  None
Submitted on:  Mon 11 Nov 2002 08:38:04 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: ClosedPlanned Release: None
lwIP version: None

Wed 13 Nov 2002 09:51:12 PM UTC, comment #1:

The first two (uninitialized err) are easy - simply initialize err to ERR_OK.

The later is interesting. The definition of bcopy in /usr/include/string.h of my version of unix has "void " types rather than "char ", which is what lwip seems to be expecting. However, there are a number of other casts of bcopy arguments to "char *". We should work out which one we're going to use and stick to it.

Kieran Mansley <kieranm>
Project Administrator
Mon 11 Nov 2002 08:38:04 PM UTC, original submission:

Just downloaded the latest from CVS and did a compile. The following
warnings were reported:

../../src/api/api_msg.c: In function `do_close':
../../src/api/api_msg.c:497: warning: `err' might be used uninitialized in this function

../../src/core/tcp.c: In function `tcp_slowtmr':
../../src/core/tcp.c:455: warning: `err' might be used uninitialized in this function

../../src/core/tcp.c: In function `tcp_seg_copy':
../../src/core/tcp.c:705: warning: passing arg 1 of `bcopy' from incompatible pointer type
../../src/core/tcp.c:705: warning: passing arg 2 of `bcopy' from incompatible pointer type

I'm not sure how to fix the first two but for the last one, bcopy() is
declared in <string.h> as:
void bcopy(const char , char , size_t);

so in tcp.c the call to bcopy() should be changed from
bcopy(seg, cseg, sizeof(struct tcp_seg));
to
bcopy((const char )seg, (char )cseg, sizeof(struct tcp_seg));

Regards
-Bill Knight
R O SoftWare

Anonymous

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 2 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Sun 24 Nov 2002 10:27:59 PM UTClikewiseStatusNone=>(Error - Not Found)
  Open/ClosedOpen=>(Error - Not Found)

Back to the top


Powered by Savane 3.1-cleanup1