buglwIP - A Lightweight TCP/IP stack - Bugs: bug #24921, Three potential syntax errors in...

 
 

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

bug #24921: Three potential syntax errors in DHCP.c

Submitted by:  Rejean Groleau <rejeangroleau>
Submitted on:  Mon 24 Nov 2008 08:08:49 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: Compiler WarningStatus: Works For Me
Privacy: PublicAssigned to: None
Open/Closed: ClosedPlanned Release: None
lwIP version: CVS Head

Tue 25 Nov 2008 03:26:21 PM UTC, comment #2:

As described by Rejean, nothing needs doing here, so closing.

Jonathan Larmour <jifl>
Project Member
Tue 25 Nov 2008 12:09:09 AM UTC, comment #1:

>Bill Auerbach wrote:
>I think that the more reasonable warning from Lint should be
>"Unnecessary address operator on array type".


So the warning is just about a nonessential operator, and this is not a bug at all.

I think the warning was thrown because decades ago "taking the address of an array name" was not consistently implemented. It is obviously no longer the case, and I must apologize for filing a bug about this. I will be more thorough next time, rest assured.

Thanks for your time,

- Rejean Groleau

Rejean Groleau <rejeangroleau>
Mon 24 Nov 2008 08:08:49 PM UTC, original submission:

I was "linting" the LwIP source code the other day, and I found three trivial warnings that might cause problems. It is likely that the related lines of codes are in fact error-free, and that I misunderstood what they were actually doing.

1. In the file DHCP.c:
a. Line 1472:
- Before: options = (u8_t *)&dhcp->msg_in->file
- After: options = (u8_t *)dhcp->msg_in->file
- Explanation: the line was doing "pointer = address of pointer",
instead of doing "pointer = pointer".
b. Lines 1476 and 1481:
- Before: options = (u8_t *)&dhcp->msg_in->sname
- After: options = (u8_t *)dhcp->msg_in->sname
- Explanation: (same as line 1472).

If this is indeed an error, I think it would only result in a misinterpretation of the DHCP overloaded options.

In the end, erroneous or invalid options would be used instead of the ones specified by the DHCP server.

- Rejean Groleau

Rejean Groleau <rejeangroleau>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by jifl (Posted a comment)
  • -unavailable- added by rejeangroleau (Submitted the item)
  •  

    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
    Tue 25 Nov 2008 03:26:21 PM UTCjiflStatusNone=>Works For Me
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1