Skip to content

Commit dbb0b7e

Browse files
authored
Merge pull request #15 from sparkfun/Fix_warnings_as_errors
Fix compiler warnings-as-errors
2 parents 59e841f + 2427743 commit dbb0b7e

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/SparkFun_Unicore_GNSS_Arduino_Library.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ void UM980::enablePrintParserTransitions()
308308
bool UM980::updateOnce()
309309
{
310310
const char *endName;
311-
const char *startName;
311+
const char *startName = nullptr;
312312
SEMP_PARSE_ROUTINE startState;
313313

314314
if (serialAvailable())
@@ -337,6 +337,9 @@ bool UM980::updateOnce()
337337
}
338338
return (true);
339339
}
340+
341+
(void)startState; // Fix pesky warning-as-error
342+
340343
return (false);
341344
}
342345

@@ -359,7 +362,7 @@ void UM980::dumpBuffer(const uint8_t *buffer, uint16_t length)
359362
bytes = 16 - (offset & 0xf);
360363

361364
// Display the offset
362-
sprintf(line, "0x%08lx: ", offset);
365+
sprintf(line, "0x%08lx: ", (long unsigned int)offset);
363366

364367
// Skip leading bytes
365368
for (index = 0; index < (offset & 0xf); index++)

0 commit comments

Comments
 (0)