add braces around potentially-empty (debug) else branches
the compiler advises "suggest braces around empty body in an 'else' statement [-Wempty-body]". We follow.
This commit is contained in:
@@ -254,8 +254,9 @@ class I2SSource : public AudioSource {
|
|||||||
|
|
||||||
if (_i2sMaster == false) {
|
if (_i2sMaster == false) {
|
||||||
DEBUG_PRINTLN(F("AR: Warning - i2S SLAVE mode is experimental!"));
|
DEBUG_PRINTLN(F("AR: Warning - i2S SLAVE mode is experimental!"));
|
||||||
if ((_config.mode & I2S_MODE_MASTER) != 0)
|
if ((_config.mode & I2S_MODE_MASTER) != 0) {
|
||||||
DEBUG_PRINTLN("AR: (oops) I2S SLAVE mode requested but not configured!");
|
DEBUG_PRINTLN("AR: (oops) I2S SLAVE mode requested but not configured!");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reserve the master clock pin if provided
|
// Reserve the master clock pin if provided
|
||||||
@@ -289,12 +290,14 @@ class I2SSource : public AudioSource {
|
|||||||
DEBUGSR_PRINTF("AR: I2S#0 driver %s aPLL; fixed_mclk=%d.\n", _config.use_apll? "uses":"without", _config.fixed_mclk);
|
DEBUGSR_PRINTF("AR: I2S#0 driver %s aPLL; fixed_mclk=%d.\n", _config.use_apll? "uses":"without", _config.fixed_mclk);
|
||||||
DEBUGSR_PRINTF("AR: %d bits, Sample scaling factor = %6.4f\n", _config.bits_per_sample, _sampleScale);
|
DEBUGSR_PRINTF("AR: %d bits, Sample scaling factor = %6.4f\n", _config.bits_per_sample, _sampleScale);
|
||||||
if(_config.mode & I2S_MODE_MASTER) {
|
if(_config.mode & I2S_MODE_MASTER) {
|
||||||
if (_config.mode & I2S_MODE_PDM)
|
if (_config.mode & I2S_MODE_PDM) {
|
||||||
DEBUGSR_PRINTLN(F("AR: I2S#0 driver installed in PDM MASTER mode."));
|
DEBUGSR_PRINTLN(F("AR: I2S#0 driver installed in PDM MASTER mode."));
|
||||||
else
|
} else {
|
||||||
DEBUGSR_PRINTLN(F("AR: I2S#0 driver installed in MASTER mode."));
|
DEBUGSR_PRINTLN(F("AR: I2S#0 driver installed in MASTER mode."));
|
||||||
} else
|
}
|
||||||
|
} else {
|
||||||
DEBUGSR_PRINTLN(F("AR: I2S#0 driver installed in SLAVE mode."));
|
DEBUGSR_PRINTLN(F("AR: I2S#0 driver installed in SLAVE mode."));
|
||||||
|
}
|
||||||
|
|
||||||
err = i2s_set_pin(I2S_NUM_0, &_pinConfig);
|
err = i2s_set_pin(I2S_NUM_0, &_pinConfig);
|
||||||
if (err != ESP_OK) {
|
if (err != ESP_OK) {
|
||||||
|
|||||||
@@ -1496,11 +1496,12 @@ public:
|
|||||||
Symbol* var_symbol = current_scope->lookup(variable_name); //lookup here and parent scopes
|
Symbol* var_symbol = current_scope->lookup(variable_name); //lookup here and parent scopes
|
||||||
if (node == F_VarRef)
|
if (node == F_VarRef)
|
||||||
{
|
{
|
||||||
if (var_symbol == nullptr)
|
if (var_symbol == nullptr) {
|
||||||
WARNING_ARTI("%s VarRef %s ID not found in scope of %s\n", spaces+50-depth, variable_name, current_scope->scope_name);
|
WARNING_ARTI("%s VarRef %s ID not found in scope of %s\n", spaces+50-depth, variable_name, current_scope->scope_name);
|
||||||
//only warning: value 0 in interpreter (div 0 is captured)
|
//only warning: value 0 in interpreter (div 0 is captured)
|
||||||
else
|
} else {
|
||||||
ANDBG_ARTI("%s VarRef found %s.%s (%u)\n", spaces+50-depth, var_symbol->scope->scope_name, variable_name, depth);
|
ANDBG_ARTI("%s VarRef found %s.%s (%u)\n", spaces+50-depth, var_symbol->scope->scope_name, variable_name, depth);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else //assign and var/formal
|
else //assign and var/formal
|
||||||
{
|
{
|
||||||
@@ -2007,8 +2008,9 @@ public:
|
|||||||
// valueStack->push(callResult);
|
// valueStack->push(callResult);
|
||||||
|
|
||||||
} //function_symbol != nullptr
|
} //function_symbol != nullptr
|
||||||
else
|
else {
|
||||||
RUNLOG_ARTI("%s %s not found %s\n", spaces+50-depth, key, function_name);
|
RUNLOG_ARTI("%s %s not found %s\n", spaces+50-depth, key, function_name);
|
||||||
|
}
|
||||||
} //external functions
|
} //external functions
|
||||||
|
|
||||||
visitedAlready = true;
|
visitedAlready = true;
|
||||||
@@ -2276,8 +2278,9 @@ public:
|
|||||||
valueStack->push(-valueStack->floatStack[oldIndex + 1]);
|
valueStack->push(-valueStack->floatStack[oldIndex + 1]);
|
||||||
RUNLOG_ARTI("%s unary - %f (push %u)\n", spaces+50-depth, valueStack->floatStack[oldIndex + 1], valueStack->stack_index );
|
RUNLOG_ARTI("%s unary - %f (push %u)\n", spaces+50-depth, valueStack->floatStack[oldIndex + 1], valueStack->stack_index );
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
RUNLOG_ARTI("%s unary operator not supported %u %s\n", spaces+50-depth, operatorx, tokenToString(operatorx));
|
RUNLOG_ARTI("%s unary operator not supported %u %s\n", spaces+50-depth, operatorx, tokenToString(operatorx));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
visitedAlready = true;
|
visitedAlready = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user