diff options
author | Hannes Ellinger <hannes.ellinger@eas.iis.fraunhofer.de> | 2015-10-16 14:54:14 +0200 |
---|---|---|
committer | Hannes Ellinger <hannes.ellinger@eas.iis.fraunhofer.de> | 2015-10-16 14:54:14 +0200 |
commit | e7cc36321ee2964a940e67543a3c5913ad628cb5 (patch) | |
tree | 77e0330f4f54bbaddbdb0d0ec0a14c2a854d93e6 /host/libubertooth | |
parent | da493ac018042a5c533def7ff40f9c73ac417fb2 (diff) |
fix build errors when using strict compiler flags
Diffstat (limited to 'host/libubertooth')
-rw-r--r-- | host/libubertooth/src/ubertooth.c | 19 | ||||
-rw-r--r-- | host/libubertooth/src/ubertooth.h | 3 |
2 files changed, 5 insertions, 17 deletions
diff --git a/host/libubertooth/src/ubertooth.c b/host/libubertooth/src/ubertooth.c index c337d22..34c78cf 100644 --- a/host/libubertooth/src/ubertooth.c +++ b/host/libubertooth/src/ubertooth.c @@ -596,7 +596,7 @@ void rx_file(FILE* fp, btbb_piconet* pn) /* * Sniff Bluetooth Low Energy packets. */ -void cb_btle(ubertooth_t* ut, void* args, usb_pkt_rx *rx, int bank) +void cb_btle(ubertooth_t* ut, void* args, usb_pkt_rx *rx, int bank __attribute__((unused))) { lell_packet * pkt; btle_options * opts = (btle_options *) args; @@ -607,8 +607,6 @@ void cb_btle(ubertooth_t* ut, void* args, usb_pkt_rx *rx, int bank) uint32_t refAA; int8_t sig, noise; - UNUSED(bank); - // display LE promiscuous mode state changes if (rx->pkt_type == LE_PROMISC) { u8 state = rx->data[0]; @@ -715,13 +713,11 @@ void cb_btle(ubertooth_t* ut, void* args, usb_pkt_rx *rx, int bank) /* * Sniff E-GO packets */ -void cb_ego(ubertooth_t* ut, void* args __attribute__((unused)), usb_pkt_rx *rx, int bank) +void cb_ego(ubertooth_t* ut __attribute__((unused)), void* args __attribute__((unused)), usb_pkt_rx *rx, int bank __attribute__((unused))) { int i; static u32 prev_ts = 0; - UNUSED(bank); - u32 rx_time = rx->clk100ns; if (rx_time < prev_ts) rx_time += 3276800000; // rollover @@ -745,13 +741,11 @@ void rx_btle_file(FILE* fp) stream_rx_file(fp, cb_btle, NULL); } -static void cb_dump_bitstream(ubertooth_t* ut, void* args, usb_pkt_rx *rx, int bank) +static void cb_dump_bitstream(ubertooth_t* ut, void* args __attribute__((unused)), usb_pkt_rx *rx, int bank) { int i; char nl = '\n'; - UNUSED(args); - unpack_symbols(rx->data, ut->br_symbols[bank]); // convert to ascii @@ -768,13 +762,10 @@ static void cb_dump_bitstream(ubertooth_t* ut, void* args, usb_pkt_rx *rx, int b } } -static void cb_dump_full(ubertooth_t* ut, void* args, usb_pkt_rx *rx, int bank) +static void cb_dump_full(ubertooth_t* ut __attribute__((unused)), void* args __attribute__((unused)), usb_pkt_rx *rx, int bank __attribute__((unused))) { uint8_t *buf = (uint8_t*)rx; - UNUSED(args); - UNUSED(bank); - fprintf(stderr, "rx block timestamp %u * 100 nanoseconds\n", rx->clk100ns); uint32_t time_be = htobe32((uint32_t)time(NULL)); if (dumpfile == NULL) { @@ -930,7 +921,7 @@ ubertooth_t* ubertooth_init() ut->usb_really_full = 0; ut->usb_retry = 1; ut->stop_ubertooth = 0; - ut->abs_start_ns; + ut->abs_start_ns = 0; ut->start_clk100ns = 0; ut->last_clk100ns = 0; ut->clk100ns_upper = 0; diff --git a/host/libubertooth/src/ubertooth.h b/host/libubertooth/src/ubertooth.h index 7bfc745..4802e93 100644 --- a/host/libubertooth/src/ubertooth.h +++ b/host/libubertooth/src/ubertooth.h @@ -25,9 +25,6 @@ #include "ubertooth_control.h" #include <btbb.h> -/* Mark unused variables to avoid gcc/clang warnings */ -#define UNUSED(x) (void)(x) - /* specan output types * see https://github.com/dkogan/feedgnuplot for plotter */ enum specan_modes { |