mirror of
https://github.com/logicog/RTLPlayground.git
synced 2026-10-29 17:54:14 +08:00
port, httpd: parenthesise the mixed operators and drop a dead local
Compiling these two files for the host turns up warnings that SDCC does not print: four places mix & with | and two mix && with ||, and l2_delete keeps a counter it never reads. The parentheses only say what the compiler already does, so the generated code is unchanged. counter_to_html() reads the SFRs directly for the zero test, which saves 14 bytes of bank 1.
This commit is contained in:
1 parent
d6253ddc25
commit
674dc1f35d
2 files changed
+7
-9
No files matched your search
+1
-3
@@ -180,7 +180,7 @@ void reg_to_html_long(uint16_t reg)
|
||||
void counter_to_html(void)
|
||||
{
|
||||
reg_read_m(RTL837X_STAT_V_HIGH);
|
||||
if (sfr_data[0] | sfr_data[1] | sfr_data[2] | sfr_data[3]) {
|
||||
if (SFR_DATA_24 | SFR_DATA_16 | SFR_DATA_8 | SFR_DATA_0) {
|
||||
sfr_data_to_html();
|
||||
reg_to_html_long(RTL837X_STAT_V_LOW);
|
||||
} else {
|
||||
@@ -445,8 +445,6 @@ void l2_delete(uint16_t idx)
|
||||
slen = strtox(outbuf, HTTP_RESPONCE_JSON);
|
||||
dbg_string("L2 DELETE\n");
|
||||
dbg_short(idx);
|
||||
__xdata uint8_t entries_left = L2_MAX_TRANSFER;
|
||||
|
||||
do {
|
||||
reg_read(RTL837X_TBL_CTRL);
|
||||
} while (SFR_DATA_0 & TBL_EXECUTE);
|
||||
|
||||
Reference in new issue
Block a user