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

Submitter:  Edgar Bonet <ebonet>
Submitted:  Tue 05 May 2015 10:55:37 AM UTC
   
 
Category:  Contrib Severity:  3 - Normal
Item Group:  Compiler Warning Status:  Fixed
Privacy:  Public Assigned to:  None
Open/Closed:  Closed Planned 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>
Group 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>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by gradator (Posted a comment)
  • -email is unavailable- added by ebonet (Submitted the item)
  •  

    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 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-05-05 gradator StatusNone Fixed
        Open/ClosedOpen Closed
    2015-05-05 ebonet Attached File- Added 0002-Call-snmp_set_syscontact-and-snmp_set_syslocation-wi.patch, #33918

    Back to the top

    Powered by Savane 3.12.
    Corresponding source code