lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] How to prevent "unused variable" warnings due to the debug


From: narke
Subject: [lwip-users] How to prevent "unused variable" warnings due to the debug macro definition?
Date: Mon, 22 Aug 2011 19:57:40 +0800

Hi,

When I turn off the LWIP_DEBUG, some code will produce "unused
variable" warnings. For example, in netif/ppp/fsm.c line 735:

static void
fsm_rcoderej(fsm *f, u_char *inp, int len)
{
  u_char code, id;

  ...

  FSMDEBUG(LOG_WARNING, ("%s: Rcvd Code-Reject for code %d, id %d\n",
        PROTO_NAME(f), code, id));

  ...

}

The variable code and id will be treated as unused variable and cause warnings.

My LWIP_PLATFORM_DIAG definitions is:

#define LWIP_PLATFORM_DIAG(...)     do { (void)(__VA_ARGS__); } while (0)

How do I define the LWIP_PLATFORM_DIAG to eliminate the warnings?

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]