patchlwIP - A Lightweight TCP/IP stack - Patches: patch #9504, Fix build warning for...

 
 

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

patch #9504: Fix build warning for lwip_isdigit/isxdigit/islower/isspace

Submitter:  Axel Lin <axellin>
Submitted:  Thu 30 Nov 2017 03:44:47 AM UTC
   
 
Category:  None Priority:  5 - Normal
Status:  Done Privacy:  Public
Assigned to:  None Open/Closed:  Closed
Planned Release:  None

Sun 03 Dec 2017 06:36:22 PM UTC, comment #1: 

Does not happen on my Linux system, but I can imagine this is a problem on other systems. Pushed.

Dirk Ziegelmeier <dziegel>
Group administrator
Thu 30 Nov 2017 03:44:47 AM UTC, original submission:  

lwip_isdigit/isxdigit/islower/isspace takes int as argument, so
explicitly cast to int to silence below build warnings.

src/core/ipv4/ip4_addr.c: In function 'ip4addr_aton':
src/core/ipv4/ip4_addr.c:160:5: warning: array subscript has type 'char' [-Wchar-subscripts]
     if (!lwip_isdigit(c)) {
     ^
src/core/ipv4/ip4_addr.c:175:7: warning: array subscript has type 'char' [-Wchar-subscripts]
       if (lwip_isdigit(c)) {
       ^
src/core/ipv4/ip4_addr.c:178:7: warning: array subscript has type 'char' [-Wchar-subscripts]
       } else if (base == 16 && lwip_isxdigit(c)) {
       ^
src/core/ipv4/ip4_addr.c:179:9: warning: array subscript has type 'char' [-Wchar-subscripts]
         val = (val << 4) | (u32_t)(c + 10 - (lwip_islower(c) ? 'a' : 'A'));
         ^
src/core/ipv4/ip4_addr.c:204:3: warning: array subscript has type 'char' [-Wchar-subscripts]
   if (c != '\0' && !lwip_isspace(c)) {
   ^

Axel Lin <axellin>
Group Member

 

(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 dziegel (Posted a comment)
  • -email is unavailable- added by axellin (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
    2017-12-03 dziegel StatusNone Done
        Open/ClosedOpen Closed
    2017-11-30 axellin Attached File- Added 0001-Fix-build-warning-for-lwip_isdigit-isxdigit-islower-.patch, #42527

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code