Skip to content

Commit 1223d6c

Browse files
author
=
committed
fixed several gcc warnings
1 parent 6978743 commit 1223d6c

3 files changed

Lines changed: 5 additions & 8 deletions

File tree

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ BINDIR = $(DESTDIR)$(PREFIX)/bin
1515
HOSTOS := $(shell uname -s)
1616

1717
CC ?= gcc
18-
CFLAGS ?= -O3 -Wall -Wextra -Wpedantic
18+
CFLAGS ?= -O3 -Wall -Wextra -Wpedantic -Wstrict-prototypes -Wunused-function
1919
CFLAGS += -std=gnu99
2020
# uncomment to enable DEBUG symbols
2121
#CFLAGS += -ggdb -fsanitize=address

hcxdumptool.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2445,7 +2445,7 @@ if(memcmp(macfrx->addr3, macfrx->addr1, ETH_ALEN) == 0)
24452445
return;
24462446
}
24472447
/*---------------------------------------------------------------------------*/
2448-
static inline __attribute__((always_inline)) void send_80211_probereresponse_list()
2448+
static inline __attribute__((always_inline)) void send_80211_probereresponse_list(void)
24492449
{
24502450
static ssize_t ii;
24512451
static ieee80211_beacon_proberesponse_t *beacontx;
@@ -3377,7 +3377,7 @@ while(!wanteventflag)
33773377
return true;
33783378
}
33793379
/*---------------------------------------------------------------------------*/
3380-
static bool nl_scanloop_rcascan()
3380+
static bool nl_scanloop_rcascan(void)
33813381
{
33823382
static ssize_t i;
33833383
static int fd_epoll = 0;

hcxnmealog.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ static char nmeaoutbuffer[NMEA_SIZE] = { 0 };
8686
static u8 rx[PCAPNG_SNAPLEN * 2] = { 0 };
8787
static u8 rxbuffer[PCAPNG_SNAPLEN * 2] = { 0 };
8888
/*===========================================================================*/
89-
static void close_devices()
89+
static void close_devices(void)
9090
{
9191
if(fd_gps != 0) close(fd_gps);
9292
if(fd_socket_rx != 0)
@@ -350,9 +350,6 @@ else
350350
fprintf(stderr, "no GPS device selected\n");
351351
return EXIT_SUCCESS;
352352
}
353-
354-
355-
356353
return true;
357354
}
358355
/*===========================================================================*/
@@ -390,7 +387,7 @@ if(timerfd_settime(fd_timer, 0, &tval, NULL) == -1) return false;
390387
return true;
391388
}
392389
/*===========================================================================*/
393-
static void global_deinit()
390+
static void global_deinit(void)
394391
{
395392
static size_t i;
396393

0 commit comments

Comments
 (0)