Merge branch 'bugfix/btdm_compile_error_with_new_toolchain' into 'master'

components/bt: Fix compile error with new toolchain

See merge request espressif/esp-idf!5444
This commit is contained in:
Jiang Jiang Jian
2019-07-10 15:28:49 +08:00

View File

@@ -440,8 +440,9 @@ bool config_save(const config_t *config, const char *filename)
goto error; goto error;
} }
}else { }else {
uint count = (w_cnt_total / CONFIG_FILE_MAX_SIZE); int count = (w_cnt_total / CONFIG_FILE_MAX_SIZE);
for (int i = 0; i <= count; i++) assert(count <= 0xFF);
for (uint8_t i = 0; i <= count; i++)
{ {
snprintf(keyname, keyname_bufsz, "%s%d", CONFIG_KEY, i); snprintf(keyname, keyname_bufsz, "%s%d", CONFIG_KEY, i);
if (i == count) { if (i == count) {