mirror of
https://github.com/eclipse/upm.git
synced 2025-07-02 01:41:12 +03:00
Wunused-but-set-variable: Fixed all unused but set variables
This commit addresses all warnings emitted from -Wunused-but-set-variable in the C++ src. Signed-off-by: Noel Eck <noel.eck@intel.com>
This commit is contained in:
@ -60,13 +60,11 @@ LPD8806::LPD8806 (uint16_t pixelCount, uint8_t csn) : m_csnPinCtx(csn), m_spi(0)
|
||||
|
||||
uint8_t latchBytes;
|
||||
uint16_t dataBytes, totalBytes;
|
||||
uint16_t numBytes = 0;
|
||||
|
||||
dataBytes = m_pixelsCount * 3;
|
||||
latchBytes = (m_pixelsCount + 31) / 32;
|
||||
totalBytes = dataBytes + latchBytes;
|
||||
if ((m_pixels = (uint8_t *) malloc(totalBytes))) {
|
||||
numBytes = totalBytes;
|
||||
memset ( m_pixels , 0x80, dataBytes); // Init to RGB 'off' state
|
||||
memset (&m_pixels[dataBytes], 0 , latchBytes); // Clear latch bytes
|
||||
}
|
||||
|
Reference in New Issue
Block a user