Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 1412606

Browse filesBrowse files
Arsham Skrenesme-no-dev
Arsham Skrenes
authored andcommitted
Properly allocate string and remove warning (espressif#2652)
* Properly allocate string and remove warning The former way generates the following warning: ISO C++ forbids converting a string constant to 'char*' This change makes a character array the size of the string with null ending. It's clearer and gets rid of the warning. * Better way Since this is technically immutable, the type should reflect this too.
1 parent 25c0b52 commit 1412606
Copy full SHA for 1412606

File tree

1 file changed

+1
-1
lines changed
Filter options
  • libraries/ESP32/examples/ESPNow/Basic/Slave

1 file changed

+1
-1
lines changed

‎libraries/ESP32/examples/ESPNow/Basic/Slave/Slave.ino

Copy file name to clipboardExpand all lines: libraries/ESP32/examples/ESPNow/Basic/Slave/Slave.ino
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ void InitESPNow() {
5151

5252
// config AP SSID
5353
void configDeviceAP() {
54-
char* SSID = "Slave_1";
54+
const char *SSID = "Slave_1";
5555
bool result = WiFi.softAP(SSID, "Slave_1_Password", CHANNEL, 0);
5656
if (!result) {
5757
Serial.println("AP Config failed.");

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.