Fixed compiler warning format '%u' expects argument of type 'unsigned int', but argument 4 has type 'uint32_t' {aka 'long unsigned int'} [-Werror=format=] by casting or increasing format specifier size and casting. (#1092)
* Fixed compiler warning format '%u' expects argument of type 'unsigned int', but argument 4 has type 'uint32_t' {aka 'long unsigned int'} [-Werror=format=] by casting or increasing format specifier size and casting. Increased the size of the name string to handle larger possible integers.
* Fixed copied code that no longer needs static function scope variables for text names.
This commit is contained in:
+2
-1
@@ -683,7 +683,8 @@ static void PrintReadPropertyData(
|
||||
static void Print_Property_Identifier(unsigned propertyIdentifier)
|
||||
{
|
||||
if (bactext_property_name_proprietary(propertyIdentifier)) {
|
||||
fprintf(stdout, "-- proprietary %u", propertyIdentifier);
|
||||
fprintf(
|
||||
stdout, "-- proprietary %lu", (unsigned long)propertyIdentifier);
|
||||
} else {
|
||||
fprintf(stdout, "%s", bactext_property_name(propertyIdentifier));
|
||||
}
|
||||
|
||||
@@ -274,7 +274,9 @@ static void add_discovered_properties_to_gui(
|
||||
bacnet_discover_object_property_identifier(
|
||||
device_id, object_type, object_instance, index, &property_id);
|
||||
if (bactext_property_name_proprietary(property_id)) {
|
||||
asprintfa(&property_string, "proprietary-%u", property_id);
|
||||
asprintfa(
|
||||
&property_string, "proprietary-%lu",
|
||||
(unsigned long)property_id);
|
||||
} else {
|
||||
asprintfa(
|
||||
&property_string, "%s", bactext_property_name(property_id));
|
||||
|
||||
Reference in New Issue
Block a user