buglwIP - A Lightweight TCP/IP stack - Bugs: bug #23948, Few compiler warnings on ARM...

 
 

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

bug #23948: Few compiler warnings on ARM platform

Submitted by:  Huang Po Sung <geminicat>
Submitted on:  Mon 28 Jul 2008 10:11:43 AM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: Compiler WarningStatus: Fixed
Privacy: PublicAssigned to: Simon Goldschmidt <goldsimon>
Open/Closed: ClosedPlanned Release: None
lwIP version: 1.3.0

Tue 26 Aug 2008 07:56:27 PM UTC, comment #1:

"warnings" 1 - 8 are rejected because in C (not C++!), converting to and from void* doesn't need a cast operator!

Thanks for warning 9 though!

Simon Goldschmidt <goldsimon>
Project AdministratorIn charge of this item.
Mon 28 Jul 2008 10:11:43 AM UTC, original submission:

There are few compiler warnings:

1:
tcp_out.c -> tcp_output_segment():

Original:

seg->p->payload = seg->tcphdr;

Suggested:

seg->p->payload = (void *)(seg->tcphdr);

2:
icmp.c -> icmp_input():

Original:

IPH_CHKSUM_SET(iphdr, inet_chksum(iphdr, IP_HLEN));

Suggested:

IPH_CHKSUM_SET(iphdr, inet_chksum((void *)iphdr, IP_HLEN));

3:
icmp.c -> icmp_dest_unreach():

Original:

idur->chksum = inet_chksum(idur, q->len);

Suggested:

idur->chksum = inet_chksum((void *)idur, q->len);

4:
icmp.c -> icmp_time_exceeded():

Original:

tehdr->chksum = inet_chksum(tehdr, q->len);

Suggested:

tehdr->chksum = inet_chksum((void *)tehdr, q->len);

5:
ip.c -> ip_input():

Original:

if (inet_chksum(iphdr, iphdr_hlen) != 0) {

Suggested:

if (inet_chksum((void *)iphdr, iphdr_hlen) != 0) {

6:
ip.c -> ip_input():

Original:

p->payload = iphdr;

Suggested:

p->payload = (void *)iphdr;

7:
ip.c -> ip_output_if():

Original:

IPH_CHKSUM_SET(iphdr, inet_chksum(iphdr, IP_HLEN));

Suggested:

IPH_CHKSUM_SET(iphdr, inet_chksum((void *)iphdr, IP_HLEN));

8:
ip_frag.c -> ip_reass():

Original:

IPH_CHKSUM_SET(fraghdr, inet_chksum(fraghdr, IP_HLEN));

Suggested:

IPH_CHKSUM_SET(fraghdr, inet_chksum((void *)fraghdr, IP_HLEN));

9:
ip_frag.c -> ip_frag():

Original:

IPH_CHKSUM_SET(iphdr, inet_chksum(iphdr, IP_HLEN));

Suggested:

IPH_CHKSUM_SET(iphdr, inet_chksum((void *)iphdr, IP_HLEN));

9:
msg_in.c -> snmp_pdu_dec_varbindlist():

Original:

if ((derr != ERR_OK) ||
(type != (SNMP_ASN1_UNIV | SNMP_ASN1_CONSTR | SNMP_ASN1_SEQ)) ||
(len <= 0) || (len > vb_len)) /* added/modified by william@Atrie */

Suggested:

if ((derr != ERR_OK) ||
(type != (SNMP_ASN1_UNIV | SNMP_ASN1_CONSTR | SNMP_ASN1_SEQ)) ||
(len == 0) || (len > vb_len)) /* added/modified by william@Atrie */

Huang Po Sung <geminicat>

 

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 goldsimon (Posted a comment)
  • -unavailable- added by geminicat (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 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 26 Aug 2008 07:56:27 PM UTCgoldsimonCategoryTCP=>None
      StatusNone=>Fixed
      PrivacyPrivate=>Public
      Assigned toNone=>goldsimon
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1