Corrected some warnings generated from Borland compile.

This commit is contained in:
skarg
2010-02-10 17:43:11 +00:00
parent f0863c0238
commit e4080f41da
5 changed files with 93 additions and 85 deletions
+16 -17
View File
@@ -603,7 +603,8 @@ int address_list_encode(
/* FIXME: I really shouild check the length remaining here but it is
fairly pointless until we have the true length remaining in
the packet to work with as at the moment it is just MAX_APDU */
apdu_len = apdu_len;
/* look for matching address */
pMatch = Address_Cache;
while (pMatch <= &Address_Cache[MAX_ADDRESS_CACHE - 1]) {
if ((pMatch->Flags & (BAC_ADDR_IN_USE | BAC_ADDR_BIND_REQ)) ==
@@ -665,27 +666,25 @@ int rr_address_list_encode(
BACNET_ERROR_CLASS *error_class,
BACNET_ERROR_CODE *error_code)
{
int iLen;
int32_t iTemp;
struct Address_Cache_Entry *pMatch;
int iLen = 0;
int32_t iTemp = 0;
struct Address_Cache_Entry *pMatch = NULL;
BACNET_OCTET_STRING MAC_Address;
uint32_t uiTotal; /* Number of bound entries in the cache */
uint32_t uiIndex; /* Current entry number */
uint32_t uiFirst; /* Entry number we started encoding from */
uint32_t uiLast; /* Entry number we finished encoding on */
uint32_t uiTarget; /* Last entry we are required to encode */
uint32_t uiRemaining; /* Amount of unused space in packet */
uint32_t uiTotal = 0; /* Number of bound entries in the cache */
uint32_t uiIndex = 0; /* Current entry number */
uint32_t uiFirst = 0; /* Entry number we started encoding from */
uint32_t uiLast = 0; /* Entry number we finished encoding on */
uint32_t uiTarget = 0; /* Last entry we are required to encode */
uint32_t uiRemaining = 0; /* Amount of unused space in packet */
/* unused parameters */
error_class = error_class;
error_code = error_code;
/* Initialise result flags to all false */
bitstring_init(&pRequest->ResultFlags);
bitstring_init(&pRequest->ResultFlags);
bitstring_set_bit(&pRequest->ResultFlags, RESULT_FLAG_FIRST_ITEM, false);
bitstring_set_bit(&pRequest->ResultFlags, RESULT_FLAG_LAST_ITEM, false);
bitstring_set_bit(&pRequest->ResultFlags, RESULT_FLAG_MORE_ITEMS, false);
uiFirst = 0;
uiLast = 0;
iLen = 0;
/* See how much space we have */
uiRemaining = (uint32_t)(MAX_APDU - pRequest->Overhead);
@@ -801,7 +800,7 @@ int rr_address_list_encode(
if(uiLast == uiTotal)
bitstring_set_bit(&pRequest->ResultFlags, RESULT_FLAG_LAST_ITEM, true);
return(iLen);
return(iLen);
}
/****************************************************************************
+4 -1
View File
@@ -124,7 +124,10 @@ int alarm_ack_decode_service_request(
int len = 0;
int section_len;
uint32_t enumValue;
/* unused parameter */
apdu_len = apdu_len;
if (-1 == (section_len =
decode_context_unsigned(&apdu[len], 0,
&data->ackProcessIdentifier))) {
+4
View File
@@ -115,6 +115,8 @@ int getevent_ack_encode_apdu_data(
BACNET_GET_EVENT_INFORMATION_DATA *event_data;
unsigned i = 0; /* counter */
/* unused parameter */
max_apdu = max_apdu;
if (apdu) {
event_data = get_event_data;
while (event_data) {
@@ -169,6 +171,8 @@ int getevent_ack_encode_apdu_end(
{
int apdu_len = 0; /* total length of the apdu, return value */
/* unused parameter */
max_apdu = max_apdu;
if (apdu) {
apdu_len += encode_closing_tag(&apdu[apdu_len], 0);
apdu_len += encode_context_boolean(&apdu[apdu_len], 1, moreEvents);