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
+6 -1
View File
@@ -204,6 +204,7 @@ void bip_get_broadcast_address(BACNET_ADDRESS *dest)
bool bip_set_addr(BACNET_IP_ADDRESS *addr)
{
/* not something we do within this driver */
(void)addr;
return false;
}
@@ -230,6 +231,7 @@ bool bip_get_addr(BACNET_IP_ADDRESS *addr)
bool bip_set_broadcast_addr(BACNET_IP_ADDRESS *addr)
{
/* not something we do within this driver */
(void)addr;
return false;
}
@@ -255,6 +257,7 @@ bool bip_get_broadcast_addr(BACNET_IP_ADDRESS *addr)
bool bip_set_subnet_prefix(uint8_t prefix)
{
/* not something we do within this driver */
(void)prefix;
return false;
}
@@ -336,7 +339,7 @@ uint16_t bip_receive(
int max = 0;
struct timeval select_timeout;
struct sockaddr_in sin = { 0 };
BACNET_IP_ADDRESS addr = { { 0 } };
BACNET_IP_ADDRESS addr = { 0 };
socklen_t sin_len = sizeof(sin);
int received_bytes = 0;
int offset = 0;
@@ -657,6 +660,8 @@ static void parseRoutes(struct nlmsghdr *nlHdr, struct route_info *rtInfo)
case RTA_DST:
rtInfo->dstAddr = *(u_int *)RTA_DATA(rtAttr);
break;
default:
break;
}
}
}