From 601d25cebc1ea324f45bdd9347565dd1032869fc Mon Sep 17 00:00:00 2001 From: Noel Eck Date: Thu, 3 Nov 2016 14:13:39 -0700 Subject: [PATCH] llvm: Fixed remaining warnings for llvm This commit addresses warnings emitted from the llvm compilers which were not encountered with gnu. Signed-off-by: Noel Eck --- src/am2315/am2315.hpp | 1 - src/bacnetmstp/device-client.c | 2 +- src/bmpx8x/bmpx8x.hpp | 1 - src/bmx055/bmm150.hpp | 2 -- src/gprs/gprs.cxx | 2 -- src/grovegprs/grovegprs.cxx | 2 -- src/hm11/hm11.cxx | 2 -- src/ili9341/ili9341.hpp | 2 -- src/nrf24l01/nrf24l01.hpp | 1 - src/pulsensor/pulsensor.hpp | 1 - src/t6713/t6713.hpp | 1 - src/tsl2561/tsl2561.c | 2 +- src/tsl2561/tsl2561.cxx | 2 +- 13 files changed, 3 insertions(+), 18 deletions(-) diff --git a/src/am2315/am2315.hpp b/src/am2315/am2315.hpp index 5d698824..39441503 100644 --- a/src/am2315/am2315.hpp +++ b/src/am2315/am2315.hpp @@ -197,7 +197,6 @@ class AM2315 { time_t m_last_time; int m_base_priority; - pthread_t this_thread; }; } diff --git a/src/bacnetmstp/device-client.c b/src/bacnetmstp/device-client.c index a6c0b976..3671f4e9 100644 --- a/src/bacnetmstp/device-client.c +++ b/src/bacnetmstp/device-client.c @@ -210,7 +210,7 @@ unsigned Device_Count( uint32_t Device_Index_To_Instance( unsigned index) { - index = index; + //index = index; return Object_Instance_Number; } diff --git a/src/bmpx8x/bmpx8x.hpp b/src/bmpx8x/bmpx8x.hpp index 2b995868..1a1dee4c 100644 --- a/src/bmpx8x/bmpx8x.hpp +++ b/src/bmpx8x/bmpx8x.hpp @@ -196,7 +196,6 @@ class BMPX8X : public IPressureSensor, public ITemperatureSensor { std::string m_name; int m_controlAddr; - int m_bus; mraa::I2c m_i2ControlCtx; uint8_t oversampling; diff --git a/src/bmx055/bmm150.hpp b/src/bmx055/bmm150.hpp index b9ec7db8..e692a833 100644 --- a/src/bmx055/bmm150.hpp +++ b/src/bmx055/bmm150.hpp @@ -594,8 +594,6 @@ namespace upm { private: bool m_isSPI; - // use the FIFO by default? - bool m_useFIFO; // return a reference to a gpio pin pointer depending on intr mraa::Gpio*& getPin(INTERRUPT_PINS_T intr); diff --git a/src/gprs/gprs.cxx b/src/gprs/gprs.cxx index 7a4bb45e..9a51f094 100644 --- a/src/gprs/gprs.cxx +++ b/src/gprs/gprs.cxx @@ -29,8 +29,6 @@ using namespace upm; using namespace std; -static const int defaultDelay = 100; // max wait time for read - GPRS::GPRS(int uart) : m_uart(uart) { diff --git a/src/grovegprs/grovegprs.cxx b/src/grovegprs/grovegprs.cxx index 8634cd48..defd92aa 100644 --- a/src/grovegprs/grovegprs.cxx +++ b/src/grovegprs/grovegprs.cxx @@ -29,8 +29,6 @@ using namespace upm; using namespace std; -static const int defaultDelay = 100; // max wait time for read - GroveGPRS::GroveGPRS(int uart) : m_uart(uart) { diff --git a/src/hm11/hm11.cxx b/src/hm11/hm11.cxx index 5993a224..b03e4fc7 100644 --- a/src/hm11/hm11.cxx +++ b/src/hm11/hm11.cxx @@ -31,8 +31,6 @@ using namespace upm; using namespace std; -static const int defaultDelay = 100; // max wait time for read - HM11::HM11(int uart) { m_ttyFd = -1; diff --git a/src/ili9341/ili9341.hpp b/src/ili9341/ili9341.hpp index d9d6b473..1e95ec1e 100644 --- a/src/ili9341/ili9341.hpp +++ b/src/ili9341/ili9341.hpp @@ -330,8 +330,6 @@ namespace upm { mraa::Result rstLow(); private: - uint8_t m_spiBuffer[32]; - mraa::Gpio m_csLCDPinCtx; mraa::Gpio m_csSDPinCtx; mraa::Gpio m_dcPinCtx; diff --git a/src/nrf24l01/nrf24l01.hpp b/src/nrf24l01/nrf24l01.hpp index 9a386624..e0ec66ce 100644 --- a/src/nrf24l01/nrf24l01.hpp +++ b/src/nrf24l01/nrf24l01.hpp @@ -420,7 +420,6 @@ class NRF24L01 { uint8_t m_power; uint8_t m_ptx; uint8_t m_payload; - uint8_t m_localAddress[5]; mraa::Gpio m_csnPinCtx; mraa::Gpio m_cePinCtx; diff --git a/src/pulsensor/pulsensor.hpp b/src/pulsensor/pulsensor.hpp index de1144b2..8193945f 100644 --- a/src/pulsensor/pulsensor.hpp +++ b/src/pulsensor/pulsensor.hpp @@ -104,7 +104,6 @@ private: uint8_t is_pulse; /**< Is pulse check */ uint8_t first_beat; /**< First heartbeat */ uint8_t second_beat; /**< Second heartbeat */ - uint8_t pin; /**< Pin */ uint8_t ret; /**< Return value */ mraa::Aio pin_ctx; /**< The pin context */ #if defined(SWIGJAVA) || defined(JAVACALLBACK) diff --git a/src/t6713/t6713.hpp b/src/t6713/t6713.hpp index 6c9c50af..603a3dac 100644 --- a/src/t6713/t6713.hpp +++ b/src/t6713/t6713.hpp @@ -141,7 +141,6 @@ class T6713 : public ICO2Sensor { uint16_t getSensorData (t6713_co2::MODBUS_COMMANDS cmd); t6713_co2::STATUS getStatus(); - int bus; mraa::I2c* i2c; mraa::Result status; }; diff --git a/src/tsl2561/tsl2561.c b/src/tsl2561/tsl2561.c index 4f2d7b64..700e53fd 100644 --- a/src/tsl2561/tsl2561.c +++ b/src/tsl2561/tsl2561.c @@ -209,7 +209,7 @@ upm_result_t tsl2561_compute_lux(const tsl2561_context dev, int *int_data) { // round the ratio value int64_t ratio = (ratio_1 + 1) >> 1; - unsigned int b, m; + unsigned int b = 0, m = 0; // CS package // Check if ratio <= eachBreak ? diff --git a/src/tsl2561/tsl2561.cxx b/src/tsl2561/tsl2561.cxx index 290b8fcf..04fad899 100644 --- a/src/tsl2561/tsl2561.cxx +++ b/src/tsl2561/tsl2561.cxx @@ -154,7 +154,7 @@ TSL2561::getLux() // round the ratio value int64_t ratio = (ratio1 + 1) >> 1; - unsigned int b, m; + unsigned int b = 0, m = 0; // CS package // Check if ratio <= eachBreak ?