Clean up compiler warning/removed unused code
authorGeorge Nash <george.nash@intel.com>
Wed, 1 Jun 2016 17:06:09 +0000 (10:06 -0700)
committerJon A. Cruz <jon@joncruz.org>
Fri, 3 Jun 2016 09:16:16 +0000 (09:16 +0000)
ocstack.c:
Removed the verifyUriQueryLength() function. This function
is not used anywhere in the code.  The code may be valid,
however, if it is not used its not being maintained.
[-Wunused-function]

Change-Id: Ifa9b0a6a4b22416eb91b67b4476b544c70ff20c8
Signed-off-by: George Nash <george.nash@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/8421
Reviewed-by: David Antler <david.a.antler@intel.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Jon A. Cruz <jon@joncruz.org>
resource/csdk/stack/src/ocstack.c

index 709dba6..d622944 100644 (file)
@@ -279,16 +279,6 @@ static void deleteAllResources();
  */
 static void incrementSequenceNumber(OCResource * resPtr);
 
-/**
- * Verify the lengths of the URI and the query separately.
- *
- * @param inputUri Input URI and query.
- * @param uriLen The length of the initial URI with query.
- * @return ::OC_STACK_OK on success, some other value upon failure.
- */
-static OCStackResult verifyUriQueryLength(const char * inputUri,
-        uint16_t uriLen);
-
 /*
  * Attempts to initialize every network interface that the CA Layer might have compiled in.
  *
@@ -2241,31 +2231,6 @@ CAMessageType_t qualityOfServiceToMessageType(OCQualityOfService qos)
     }
 }
 
-OCStackResult verifyUriQueryLength(const char *inputUri, uint16_t uriLen)
-{
-    char *query;
-
-    query = strchr (inputUri, '?');
-
-    if (query != NULL)
-    {
-        if((query - inputUri) > MAX_URI_LENGTH)
-        {
-            return OC_STACK_INVALID_URI;
-        }
-
-        if((inputUri + uriLen - 1 - query) > MAX_QUERY_LENGTH)
-        {
-            return OC_STACK_INVALID_QUERY;
-        }
-    }
-    else if(uriLen > MAX_URI_LENGTH)
-    {
-        return OC_STACK_INVALID_URI;
-    }
-    return OC_STACK_OK;
-}
-
 /**
  *  A request uri consists of the following components in order:
  *                              example