Skip to content

Commit fcd734a

Browse files
committed
Some fixes found by gcc 8
1 parent aa030e0 commit fcd734a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Diff for: cores/esp32/esp32-hal-i2c.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1142,7 +1142,7 @@ i2c_err_t i2cProcQueue(i2c_t * i2c, uint32_t *readCount, uint16_t timeOutMillis)
11421142
if(tdq->ctrl.addrReq ==2) { // 10bit address
11431143
taddr =((tdq->ctrl.addr >> 7) & 0xFE)
11441144
|tdq->ctrl.mode;
1145-
taddr = (taddr <<8) || (tdq->ctrl.addr&0xFF);
1145+
taddr = (taddr <<8) | (tdq->ctrl.addr&0xFF);
11461146
} else { // 7bit address
11471147
taddr = ((tdq->ctrl.addr<<1)&0xFE)
11481148
|tdq->ctrl.mode;

Diff for: cores/esp32/esp32-hal-time.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717

1818
static void setTimeZone(long offset, int daylight)
1919
{
20-
char cst[16] = {0};
21-
char cdt[16] = "DST";
22-
char tz[32] = {0};
20+
char cst[17] = {0};
21+
char cdt[17] = "DST";
22+
char tz[33] = {0};
2323

2424
if(offset % 3600){
2525
sprintf(cst, "UTC%ld:%02u:%02u", offset / 3600, abs((offset % 3600) / 60), abs(offset % 60));

0 commit comments

Comments
 (0)