From be2bd788f5ed4365157445bba16077b1a562a1d2 Mon Sep 17 00:00:00 2001 From: Anjan Chanda <anjan.chanda@iopsys.eu> Date: Wed, 9 Jun 2021 19:03:46 +0200 Subject: [PATCH] fix few warnings --- src/1905_tlvs.h | 4 ++-- src/Makefile | 2 +- src/debug.c | 2 +- src/extensions/map/maputil.c | 6 ++---- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/1905_tlvs.h b/src/1905_tlvs.h index 671666ba..88c5faff 100644 --- a/src/1905_tlvs.h +++ b/src/1905_tlvs.h @@ -18,8 +18,8 @@ #define ETHERTYPE_1905 0x893a #define ETHERTYPE_LLDP 0x88cc -#define MCAST_1905 "\x01\x80\xC2\x00\x00\x13" -#define MCAST_LLDP "\x01\x80\xC2\x00\x00\x0E" +#define MCAST_1905 (uint8_t *)"\x01\x80\xC2\x00\x00\x13" +#define MCAST_LLDP (uint8_t *)"\x01\x80\xC2\x00\x00\x0E" /* 1905 CMDU types */ diff --git a/src/Makefile b/src/Makefile index 94c23312..e6edb589 100644 --- a/src/Makefile +++ b/src/Makefile @@ -46,7 +46,7 @@ LIBS += -rdynamic -ldl .PHONY: all clean tests -all: libmidgen.so ieee1905d libieee1905.so extmods tests +all: libmidgen.so libieee1905.so ieee1905d extmods tests %.o: %.c $(CC) $(CFLAGS) -fPIC -c -o $@ $< diff --git a/src/debug.c b/src/debug.c index e589b8e5..64ee650d 100644 --- a/src/debug.c +++ b/src/debug.c @@ -117,7 +117,7 @@ void log_message(int level, const char *fmt, ...) vsyslog(syslog_level[level], fmt, args); if (outfile) { - fprintf(outfile, "[%lu]: ", getpid()); + fprintf(outfile, "[%d]: ", getpid()); vfprintf(outfile, fmt, args); } diff --git a/src/extensions/map/maputil.c b/src/extensions/map/maputil.c index fa793a55..95855aaf 100644 --- a/src/extensions/map/maputil.c +++ b/src/extensions/map/maputil.c @@ -14,6 +14,7 @@ #include <stdarg.h> #include "1905_tlvs.h" +#include "cmdu.h" #include "map2.h" #include "map_module.h" @@ -26,9 +27,6 @@ do { \ } while(0) -extern const char *tlv_type2str(uint8_t type); //FIXME -extern const char *cmdu_type2str(uint16_t type); - int map_prepare_cmdu_mask(uint8_t mask[], ...) { @@ -180,4 +178,4 @@ const char *map_tlv_type2str(uint8_t type) return "UNKNOWN"; #undef T2STR -} \ No newline at end of file +} -- GitLab