Fix warnings for g++ 7.5.0

pull/18/head
Xael South 2021-01-26 12:36:34 +01:00
rodzic 355ba64a57
commit 4aceda56d6
2 zmienionych plików z 5 dodań i 2 usunięć

Wyświetl plik

@ -6,7 +6,7 @@ STRIP=strip
OUTDIR?=build
OUTFILE="$(OUTDIR)/rtl_wmbus"
CFLAGS?=-Iinclude -std=gnu99
CFLAGS_WARNINGS?=-Wall -W -Waggregate-return -Wbad-function-cast -Wcast-align -Wcast-qual -Wchar-subscripts -Wcomment -Wfloat-equal -Winline -Wmain -Wmissing-noreturn -Wmissing-prototypes -Wparentheses -Wpointer-arith -Wredundant-decls -Wreturn-type -Wshadow -Wsign-compare -Wstrict-prototypes -Wswitch -Wunreachable-code -Wunused -Wuninitialized
CFLAGS_WARNINGS?=-Wall -W -Waggregate-return -Wbad-function-cast -Wcast-align -Wcast-qual -Wchar-subscripts -Wcomment -Wno-float-equal -Winline -Wmain -Wmissing-noreturn -Wno-missing-prototypes -Wparentheses -Wpointer-arith -Wredundant-decls -Wreturn-type -Wshadow -Wsign-compare -Wstrict-prototypes -Wswitch -Wunreachable-code -Wunused -Wuninitialized
LIB?=-lm
SRC=rtl_wmbus.c
@ -27,5 +27,8 @@ pi1:
rebuild: clean all
install: release
cp $(OUTFILE) /usr/bin
clean:
$(RM) -rf "$(OUTDIR)"

Wyświetl plik

@ -14,7 +14,7 @@ FILE * get_net(const char *hostname, int port);
FILE * get_net(const char *hostname, int port)
{
struct sockaddr_in address = {.sin_family = AF_INET, .sin_port = htons(port)};
struct sockaddr_in address = {.sin_family = AF_INET, .sin_port = htons(port), .sin_addr = {} };
if (-1 == inet_aton(hostname, &address.sin_addr))
{
fprintf(stderr, "inet_aton() error\n");