[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] dhcp.c and DHCP_OPTION_IDX_NTP_SERVER
From: |
Gisle Vanem |
Subject: |
[lwip-devel] dhcp.c and DHCP_OPTION_IDX_NTP_SERVER |
Date: |
Thu, 16 Aug 2018 14:45:37 +0200 |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 |
Building with clang-cl and '-DLWIP_DHCP_GET_NTP_SRV=1', gives
this pretty important warning:
src/core/ipv4/dhcp.c(149,3): warning: element DHCP_OPTION_IDX_NTP_SERVER has
been
implicitly assigned 10 which another element has been assigned
[-Wduplicate-enum]
DHCP_OPTION_IDX_NTP_SERVER,
^~~~~~~~~~~~~~~~~~~~~~~~~~
src/core/ipv4/dhcp.c(150,3): note: element DHCP_OPTION_IDX_NTP_SERVER_LAST
also has value 10
DHCP_OPTION_IDX_NTP_SERVER_LAST = DHCP_OPTION_IDX_NTP_SERVER +
LWIP_DHCP_MAX_NTP_SERVERS - 1,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
<opt.h> has a default of 1 NTP-server:
#define LWIP_DHCP_MAX_NTP_SERVERS 1
Compiling with 2 gives no warning.
Also, compiling 'core/ipv6/dhpcp6.c' with 'LWIP_DHCP6_MAX_DNS_SERVERS >= 1',
there's no warnings.
--
--gv
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [lwip-devel] dhcp.c and DHCP_OPTION_IDX_NTP_SERVER,
Gisle Vanem <=