Compiler warning clean up
authorGeorge Nash <george.nash@intel.com>
Tue, 12 Apr 2016 20:19:02 +0000 (13:19 -0700)
committerJon A. Cruz <jon@joncruz.org>
Wed, 13 Apr 2016 04:56:55 +0000 (04:56 +0000)
commitc1c51d32a35c7334691f719009dfb7b6a42c6484
tree843535240ccda933d7f1ec0381f26616bc66f684
parent9d4bdd92c987cbc40de42d8a96e6d4be8abc0d5b
Compiler warning clean up

sign-compare warning:
IotivityandZigbeeClient.c compares as size_t and int
one value  comes from sizeof the other from snprinf
the larger size_t value is cast to int to remove the
warning

discarded-qualifiers warning:
in the cablockwisetransfer files the CAUpdateBlockOptionItems
function is passing one of its const input parameters to
the CANegotiateBlockSize function but the input parameter is
not const in CANegotiatedBlockSize.  Since CANegotiatedBlockSize
does not actually change the pdu input pointer so it is changed
to const.

type-limits warning:
The variable nextStartIndex is of type unsigned int. The value
is assigned from a call to find_first_of that returns a size_t
value. If the the value string::npos is returned (0xFFFFFFFFFFFFFFFF)
on a 64-bit system it would be cast to (0x00000000FFFFFFFF) so the
compairison (nextStartIndex == string::npos) will always be false
and the RCSInvalidParameterException will never be thrown even if
string::npos was returned from the find_first_of call.

Change-Id: I949ad7c9ab20f9b220fbe46235e27a5c87aa487f
Signed-off-by: George Nash <george.nash@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/7763
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Jon A. Cruz <jon@joncruz.org>
plugins/samples/linux/IotivityandZigbeeClient.c
resource/csdk/connectivity/inc/cablockwisetransfer.h
resource/csdk/connectivity/src/cablockwisetransfer.c
service/scene-manager/src/SceneUtils.cpp