Compile warning using SD library - unused variable

Possibly not a major problem, generates noise in the compile output
but does it indicate some missing error checks?

/Applications/Arduino.app/Contents/Java/libraries/SD/src/utility/SdFile.cpp: In static member function ‘static uint8_t SdFile::make83Name(const char*, uint8_t*)’:
/Applications/Arduino.app/Contents/Java/libraries/SD/src/utility/SdFile.cpp:261:15: warning: unused variable ‘b’ [-Wunused-variable]
uint8_t b;

from SdFile.cpp (just the function with the warning):

// format directory name field from a 8.3 name string
uint8_t SdFile::make83Name(const char* str, uint8_t* name) {
uint8_t c;
uint8_t n = 7; // max index for part before dot
uint8_t i = 0;
// blank fill name and extension
while (i < 11) name[i++] = ’ ';
i = 0;
while ((c = str++) != ‘\0’) {
if (c == ‘.’) {
if (n == 10) return false; // only one dot allowed
n = 10; // max index for full 8.3 name
i = 8; // place for extension
} else {
// illegal FAT characters
uint8_t b; <<<<< this is line 261 <<<<<<<<<<<<
#if defined(AVR)
PGM_P p = PSTR("|<>^+=?/[];,
"\");
while ((b = pgm_read_byte(p++))) if (b == c) return false;
#elif defined(arm)
const uint8_t valid = “|<>^+=?/;,*”\";
const uint8_t *p = valid;
while ((b = *p++)) if (b == c) return false;
#endif
// check size and only allow ASCII printable characters
if (i > n || c < 0X21 || c > 0X7E)return false;
// only upper case allowed in 8.3 names - convert lower to upper
name[i++] = c < ‘a’ || c > ‘z’ ? c : c + (‘A’ - ‘a’);
}
}
// must have a file name, extension is optional
return name[0] != ’ ';
}

Note that if neither AVR nor arm are defined, variable b is unused.
I am unfamiliar with the possible values that should be checked here, but the definition of b could be inside the if defined statements to eliminate the warning.

But perhaps there should be another test?

I am compiling for an Arduino 101.
IDE 1.6.16
Mac OS X 10.11.6
SD Library 1.1.1

But perhaps there should be another test?

No. There should be an else clause.

uint8_t b; <<<<< this is line 261 <<<<<<<<<<<<
#if defined(AVR)
PGM_P p = PSTR("|<>^+=?/;,"\");
while ((b = pgm_read_byte(p++))) if (b == c) return false;
#elif defined(arm)
const uint8_t valid[] = "|<>^+=?/[];,
"\";
const uint8_t *p = valid;
while ((b = *p++)) if (b == c) return false;
#else
b = b;
#endif