Fix (most) compilation warnings in Intel C++ Compiler (#38)
* Use BACNET_OBJECT_TYPE for all object type variables.
* Fix ICC "mixing enumerated type" warnings for assignments and parameters.
* Network Port: Use enums for state structs and remove erroneous bounds checks copy-pasted from IP_Subnet_Prefix setter.
* Fix ICC "unreachable statement" warnings.
* Fix ICC "unused variable" warnings when printing is disabled.
* Fix ICC "mixing enumerated type" warnings for struct initializers { 0 } by ensuring the first member is an integer type.
* Send_GetEvent_Global: Return 0 (invalid TSM invoke ID) instead of -1 = 255 (technically valid invoke ID) on failure.
* Fix ICC "pointless comparison" warnings.
* Fix wrong import in objects.c (memset being used).
* Fix signedness warnings and inconsistencies. Include -1 = 255 check in cov_address_get().
* Add some guards for BACAPP_LIGHTING_COMMAND to avoid errors/warnings.
* RPM test fixes
* Address requested changes. (#38)
This commit is contained in:
committed by
Steve Karg
parent
76abcaedd1
commit
f8ce70470c
@@ -112,8 +112,8 @@ uint16_t iCurrent_Device_Idx = 0;
|
||||
* @param Object_Instance [in] Set the new Device to this instance number.
|
||||
* @param sObject_Name [in] Use this Object Name for the Device.
|
||||
* @param sDescription [in] Set this Description for the Device.
|
||||
* @return The index of this instance in the Devices[] array,
|
||||
* or -1 if there isn't enough room to add this Device.
|
||||
* @return The index of this instance in the Devices[] array, or UINT16_MAX if
|
||||
* there isn't enough room to add this Device.
|
||||
*/
|
||||
uint16_t Add_Routed_Device(uint32_t Object_Instance,
|
||||
BACNET_CHARACTER_STRING *sObject_Name,
|
||||
@@ -141,7 +141,7 @@ uint16_t Add_Routed_Device(uint32_t Object_Instance,
|
||||
pDev->Database_Revision = 0; /* Reset/Initialize now */
|
||||
return i;
|
||||
} else {
|
||||
return -1;
|
||||
return UINT16_MAX;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user