Bugfix/code clean using gcc warnings (#371)

* Enable extra GCC warnings to discover subtle bugs

* convert c++ comments to c comments

* cleanup pedantic compiler warnings

* Compile apps with GNU89 GNU99 GNU11 and GNU17

Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
This commit is contained in:
Steve Karg
2022-12-25 21:43:51 -06:00
committed by GitHub
parent 0728bc4390
commit b91735af13
66 changed files with 990 additions and 847 deletions
+3 -2
View File
@@ -657,6 +657,7 @@ int Channel_Value_Encode(
{
int apdu_len = BACNET_STATUS_ERROR;
(void)apdu_max;
if (!apdu || !value) {
return BACNET_STATUS_ERROR;
}
@@ -907,7 +908,7 @@ int Channel_Coerce_Data_Encode(uint8_t *apdu,
#if defined(BACAPP_REAL)
case BACNET_APPLICATION_TAG_REAL:
if (tag == BACNET_APPLICATION_TAG_BOOLEAN) {
if (value->type.Real != 0.0F) {
if (islessgreater(value->type.Real, 0.0F)) {
boolean_value = true;
}
apdu_len =
@@ -954,7 +955,7 @@ int Channel_Coerce_Data_Encode(uint8_t *apdu,
#if defined(BACAPP_DOUBLE)
case BACNET_APPLICATION_TAG_DOUBLE:
if (tag == BACNET_APPLICATION_TAG_BOOLEAN) {
if (value->type.Double != 0.0) {
if (islessgreater(value->type.Double, 0.0)) {
boolean_value = true;
}
apdu_len =