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
+4 -2
View File
@@ -125,6 +125,8 @@ static void My_Get_Event_Ack_Handler(uint8_t *service_request,
int len = 0;
int i;
BACNET_GET_EVENT_INFORMATION_DATA data[MAX_OBJ_IDS_IN_GE_ACK];
(void)src;
for (i = 0; i < MAX_OBJ_IDS_IN_GE_ACK - 1; i++) {
data[i].next = &data[i + 1];
}
@@ -197,10 +199,10 @@ int main(int argc, char *argv[])
time_t last_seconds = 0;
time_t current_seconds = 0;
time_t timeout_seconds = 0;
bool found = false;
LastReceivedObjectIdentifier.instance = 0;
LastReceivedObjectIdentifier.type = 0;
bool found = false;
if (argc <= 1) {
printf("Usage: %s device-instance\r\n", filename_remove_path(argv[0]));
return 0;