Skip to content

Commit 1e04762

Browse files
fix(example): Fix compilation warnings in examples (#10311)
* fix(example): Fix compilation warnings in examples * ci(pre-commit): Apply automatic fixes --------- Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
1 parent d846311 commit 1e04762

File tree

9 files changed

+21
-11
lines changed

9 files changed

+21
-11
lines changed

libraries/ESP32/examples/FreeRTOS/BasicMultiThreading/BasicMultiThreading.ino

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
// Please read file README.md in the folder containing this example.
88

99
#if CONFIG_FREERTOS_UNICORE
10-
#define ARDUINO_RUNNING_CORE 0
10+
#define TASK_RUNNING_CORE 0
1111
#else
12-
#define ARDUINO_RUNNING_CORE 1
12+
#define TASK_RUNNING_CORE 1
1313
#endif
1414

1515
#define ANALOG_INPUT_PIN A0
@@ -51,7 +51,7 @@ void setup() {
5151
,
5252
&analog_read_task_handle // With task handle we will be able to manipulate with this task.
5353
,
54-
ARDUINO_RUNNING_CORE // Core on which the task will run
54+
TASK_RUNNING_CORE // Core on which the task will run
5555
);
5656

5757
Serial.printf("Basic Multi Threading Arduino Example\n");

libraries/ESP32/examples/HWCDC_Events/ci.json

+5
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,10 @@
22
"targets": {
33
"esp32": false,
44
"esp32s2": false
5+
},
6+
"fqbn": {
7+
"esp32s3": [
8+
"espressif:esp32:esp32s3:USBMode=hwcdc,PartitionScheme=huge_app,FlashMode=dio"
9+
]
510
}
611
}

libraries/ESP32/examples/RMT/Legacy_RMT_Driver_Compatible/Legacy_RMT_Driver_Compatible.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#ifndef ESP32_ARDUINO_NO_RGB_BUILTIN
1111

1212
// add the file "build_opt.h" to your Arduino project folder with "-DESP32_ARDUINO_NO_RGB_BUILTIN" to use the RMT Legacy driver
13-
#error "ESP32_ARDUINO_NO_RGB_BUILTIN is not defined, this example is intended to demonstrate the RMT Legacy driver.
13+
#error "ESP32_ARDUINO_NO_RGB_BUILTIN is not defined, this example is intended to demonstrate the RMT Legacy driver."
1414
#error "Please add the file 'build_opt.h' with '-DESP32_ARDUINO_NO_RGB_BUILTIN' to your Arduino project folder."
1515
#error "Another way to disable the RGB_BUILTIN is to define it in the platformio.ini file, for instance: '-D ESP32_ARDUINO_NO_RGB_BUILTIN'"
1616

libraries/ESP_SR/examples/Basic/ci.json

+5
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,10 @@
55
"esp32c6": false,
66
"esp32h2": false,
77
"esp32s2": false
8+
},
9+
"fqbn": {
10+
"esp32s3": [
11+
"espressif:esp32:esp32s3:USBMode=default,PartitionScheme=esp_sr_16,FlashSize=16M,FlashMode=dio"
12+
]
813
}
914
}

libraries/Insights/examples/DiagnosticsSmokeTest/DiagnosticsSmokeTest.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ static void smoke_test() {
3636
Insights.event(TAG, "[count][%d]", count);
3737
} else {
3838
log_e("[count][%d] [crash_count][%" PRIu32 "] [excvaddr][0x0f] Crashing...", count, s_reset_count);
39-
*(int *)0x0F = 0x10;
39+
abort();
4040
}
4141
}
4242

libraries/USB/examples/MIDI/MidiInterface/MidiInterface.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ void loop() {
5050
}
5151

5252
// USB MIDI 1.0 to MIDI Serial 1.0
53-
midiEventPacket_t midi_packet_in = {0};
53+
midiEventPacket_t midi_packet_in = {0, 0, 0, 0};
5454
// See Chapter 4: USB-MIDI Event Packets (page 16) of the spec.
5555
int8_t cin_to_midix_size[16] = {-1, -1, 2, 3, 3, 1, 2, 3, 3, 3, 3, 3, 2, 2, 3, 1};
5656

libraries/USB/examples/MIDI/ReceiveMidi/ReceiveMidi.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ void setup() {
2828
}
2929

3030
void loop() {
31-
midiEventPacket_t midi_packet_in = {0};
31+
midiEventPacket_t midi_packet_in = {0, 0, 0, 0};
3232

3333
if (MIDI.readPacket(&midi_packet_in)) {
3434
printDetails(midi_packet_in);

libraries/Update/examples/AWS_S3_OTA_Update/AWS_S3_OTA_Update.ino

+2-2
Original file line numberDiff line numberDiff line change
@@ -178,11 +178,11 @@ void execOTA() {
178178
// Understand the partitions and
179179
// space availability
180180
Serial.println("Not enough space to begin OTA");
181-
client.flush();
181+
client.clear();
182182
}
183183
} else {
184184
Serial.println("There was no content in the response");
185-
client.flush();
185+
client.clear();
186186
}
187187
}
188188

libraries/WebServer/examples/HttpAuthCallbackInline/HttpAuthCallbackInline.ino

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ const char *password = "........";
99
WebServer server(80);
1010

1111
typedef struct credentials_t {
12-
char *username;
13-
char *password;
12+
const char *username;
13+
const char *password;
1414
} credentials_t;
1515

1616
credentials_t passwdfile[] = {{"admin", "esp32"}, {"fred", "41234123"}, {"charlie", "sdfsd"}, {"alice", "vambdnkuhj"}, {"bob", "svcdbjhws12"}, {NULL, NULL}};

0 commit comments

Comments
 (0)