lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-users] How do I define the LWIP_PLATFORM_DIAG


From: narke
Subject: [lwip-users] How do I define the LWIP_PLATFORM_DIAG
Date: Thu, 25 Aug 2011 00:58:45 +0800

Hi,

I tried to define as

#define S16_F "d"
#define U16_F "ud"
#define U32_F "ul"
#define S32_F "l"
#define X16_F "04x"
#define X32_F "08x"

#define LWIP_PLATFORM_DIAG(message) do { printf(message); } while(0)

but the compile results in strange warnings and errors. For example:

    LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE,
("dhcp_handle_nak(netif=%p) %c%c%"U16_F"\n",
"d:\woody\svn\CommUnit\port-lwip-1.4.0\lwip-1.4.0\src\core\dhcp.c",186
 Warning[Pe174]: expression has no effect
    LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE,
("dhcp_handle_nak(netif=%p) %c%c%"U16_F"\n",
"d:\woody\svn\CommUnit\port-lwip-1.4.0\lwip-1.4.0\src\core\dhcp.c",186
 Warning[Pe174]: expression has no effect
    LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE,
("dhcp_handle_nak(netif=%p) %c%c%"U16_F"\n",
"d:\woody\svn\CommUnit\port-lwip-1.4.0\lwip-1.4.0\src\core\dhcp.c",186
 Warning[Pe174]: expression has no effect
    LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE,
("dhcp_handle_nak(netif=%p) %c%c%"U16_F"\n",
"d:\woody\svn\CommUnit\port-lwip-1.4.0\lwip-1.4.0\src\core\dhcp.c",186
 Warning[Pe174]: expression has no effect
    LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE,
("dhcp_handle_nak(netif=%p) %c%c%"U16_F"\n",
"d:\woody\svn\CommUnit\port-lwip-1.4.0\lwip-1.4.0\src\core\dhcp.c",186
 Error[Pe167]: argument of type "u16_t" is incompatible with parameter
of type "char const *"


I have no idea about what's wrong with my definition.  Can anyone give
me an successful example?

Thanks in advance.
-- 
Life is the only flaw in an otherwise perfect nonexistence
    -- Schopenhauer

narke
public key at http://subkeys.pgp.net:11371 (address@hidden)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]