Skip to content

Commit

Permalink
lwip: Ignore some compiler warnings when debugging is on
Browse files Browse the repository at this point in the history
  • Loading branch information
projectgus committed Jul 29, 2015
1 parent efc4540 commit 3797cf5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions lwip/include/arch/cc.h
Expand Up @@ -87,8 +87,12 @@ typedef int sys_prot_t;

/* Plaform specific diagnostic output */
#ifdef LWIP_DEBUG
#define LWIP_PLATFORM_DIAG(x) do { printf x; } while(0)

#define LWIP_PLATFORM_DIAG(x) do { \
_Pragma("GCC diagnostic push") \
_Pragma("GCC diagnostic ignored \"-Wformat\"") \
printf x; \
_Pragma("GCC diagnostic pop") \
} while(0)
#define LWIP_PLATFORM_ASSERT(x) do { printf("Assertion \"%s\" failed at line %d in %s\n", \
x, __LINE__, __FILE__); while(1) {} } while(0)

Expand Down
2 changes: 1 addition & 1 deletion lwip/lwip

0 comments on commit 3797cf5

Please sign in to comment.