Hello,
I am trying to compile with gcc 13.2 (from 
arm-gnu-toolchain-13.2.Rel1-x86_64-arm-none-eabi)
I have some warnings when compile dhcp.c, and I cannot understand why:

In function 'dhcp_option_byte',
   inlined from 'dhcp_discover' at 
ThirdParties/lwip/src/core/ipv4/dhcp.c:1053:25:
ThirdParties/lwip/src/core/ipv4/dhcp.c:1453:30: warning: writing 1 byte into a 
region of size 0 [-Wstringop-overflow=]
1453 |   options[options_out_len++] = value;
     |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
In file included from ThirdParties/lwip/src/include/lwip/arch.h:48,
                from src/config/lwipopts.h:445,
                from ThirdParties/lwip/src/include/lwip/opt.h:51,
                from ThirdParties/lwip/src/core/ipv4/dhcp.c:66:
ThirdParties/lwip/src/include/lwip/prot/dhcp.h: In function 'dhcp_discover':
ThirdParties/lwip/src/include/lwip/prot/dhcp.h:90:26: note: at offset 68 into 
destination object 'options' of size 68
  90 |   PACK_STRUCT_FLD_8(u8_t options[DHCP_OPTIONS_LEN]);
     |                          ^~~~~~~
bsp/lwip/port/arch/cc.h:83:30: note: in definition of macro 'PACK_STRUCT_FIELD'
  83 | #define PACK_STRUCT_FIELD(x) x
     |                              ^
ThirdParties/lwip/src/include/lwip/prot/dhcp.h:90:3: note: in expansion of 
macro 'PACK_STRUCT_FLD_8'
  90 |   PACK_STRUCT_FLD_8(u8_t options[DHCP_OPTIONS_LEN]);
     |   ^~~~~~~~~~~~~~~~~
In function 'dhcp_option_byte',
   inlined from 'dhcp_reboot.isra' at 
ThirdParties/lwip/src/core/ipv4/dhcp.c:1291:25:
ThirdParties/lwip/src/core/ipv4/dhcp.c:1453:30: warning: writing 1 byte into a 
region of size 0 [-Wstringop-overflow=]
1453 |   options[options_out_len++] = value;
     |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
ThirdParties/lwip/src/include/lwip/prot/dhcp.h: In function 'dhcp_reboot.isra':
ThirdParties/lwip/src/include/lwip/prot/dhcp.h:90:26: note: at offset 68 into 
destination object 'options' of size 68
  90 |   PACK_STRUCT_FLD_8(u8_t options[DHCP_OPTIONS_LEN]);
     |                          ^~~~~~~
bsp/lwip/port/arch/cc.h:83:30: note: in definition of macro 'PACK_STRUCT_FIELD'
  83 | #define PACK_STRUCT_FIELD(x) x
     |                              ^
ThirdParties/lwip/src/include/lwip/prot/dhcp.h:90:3: note: in expansion of 
macro 'PACK_STRUCT_FLD_8'
  90 |   PACK_STRUCT_FLD_8(u8_t options[DHCP_OPTIONS_LEN]);
     |   ^~~~~~~~~~~~~~~~~
In function 'dhcp_option_byte',
   inlined from 'dhcp_select.isra' at 
ThirdParties/lwip/src/core/ipv4/dhcp.c:478:25:
ThirdParties/lwip/src/core/ipv4/dhcp.c:1453:30: warning: writing 1 byte into a 
region of size 0 [-Wstringop-overflow=]
1453 |   options[options_out_len++] = value;
     |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
ThirdParties/lwip/src/include/lwip/prot/dhcp.h: In function 'dhcp_select.isra':
ThirdParties/lwip/src/include/lwip/prot/dhcp.h:90:26: note: at offset 68 into 
destination object 'options' of size 68
  90 |   PACK_STRUCT_FLD_8(u8_t options[DHCP_OPTIONS_LEN]);
     |                          ^~~~~~~
bsp/lwip/port/arch/cc.h:83:30: note: in definition of macro 'PACK_STRUCT_FIELD'
  83 | #define PACK_STRUCT_FIELD(x) x
     |                              ^
ThirdParties/lwip/src/include/lwip/prot/dhcp.h:90:3: note: in expansion of 
macro 'PACK_STRUCT_FLD_8'
  90 |   PACK_STRUCT_FLD_8(u8_t options[DHCP_OPTIONS_LEN]);
     |   ^~~~~~~~~~~~~~~~~
In function 'dhcp_option_byte',
   inlined from 'dhcp_renew' at ThirdParties/lwip/src/core/ipv4/dhcp.c:1179:25:
ThirdParties/lwip/src/core/ipv4/dhcp.c:1453:30: warning: writing 1 byte into a 
region of size 0 [-Wstringop-overflow=]
1453 |   options[options_out_len++] = value;
     |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
ThirdParties/lwip/src/include/lwip/prot/dhcp.h: In function 'dhcp_renew':
ThirdParties/lwip/src/include/lwip/prot/dhcp.h:90:26: note: at offset 68 into 
destination object 'options' of size 68
  90 |   PACK_STRUCT_FLD_8(u8_t options[DHCP_OPTIONS_LEN]);
     |                          ^~~~~~~
bsp/lwip/port/arch/cc.h:83:30: note: in definition of macro 'PACK_STRUCT_FIELD'
  83 | #define PACK_STRUCT_FIELD(x) x
     |                              ^
ThirdParties/lwip/src/include/lwip/prot/dhcp.h:90:3: note: in expansion of 
macro 'PACK_STRUCT_FLD_8'
  90 |   PACK_STRUCT_FLD_8(u8_t options[DHCP_OPTIONS_LEN]);
     |   ^~~~~~~~~~~~~~~~~

Do you guys have any idea?

best regards

Massimiliano Cialdi
FIRMWARE ENGINEERING PROFESSIONAL LEADER

Powersoft S.p.A.
Via E. Conti, 5 - Scandicci (Fi) 50018 - Italy
OFFICE:    +39 055 7350230
<http://www.powersoft-audio.com/en/>[cid:PS_553e4174-d089-4113-aa68-7863aa6108ea.png]<http://www.powersoft-audio.com/en/> 
[cid:FB_c651e92c-f558-4470-9dc8-0cde2dc49cf4.png] <https://www.facebook.com/powersoft>  
[cid:Teams_6088ac53-fdc7-460a-97b3-533e03f1ad3d.png] 
<https://teams.microsoft.com/l/chat/0/0?users=massimiliano.cia...@powersoft.com>  
[cid:IN_2180daad-e9b1-4c84-9ac3-d130a49ed1c3.png] <https://www.linkedin.com/company/powersoft> 
<https://www.linkedin.com/company/powersoft>  [cid:YT_c74db1a3-a814-4e66-b04f-15ff9bd7940d.png] 
<https://www.youtube.com/user/powersoftaudio> <https://www.youtube.com/user/powersoftaudio>  
[cid:IG_b8aafa87-2c84-4406-9c9e-91da1b7684d0.png] <https://www.instagram.com/powersoft.audio/>
[cid:ps_ise_bm_187af02d-2149-4894-84df-0712176aaead.jpg]<https://www.iseurope.org/welcome/registration>


_______________________________________________
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to