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
View File
@@ -65,6 +65,7 @@ static int notify_encode_apdu(
BACNET_PROPERTY_VALUE *value = NULL; /* value in list */
BACNET_APPLICATION_DATA_VALUE *app_data = NULL;
(void)max_apdu_len;
if (apdu) {
/* tag 0 - subscriberProcessIdentifier */
len = encode_context_unsigned(
@@ -405,6 +406,7 @@ int cov_subscribe_encode_apdu(uint8_t *apdu,
int len = 0; /* length of each encoding */
int apdu_len = 0; /* total length of the apdu, return value */
(void)max_apdu_len;
if (apdu && data) {
apdu[0] = PDU_TYPE_CONFIRMED_SERVICE_REQUEST;
apdu[1] = encode_max_segs_max_apdu(0, MAX_APDU);
@@ -554,6 +556,7 @@ int cov_subscribe_property_encode_apdu(uint8_t *apdu,
int len = 0; /* length of each encoding */
int apdu_len = 0; /* total length of the apdu, return value */
(void)max_apdu_len;
if (apdu && data) {
apdu[0] = PDU_TYPE_CONFIRMED_SERVICE_REQUEST;
apdu[1] = encode_max_segs_max_apdu(0, MAX_APDU);