立即地址传输不一致SPLINT

时间:2012-04-05 06:12:20

标签: c splint

我这里有一个代码段,但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小时,但是没有找到一个溶液。

0 个答案:

没有答案