Host library for controlling a WiConnect enabled Wi-Fi module.
Dependents: wiconnect-ota_example wiconnect-web_setup_example wiconnect-test-console wiconnect-tcp_server_example ... more
Diff: internal/common.h
- Revision:
- 2:05e20e184e7e
- Parent:
- 1:6ec9998427ad
- Child:
- 3:2dc2592bae5e
diff -r 6ec9998427ad -r 05e20e184e7e internal/common.h --- a/internal/common.h Mon Aug 11 03:29:30 2014 -0700 +++ b/internal/common.h Mon Aug 11 03:38:27 2014 -0700 @@ -28,6 +28,8 @@ #define CHECK_CALLBACK_AVAILABLE(cb) #endif +#define UNUSED(expr) do { (void)(expr); } while (0) + #define CHECK_CLEANUP_COMMAND() \ if(result != WICONNECT_PROCESSING) \ { \ @@ -58,7 +60,8 @@ #define SET_STR_BUFFER(_buffer, size) \ char *ptr, *buf; \ static char defaultBuffer[size]; \ - ptr = buf = (_buffer == NULL) ? defaultBuffer : _buffer; + ptr = buf = (_buffer == NULL) ? defaultBuffer : _buffer; \ + UNUSED(buf) #else #define SET_STR_BUFFER(_buffer, size) \ char *ptr, *buf; \ @@ -66,5 +69,6 @@ { \ return "<null>"; \ } \ - ptr = buf = _buffer; + ptr = buf = _buffer; \ + UNUSED(buf) #endif