Skip to content

Commit d4e5206

Browse files
committed
Merge pull request #39 from adamgreen/fsGccWarnSilence
fs: Silence GCC signed/unsigned warnings
2 parents 3210ac9 + 5e4439b commit d4e5206

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

libraries/fs/sd/SDFileSystem.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ int SDFileSystem::_read(uint8_t *buffer, uint32_t length) {
356356
while (_spi.write(0xFF) != 0xFE);
357357

358358
// read data
359-
for (int i = 0; i < length; i++) {
359+
for (uint32_t i = 0; i < length; i++) {
360360
buffer[i] = _spi.write(0xFF);
361361
}
362362
_spi.write(0xFF); // checksum
@@ -374,7 +374,7 @@ int SDFileSystem::_write(const uint8_t*buffer, uint32_t length) {
374374
_spi.write(0xFE);
375375

376376
// write the data
377-
for (int i = 0; i < length; i++) {
377+
for (uint32_t i = 0; i < length; i++) {
378378
_spi.write(buffer[i]);
379379
}
380380

@@ -400,7 +400,7 @@ int SDFileSystem::_write(const uint8_t*buffer, uint32_t length) {
400400
static uint32_t ext_bits(unsigned char *data, int msb, int lsb) {
401401
uint32_t bits = 0;
402402
uint32_t size = 1 + msb - lsb;
403-
for (int i = 0; i < size; i++) {
403+
for (uint32_t i = 0; i < size; i++) {
404404
uint32_t position = lsb + i;
405405
uint32_t byte = 15 - (position >> 3);
406406
uint32_t bit = position & 0x7;

0 commit comments

Comments
 (0)