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:
@@ -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 =
|
||||
|
||||
Reference in New Issue
Block a user