Skip to content

Commit 857a9fb

Browse files
committed
fix warns
1 parent 6ebbac4 commit 857a9fb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Adafruit_LSM303_Accel.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ void Adafruit_LSM303_Accel_Unified::readRawData() {
274274
*/
275275
/**************************************************************************/
276276
float Adafruit_LSM303_Accel_Unified::getLSB(lsm303_accel_mode_t mode) {
277-
float lsb;
277+
float lsb = 0;
278278
lsm303_accel_range_t range = getRange();
279279
if (mode == LSM303_MODE_NORMAL) {
280280
switch (range) {
@@ -335,7 +335,7 @@ float Adafruit_LSM303_Accel_Unified::getLSB(lsm303_accel_mode_t mode) {
335335
*/
336336
/**************************************************************************/
337337
uint8_t Adafruit_LSM303_Accel_Unified::getShift(lsm303_accel_mode_t mode) {
338-
uint8_t shift;
338+
uint8_t shift = 0;
339339
switch (mode) {
340340
case LSM303_MODE_HIGH_RESOLUTION:
341341
shift = 4;

0 commit comments

Comments
 (0)