From 2df6700b2dfa4d46b2afe13e527d63c0be5824f3 Mon Sep 17 00:00:00 2001 From: Klaus K Wilting Date: Sat, 4 Aug 2018 18:13:42 +0200 Subject: [PATCH] macsniff.cpp fixed compiler warning --- platformio.ini | 2 +- src/macsniff.cpp | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/platformio.ini b/platformio.ini index 0cd42208..834e9770 100644 --- a/platformio.ini +++ b/platformio.ini @@ -52,7 +52,7 @@ build_flags = -D_lmic_config_h_ -include "src/paxcounter.conf" -include "src/hal/${PIOENV}.h" - -w +; -w [env:test] platform = ${common_env_data.platform_espressif32} diff --git a/src/macsniff.cpp b/src/macsniff.cpp index 29b1f1ad..faf5f583 100644 --- a/src/macsniff.cpp +++ b/src/macsniff.cpp @@ -46,10 +46,12 @@ bool mac_add(uint8_t *paddr, int8_t rssi, bool sniff_type) { char buff[16]; // temporary buffer for printf bool added = false; - int8_t beaconID; // beacon number in test monitor mode + int8_t beaconID; // beacon number in test monitor mode uint16_t hashedmac; // temporary buffer for generated hash value - uint32_t addr2int, - vendor2int; // temporary buffer for shortened MAC and Vendor OUI + uint32_t addr2int; // temporary buffer for shortened MAC +#ifdef VENDORFILTER + uinit32_t vendor2int; // temporary buffer for Vendor OUI +#endif // only last 3 MAC Address bytes are used for MAC address anonymization // but since it's uint32 we take 4 bytes to avoid 1st value to be 0