Suppress unused return values when using -c opt.

Change-Id: I9cfe54f1b71d4b2b5e321cd09282db2852664377
diff --git a/aos/linux_code/ipc_lib/aos_sync.cc b/aos/linux_code/ipc_lib/aos_sync.cc
index 1275bbf..fc1d875 100644
--- a/aos/linux_code/ipc_lib/aos_sync.cc
+++ b/aos/linux_code/ipc_lib/aos_sync.cc
@@ -1,4 +1,5 @@
 #if !AOS_DEBUG
+#undef NDEBUG
 #define NDEBUG
 #endif
 
diff --git a/aos/linux_code/ipc_lib/core_lib.c b/aos/linux_code/ipc_lib/core_lib.c
index ddcd7f5..23dd256 100644
--- a/aos/linux_code/ipc_lib/core_lib.c
+++ b/aos/linux_code/ipc_lib/core_lib.c
@@ -28,8 +28,13 @@
 
   void *msg = NULL;
   aos_shm_core *shm_core = global_core->mem_struct;
-  int result = mutex_grab(&shm_core->msg_alloc_lock);
+  int result =
+      mutex_grab(&shm_core->msg_alloc_lock);
+#ifdef NDEBUG
+  (void)result;
+#else
   assert(result == 0);
+#endif
   shm_core->msg_alloc = (uint8_t *)shm_core->msg_alloc - length;
   const uint8_t align_extra = (uintptr_t)shm_core->msg_alloc % alignment;
   shm_core->msg_alloc = (uint8_t *)shm_core->msg_alloc - align_extra;
diff --git a/aos/linux_code/ipc_lib/queue.cc b/aos/linux_code/ipc_lib/queue.cc
index 81ad51b..21a2ea8 100644
--- a/aos/linux_code/ipc_lib/queue.cc
+++ b/aos/linux_code/ipc_lib/queue.cc
@@ -1,4 +1,5 @@
 #if !AOS_DEBUG
+#undef NDEBUG
 #define NDEBUG
 #endif