From 3ca33605fee72c7c1289de61952590e70d5526f3 Mon Sep 17 00:00:00 2001 From: skarg Date: Mon, 17 Oct 2005 20:54:17 +0000 Subject: [PATCH] cleaned up some warnings. --- bacnet-stack/Makefile | 9 +++++---- bacnet-stack/bacdcode.c | 8 ++++---- bacnet-stack/bip.c | 2 +- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/bacnet-stack/Makefile b/bacnet-stack/Makefile index 913a3335..0b7dfa8f 100644 --- a/bacnet-stack/Makefile +++ b/bacnet-stack/Makefile @@ -6,10 +6,10 @@ BASEDIR = . #CFLAGS = -Wall -I. -O2 -g # Note: you can strip out symbols using the strip command # to get an idea of how big the compile really is. -#CFLAGS = -Wall -I. -Iports/linux -g -DBACDL_ETHERNET=1 -#CFLAGS = -Wall -I. -Iports/linux -g -DBACDL_ARCNET=1 -#CFLAGS = -Wall -I. -Iports/linux -g -DBACDL_MSTP=1 -CFLAGS = -Wall -I. -Iports/linux -g -DBACDL_BIP=1 +#CFLAGS = -Wall -I. -Iports/linux -g -DBACFILE=1 -DBACDL_ETHERNET=1 +#CFLAGS = -Wall -I. -Iports/linux -g -DBACFILE=1 -DBACDL_ARCNET=1 +#CFLAGS = -Wall -I. -Iports/linux -g -DBACFILE=1 -DBACDL_MSTP=1 +CFLAGS = -Wall -I. -Iports/linux -g -DBACFILE=1 -DBACDL_BIP=1 SRCS = ports/linux/main.c \ ports/linux/ethernet.c \ @@ -23,6 +23,7 @@ SRCS = ports/linux/main.c \ whois.c \ iam.c \ rp.c \ + rpm.c \ wp.c \ tsm.c \ datalink.c \ diff --git a/bacnet-stack/bacdcode.c b/bacnet-stack/bacdcode.c index 2a4f2306..701f39ea 100644 --- a/bacnet-stack/bacdcode.c +++ b/bacnet-stack/bacdcode.c @@ -1567,10 +1567,10 @@ void testBACDCodeOctetString(Test * pTest) uint8_t tag_number = 0; uint32_t len_value = 0; - apdu_len = encode_tagged_octet_string(&array[0], &test_string0[0], 0); + apdu_len = encode_tagged_octet_string(&array[0], (uint8_t *)&test_string0[0], 0); len = decode_tag_number_and_value(&array[0], &tag_number, &len_value); len += decode_octet_string(&array[len], len_value, - &decoded_string[0], sizeof(decoded_string)); + (uint8_t *)&decoded_string[0], sizeof(decoded_string)); ct_test(pTest, apdu_len == len); ct_test(pTest, memcmp(&test_string0[0], &decoded_string[0], len_value) == 0); @@ -1578,11 +1578,11 @@ void testBACDCodeOctetString(Test * pTest) test_string[i] = '0' + (i % 10); apdu_len = encode_tagged_octet_string(&encoded_array[0], - &test_string[0], i); + (uint8_t *)&test_string[0], i); len = decode_tag_number_and_value(&encoded_array[0], &tag_number, &len_value); len += decode_octet_string(&encoded_array[len], len_value, - &decoded_string[0], sizeof(decoded_string)); + (uint8_t *)&decoded_string[0], sizeof(decoded_string)); if (apdu_len != len) { printf("test octet string=#%d\n", i); } diff --git a/bacnet-stack/bip.c b/bacnet-stack/bip.c index 5bddde1e..abb09afd 100644 --- a/bacnet-stack/bip.c +++ b/bacnet-stack/bip.c @@ -217,7 +217,7 @@ uint16_t bip_receive( int max; struct timeval select_timeout; struct sockaddr_in sin = {-1}; - int sin_len = sizeof(sin); + size_t sin_len = sizeof(sin); /* Make sure the socket is open */ if (BIP_Socket < 0)