kopia lustrzana https://github.com/xaelsouth/rtl-wmbus
Fix warnings for g++ 7.5.0
rodzic
355ba64a57
commit
4aceda56d6
5
Makefile
5
Makefile
|
@ -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)"
|
||||
|
|
|
@ -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");
|
||||
|
|
Ładowanie…
Reference in New Issue