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

Files at this revision

API Documentation at this revision

Comitter:
dan_ackme
Date:
Mon Aug 11 03:38:27 2014 -0700
Parent:
1:6ec9998427ad
Child:
3:2dc2592bae5e
Commit message:
fixed more warnings

Changed in this revision

internal/common.h Show annotated file Show diff for this revision Revisions of this file
internal/network/NetworkInterface.cpp Show annotated file Show diff for this revision Revisions of this file
internal/network/NetworkJoin.cpp Show annotated file Show diff for this revision Revisions of this file
internal/socket/SocketInterface.cpp Show annotated file Show diff for this revision Revisions of this file
--- 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
--- a/internal/network/NetworkInterface.cpp	Mon Aug 11 03:29:30 2014 -0700
+++ b/internal/network/NetworkInterface.cpp	Mon Aug 11 03:38:27 2014 -0700
@@ -108,7 +108,7 @@
 /*************************************************************************************************/
 WiconnectResult NetworkInterface::setIpSettings(uint32_t ip, uint32_t netmask, uint32_t gateway)
 {
-    WiconnectResult result;
+    WiconnectResult result = WICONNECT_ERROR;
 
     enum
     {
@@ -164,7 +164,7 @@
 /*************************************************************************************************/
 WiconnectResult NetworkInterface::getIpSettings(uint32_t *ip, uint32_t *netmask, uint32_t *gateway)
 {
-    WiconnectResult result;
+    WiconnectResult result = WICONNECT_ERROR;
 
     enum
     {
--- a/internal/network/NetworkJoin.cpp	Mon Aug 11 03:29:30 2014 -0700
+++ b/internal/network/NetworkJoin.cpp	Mon Aug 11 03:38:27 2014 -0700
@@ -14,7 +14,7 @@
 /*************************************************************************************************/
 WiconnectResult NetworkInterface::join(const char* ssid, const char *password, const Callback &completeHandler_)
 {
-    WiconnectResult result;
+    WiconnectResult result = WICONNECT_ERROR;
 
     enum
     {
--- a/internal/socket/SocketInterface.cpp	Mon Aug 11 03:29:30 2014 -0700
+++ b/internal/socket/SocketInterface.cpp	Mon Aug 11 03:38:27 2014 -0700
@@ -161,7 +161,7 @@
 /*************************************************************************************************/
 WiconnectResult SocketInterface::httpPost(Socket &socket, const char *url, const char *contextType, bool openOnly, const char *certFilename)
 {
-    const HttpSocketArgs args
+    const HttpSocketArgs args =
     {
         contextType,
         certFilename,
@@ -174,7 +174,7 @@
 /*************************************************************************************************/
 WiconnectResult SocketInterface::httpHead(Socket &socket, const char *url, const char *certFilename)
 {
-    const HttpSocketArgs args
+    const HttpSocketArgs args =
     {
         NULL,
         certFilename,