Cleaned up some warnings found when compiling with Visual Studio Express 2010.

This commit is contained in:
skarg
2014-01-14 20:03:00 +00:00
parent bfa26b769f
commit c3326b324c
8 changed files with 23 additions and 20 deletions
+1 -1
View File
@@ -1389,7 +1389,7 @@ bool bacapp_print_value(
/* Try to extract the value into allocated memory. If unable, try again */
/* another time with a string that is twice as large. */
status = bacapp_snprintf_value(str, str_len, object_value);
if ((status < 0) || (status >= str_len)) {
if ((status < 0) || ((size_t)status >= str_len)) {
free(str);
str_len *= 2;
} else if (status == 0) {
+1 -1
View File
@@ -502,7 +502,7 @@ void datetime_add_minutes(
if (minutes < 0) {
/* convert to positive for easier math */
minutes *= -1;
if (minutes > bdatetime_minutes) {
if ((uint32_t)minutes > bdatetime_minutes) {
/* previous day */
bdatetime_days -= 1;
bdatetime_minutes += ((24 * 60) - minutes);
+3
View File
@@ -57,6 +57,9 @@ int stricmp(
return (int) c1 - c2;
}
#endif
#if defined(_MSC_VER)
#define stricmp _stricmp
#endif
bool indtext_by_string(
INDTEXT_DATA * data_list,
+1 -1
View File
@@ -166,7 +166,7 @@ int timesync_encode_timesync_recipients(
} else {
len = 1 + 3 + 2 + pRecipient->type.address.mac_len + 1;
}
if (max_apdu >= len) {
if (max_apdu >= (unsigned)len) {
/* CHOICE - address [1] BACnetAddress - opening */
len = encode_opening_tag(&apdu[apdu_len], 1);
apdu_len += len;
+3 -3
View File
@@ -84,20 +84,20 @@ int whois_decode_service_request(
if (tag_number != 0) {
return BACNET_STATUS_ERROR;
}
if (apdu_len > len) {
if (apdu_len > (unsigned)len) {
len += decode_unsigned(&apdu[len], len_value, &decoded_value);
if (decoded_value <= BACNET_MAX_INSTANCE) {
if (pLow_limit) {
*pLow_limit = decoded_value;
}
}
if (apdu_len > len) {
if (apdu_len > (unsigned)len) {
len +=
decode_tag_number_and_value(&apdu[len], &tag_number, &len_value);
if (tag_number != 1) {
return BACNET_STATUS_ERROR;
}
if (apdu_len > len) {
if (apdu_len > (unsigned)len) {
len += decode_unsigned(&apdu[len], len_value, &decoded_value);
if (decoded_value <= BACNET_MAX_INSTANCE) {
if (pHigh_limit) {