buglwIP - A Lightweight TCP/IP stack - Bugs: bug #45020, Too few arguments to function...

 
 

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

bug #45020: Too few arguments to function calls in the Unix minimal project

Submitted by:  Edgar Bonet <ebonet>
Submitted on:  Tue 05 May 2015 10:55:37 AM UTC  
 
Category: ContribSeverity: 3 - Normal
Item Group: Compiler WarningStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: ClosedPlanned Release: None
lwIP version: git head

Tue 05 May 2015 11:07:12 AM UTC, comment #1:

Perfect, applied, thank you Edgar.

Sylvain Rochet <gradator>
Project Member
Tue 05 May 2015 10:55:37 AM UTC, original submission:

Compiling the minimal project from the Unix port fails with the
following error message:

main.c: In function ‘main’:
main.c:204:3: error: too few arguments to function ‘snmp_set_syscontact’
snmp_set_syscontact(syscontact_str,&syscontact_len);
^
In file included from ../../../../../lwip/src/include/lwip/snmp_msg.h:39:0,
from main.c:50:
../../../../../lwip/src/include/lwip/snmp.h:116:6: note: declared here
void snmp_set_syscontact(u8_t ocstr, u8_t ocstrlen, u8_t bufsize);
^

The same error (substantially) appears on the next line, where
snmp_set_syslocation() is called with two arguments, while it is
declared as

void snmp_set_syslocation(u8_t ocstr, u8_t ocstrlen, u8_t bufsize);

According to the definitions of both functions (in
lwip/src/core/snmp/mib2.c), the missing third argument should be the
length of the buffer given in the first argument. The attached patch
adds this missing argument.

PS: I categorized this as "Compiler Warning" because there is no
"Compiler Error" category.

Edgar Bonet <ebonet>

 

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by gradator (Posted a comment)
  • -unavailable- added by ebonet (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 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 05 May 2015 11:07:12 AM UTCgradatorStatusNone=>Fixed
      Open/ClosedOpen=>Closed
    Tue 05 May 2015 10:55:37 AM UTCebonetAttached File-=>Added 0002-Call-snmp_set_syscontact-and-snmp_set_syslocation-wi.patch, #33918

    Back to the top


    Powered by Savane 3.1-cleanup1