patchlwIP - A Lightweight TCP/IP stack - Patches: patch #9186, mdns: Convert to use...

 
 

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

patch #9186: mdns: Convert to use IPADDR4_INIT_BYTES for better readability

Submitter:  Axel Lin <axellin>
Submitted:  Fri 09 Dec 2016 10:12:04 AM UTC
   
 
Category:  None Priority:  5 - Normal
Status:  Wont Do Privacy:  Public
Assigned to:  goldsimon Open/Closed:  Closed
Planned Release:  None

Fri 09 Dec 2016 12:24:03 PM UTC, comment #4: 

I notice another build error when build unixsim:

$ make
cc -g -Wall -DLWIP_DEBUG -pedantic -Werror -Wparentheses -Wsequence-point -Wswitch-default -Wextra -Wundef -Wshadow -Wpointer-arith -Wcast-qual -Wc++-compat -Wwrite-strings -Wold-style-definition -Wcast-align -Wmissing-prototypes -Wredundant-decls -Wnested-externs -Wno-address -Wunreachable-code -Wuninitialized -Wlogical-op -I. -I../../.. -I../../../../lwip/src/include -I../../../ports/unix/port/include -c ../../../../lwip/src/core/dns.c
In file included from ../../../../lwip/src/core/dns.c:89:0:
../../../../lwip/src/include/lwip/def.h:107:21: error: initializer element is not a constant expression [-Werror=pedantic]
 #define PP_HTONL(x) ((((x) & 0xff) << 24) | \
                     ^
../../../../lwip/src/include/lwip/ip_addr.h:87:86: note: in expansion of macro ‘PP_HTONL’
 #define IPADDR6_INIT_HOST(a, b, c, d) { { { { PP_HTONL(a), PP_HTONL(b), PP_HTONL(c), PP_HTONL(d) } } }, IPADDR_TYPE_V6 }
                                                                                      ^~~~~~~~
../../../../lwip/src/include/lwip/prot/dns.h:133:37: note: in expansion of macro ‘IPADDR6_INIT_HOST’
 #define DNS_MQUERY_IPV6_GROUP_INIT  IPADDR6_INIT_HOST(0xFF020000,0,0,0xFB)
                                     ^~~~~~~~~~~~~~~~~
../../../../lwip/src/core/dns.c:309:38: note: in expansion of macro ‘DNS_MQUERY_IPV6_GROUP_INIT’
 const ip_addr_t dns_mquery_v6group = DNS_MQUERY_IPV6_GROUP_INIT;
                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../lwip/src/include/lwip/def.h:107:21: note: (near initialization for ‘dns_mquery_v6group.u_addr.ip6.addr[3]’)
 #define PP_HTONL(x) ((((x) & 0xff) << 24) | \
                     ^
../../../../lwip/src/include/lwip/ip_addr.h:87:86: note: in expansion of macro ‘PP_HTONL’
 #define IPADDR6_INIT_HOST(a, b, c, d) { { { { PP_HTONL(a), PP_HTONL(b), PP_HTONL(c), PP_HTONL(d) } } }, IPADDR_TYPE_V6 }
                                                                                      ^~~~~~~~
../../../../lwip/src/include/lwip/prot/dns.h:133:37: note: in expansion of macro ‘IPADDR6_INIT_HOST’
 #define DNS_MQUERY_IPV6_GROUP_INIT  IPADDR6_INIT_HOST(0xFF020000,0,0,0xFB)
                                     ^~~~~~~~~~~~~~~~~
../../../../lwip/src/core/dns.c:309:38: note: in expansion of macro ‘DNS_MQUERY_IPV6_GROUP_INIT’
 const ip_addr_t dns_mquery_v6group = DNS_MQUERY_IPV6_GROUP_INIT;
                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../lwip/src/include/lwip/def.h:107:21: error: large integer implicitly truncated to unsigned type [-Werror=overflow]
 #define PP_HTONL(x) ((((x) & 0xff) << 24) | \
                     ^
../../../../lwip/src/include/lwip/ip_addr.h:87:86: note: in expansion of macro ‘PP_HTONL’
 #define IPADDR6_INIT_HOST(a, b, c, d) { { { { PP_HTONL(a), PP_HTONL(b), PP_HTONL(c), PP_HTONL(d) } } }, IPADDR_TYPE_V6 }
                                                                                      ^~~~~~~~
../../../../lwip/src/include/lwip/prot/dns.h:133:37: note: in expansion of macro ‘IPADDR6_INIT_HOST’
 #define DNS_MQUERY_IPV6_GROUP_INIT  IPADDR6_INIT_HOST(0xFF020000,0,0,0xFB)
                                     ^~~~~~~~~~~~~~~~~
../../../../lwip/src/core/dns.c:309:38: note: in expansion of macro ‘DNS_MQUERY_IPV6_GROUP_INIT’
 const ip_addr_t dns_mquery_v6group = DNS_MQUERY_IPV6_GROUP_INIT;
                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
../Common.mk:93: recipe for target 'dns.o' failed
make: * [dns.o] Error 1

Axel Lin <axellin>
Group Member
Fri 09 Dec 2016 12:10:58 PM UTC, comment #3: 

Right. Reverted and using DNS_MQUERY_IPV4/6_GROUP_INIT from prot/dns.h instead

Simon Goldschmidt <goldsimon>
Group administrator
Fri 09 Dec 2016 12:02:29 PM UTC, comment #2: 

Hi Simon,
Now I got build error if !LWIP_DNS && LWIP_MDNS_RESPONDER

Axel Lin <axellin>
Group Member
Fri 09 Dec 2016 11:50:14 AM UTC, comment #1: 

Solved differently in the meantime...

Simon Goldschmidt <goldsimon>
Group administrator
Fri 09 Dec 2016 10:12:04 AM UTC, original submission:  

Use IPADDR4_INIT_BYTES for better readability.

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 goldsimon (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 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-12-09 goldsimon StatusNone Wont Do
        Assigned toNone goldsimon
        Open/ClosedOpen Closed
    2016-12-09 axellin Attached File- Added 0001-mdns-Convert-to-use-IPADDR4_INIT_BYTES-for-better-re.patch, #39180

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code