lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] [PATCH 4/7] lwip: fix warning 'code has no effect' where me


From: address@hidden
Subject: [lwip-users] [PATCH 4/7] lwip: fix warning 'code has no effect' where mem_realloc was used
Date: Fri, 21 Sep 2007 02:28:57 +0000

lwip: fix warning 'code has no effect' where mem_realloc was used
---
 user/e7/comms/lwip/include/lwip/mem.h |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/user/e7/comms/lwip/include/lwip/mem.h 
b/user/e7/comms/lwip/include/lwip/mem.h
index 6ad0216..b6da042 100644
--- a/user/e7/comms/lwip/include/lwip/mem.h
+++ b/user/e7/comms/lwip/include/lwip/mem.h
@@ -65,7 +65,8 @@ typedef u16_t mem_size_t;
 #define mem_calloc(x, y) calloc(x, y)
 #endif
 #ifndef mem_realloc
-#define mem_realloc(x, size) (x)
+/* this is a hack: return value wasn't used so safer to not realloc */
+#define mem_realloc(x, size) do { ; } while (0)
 #endif
 #else /* MEM_LIBC_MALLOC */
 #if MEM_USE_POOLS
-- 
1.5.2.1







reply via email to

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