Bugfix/c89 compile fixes (#327)

* Fix code to be able to compile with older C89 ANSI compilers

* Convert C++ comments to C89 comments.

* default to std=gnu89

* Fix to enable CMake 3.1 to build on Centos7

Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
This commit is contained in:
Steve Karg
2022-08-23 13:37:32 -05:00
committed by GitHub
parent 065d0334ee
commit 95b487ea6f
16 changed files with 85 additions and 56 deletions
+2 -2
View File
@@ -302,7 +302,7 @@ bool address_mac_from_ascii(BACNET_MAC_ADDRESS *mac, const char *arg)
{
unsigned a[6] = { 0 }, p = 0;
uint16_t port = 0;
int c;
int c, i;
bool status = false;
if (!(mac && arg)) {
@@ -327,7 +327,7 @@ bool address_mac_from_ascii(BACNET_MAC_ADDRESS *mac, const char *arg)
&a[4], &a[5]);
if (c > 0) {
for (int i = 0; i < c; i++) {
for (i = 0; i < c; i++) {
mac->adr[i] = a[i];
}
mac->len = c;