Reverted unsigned decorator to BACNET_MAX_INSTANCE and BACNET_MAX_OBJECT constants since they are compared to signed values in some use cases which then fails when unsigned is promoted.
This commit is contained in:
+3
-2
@@ -152,10 +152,11 @@ typedef uint32_t BACNET_UNSIGNED_INTEGER;
|
|||||||
|
|
||||||
/* largest BACnet Instance Number */
|
/* largest BACnet Instance Number */
|
||||||
/* Also used as a device instance number wildcard address */
|
/* Also used as a device instance number wildcard address */
|
||||||
#define BACNET_MAX_INSTANCE (0x3FFFFFU)
|
/* note: used with signed and unsigned comparisons - don't decorate with 'u'*/
|
||||||
|
#define BACNET_MAX_INSTANCE (0x3FFFFF)
|
||||||
#define BACNET_INSTANCE_BITS 22
|
#define BACNET_INSTANCE_BITS 22
|
||||||
/* large BACnet Object Type */
|
/* large BACnet Object Type */
|
||||||
#define BACNET_MAX_OBJECT (0x3FFU)
|
#define BACNET_MAX_OBJECT (0x3FF)
|
||||||
/* Array index 0=size of array, n=array element n, MAX=all array elements */
|
/* Array index 0=size of array, n=array element n, MAX=all array elements */
|
||||||
#define BACNET_ARRAY_ALL UINT32_MAX
|
#define BACNET_ARRAY_ALL UINT32_MAX
|
||||||
typedef uint32_t BACNET_ARRAY_INDEX;
|
typedef uint32_t BACNET_ARRAY_INDEX;
|
||||||
|
|||||||
Reference in New Issue
Block a user