Fixed ports/xplained conversion of double warning. (#1004)

* Fixed ports/xplained conversion of double warning.

* Fixed BACNET_USE_DOUBLE usage in AVR ports.

* Fixed integer out-of-range in AVR port.

* Fixed missing function prototype for whois_request_encode().
This commit is contained in:
Steve Karg
2025-05-26 22:13:06 -05:00
committed by GitHub
parent f983df7fae
commit f5b5db445c
10 changed files with 53 additions and 19 deletions
+34 -17
View File
@@ -331,6 +331,34 @@
#define MAX_OCTET_STRING_BYTES (MAX_APDU - 6)
#endif
/* Do we need any octet strings? */
#ifndef BACNET_USE_OCTETSTRING
#define BACNET_USE_OCTETSTRING 1
#endif
/* Do we need any doubles? */
#ifndef BACNET_USE_DOUBLE
#define BACNET_USE_DOUBLE 1
#endif
/* Do we need any signed integers */
#ifndef BACNET_USE_SIGNED
#define BACNET_USE_SIGNED 1
#endif
/* if a datatype is not enabled, the BACapp helper cannot use it */
#if (BACNET_USE_OCTETSTRING == 0)
#undef BACAPP_OCTET_STRING
#endif
#if (BACNET_USE_DOUBLE == 0)
#undef BACAPP_DOUBLE
#endif
#if (BACNET_USE_SIGNED == 0)
#undef BACAPP_SIGNED
#endif
/**
* @note Control the selection of services etc to enable code size reduction
* for those compiler suites which do not handle removing of unused functions
@@ -339,12 +367,16 @@
* We will start with the A type services code first as these are least likely
* to be required in embedded systems using the stack.
*/
#ifndef BACNET_SVC_SERVER
#if !( \
defined(BACNET_SVC_I_HAVE_A) || defined(BACNET_SVC_WP_A) || \
defined(BACNET_SVC_RP_A) || defined(BACNET_SVC_RPM_A) || \
defined(BACNET_SVC_DCC_A) || defined(BACNET_SVC_RD_A) || \
defined(BACNET_SVC_TS_A) || defined(BACNET_SVC_SERVER))
/* default to client-server device for the example apps to build. */
#define BACNET_SVC_SERVER 0
#endif
#if (BACNET_SVC_SERVER == 0)
#if defined(BACNET_SVC_SERVER) && (BACNET_SVC_SERVER == 0)
/* client-server device */
#define BACNET_SVC_I_HAVE_A 1
#define BACNET_SVC_WP_A 1
@@ -353,9 +385,6 @@
#define BACNET_SVC_DCC_A 1
#define BACNET_SVC_RD_A 1
#define BACNET_SVC_TS_A 1
#define BACNET_USE_OCTETSTRING 1
#define BACNET_USE_DOUBLE 1
#define BACNET_USE_SIGNED 1
#endif
/* Do them one by one */
@@ -383,16 +412,4 @@
#define BACNET_SVC_RD_A 0
#endif
#ifndef BACNET_USE_OCTETSTRING /* Do we need any octet strings? */
#define BACNET_USE_OCTETSTRING 0
#endif
#ifndef BACNET_USE_DOUBLE /* Do we need any doubles? */
#define BACNET_USE_DOUBLE 0
#endif
#ifndef BACNET_USE_SIGNED /* Do we need any signed integers */
#define BACNET_USE_SIGNED 0
#endif
#endif