Skip to content

Commit b5c6d45

Browse files
committed
fix -std=gnu99-isms
1 parent fb2f317 commit b5c6d45

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

libs/network/esp8266/network_esp8266.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,8 @@ static void dumpEspConn(
343343
* socket can be found, return -1.
344344
*/
345345
static int getNextFreeSocket() {
346-
for (int i=0; i<MAX_SOCKETS; i++) {
346+
int i;
347+
for (i=0; i<MAX_SOCKETS; i++) {
347348
if (socketArray[i].state == SOCKET_STATE_UNUSED) {
348349
return i;
349350
}
@@ -455,7 +456,8 @@ static void releaseSocket(
455456
* Walk through each of the sockets and initialize each one.
456457
*/
457458
void netInit_esp8266_board() {
458-
for (int socketArrayIndex=0; socketArrayIndex<MAX_SOCKETS; socketArrayIndex++) {
459+
int socketArrayIndex;
460+
for (socketArrayIndex=0; socketArrayIndex<MAX_SOCKETS; socketArrayIndex++) {
459461
resetSocket(socketArrayIndex);
460462
} // End of for each socket
461463
} // netInit_esp8266_board

targets/esp8266/esp8266_board_utils.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@ void esp8266_board_writeString(
6262
) {
6363
assert(length==0 || buffer != NULL);
6464

65-
for (size_t i=0; i<length; i++) {
65+
size_t i;
66+
for (i=0; i<length; i++) {
6667
os_printf("%c", buffer[i]);
6768
}
6869
} // End of esp8266_board_writeString

targets/esp8266/jshardware.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,8 @@ void jshDelayMicroseconds(int microsec) {
108108
// for the given number of microseconds PLUS multiple calls back to the
109109
// WiFi environment.
110110
int count = microsec / MAX_SLEEP_TIME_US;
111-
for (int i=0; i<count; i++) {
111+
int i;
112+
for (i=0; i<count; i++) {
112113
os_delay_us(MAX_SLEEP_TIME_US);
113114
// We may have a problem here. It was my understanding that system_soft_wdt_feed() fed
114115
// the underlying OS but this appears not to be the case and all it does is prevent a

0 commit comments

Comments
 (0)