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
Revision 3:2dc2592bae5e, committed 2014-08-11
- Comitter:
- dan_ackme
- Date:
- Mon Aug 11 03:44:25 2014 -0700
- Parent:
- 2:05e20e184e7e
- Child:
- 4:c0966143aa22
- Commit message:
- more fixes
Changed in this revision
--- a/internal/common.h Mon Aug 11 03:38:27 2014 -0700 +++ b/internal/common.h Mon Aug 11 03:44:25 2014 -0700 @@ -58,17 +58,15 @@ #ifdef WICONNECT_USE_DEFAULT_STRING_BUFFERS #define SET_STR_BUFFER(_buffer, size) \ - char *ptr, *buf; \ + char *ptr; \ static char defaultBuffer[size]; \ - ptr = buf = (_buffer == NULL) ? defaultBuffer : _buffer; \ - UNUSED(buf) + ptr = (_buffer == NULL) ? defaultBuffer : _buffer; #else #define SET_STR_BUFFER(_buffer, size) \ - char *ptr, *buf; \ + char *ptr; \ if(_buffer == NULL) \ { \ return "<null>"; \ } \ - ptr = buf = _buffer; \ - UNUSED(buf) + ptr = _buffer; #endif
--- a/internal/file/FileInterface.cpp Mon Aug 11 03:38:27 2014 -0700 +++ b/internal/file/FileInterface.cpp Mon Aug 11 03:44:25 2014 -0700 @@ -172,6 +172,8 @@ const char* FileInterface::fileFlagsToStr(FileFlags flags, char *buffer) { SET_STR_BUFFER(buffer, 64); + char *buf = ptr; + static const char* const flag_strings[] = { "Valid", "Executable",
--- a/internal/network/NetworkInterface.cpp Mon Aug 11 03:38:27 2014 -0700 +++ b/internal/network/NetworkInterface.cpp Mon Aug 11 03:44:25 2014 -0700 @@ -429,6 +429,7 @@ SET_STR_BUFFER(ssidStrBuffer, sizeof(SsidStrBuffer)); const char *src = (const char*)ssid->val; int len = ssid->len; + char *buf = ptr; while(len--) { @@ -456,7 +457,7 @@ { if(count < 5) { - char *idx = strchr(strPtr, ':'); + const char *idx = strchr(strPtr, ':'); if(idx == NULL) { return false;