我在这里有一个代码段,但 SPLINT 在这里给了我一个警告
"tcpuip\dhcpc\dhcpc.c: (in function send_discover)
tcpuip\dhcpc\dhcpc.c(219,21): Immediate address &m->options[4] passed as only
param: add_msg_type (&m->options[4], ...)
An immediate address (result of & operator) is transferred inconsistently.
(Use -immediatetrans to inhibit warning)
"
static void send_discover(void)
{
u8_t *end;
struct dhcp_msg *m = (struct dhcp_msg *)uip_appdata;
create_msg(m);
end = add_msg_type(&m->options[4], DHCPDISCOVER); //line 219
end = add_req_options(end);
end = add_end(end);
uip_send(uip_appdata, end - (u8_t *)uip_appdata);
}
我正在尝试解决此问题,请任何人都可以通过一些了解。我已经在谷歌上搜索了 3 个小时,还没有找到解决方案。