Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation Error #136

Open
matrixall opened this issue Apr 29, 2023 · 1 comment
Open

Compilation Error #136

matrixall opened this issue Apr 29, 2023 · 1 comment

Comments

@matrixall
Copy link

Using Sonoff Basic Example
ArduinoJson 6.21.2

In file included from D:\Arduino\libraries\ESPHap-1.1\homekitintegrationcpp.cpp:5:
D:\Arduino\libraries\ESPHap-1.1\homeintegration.h:19: warning: "INFO" redefined
19 | #define INFO(message, ...) printf(">>> Home Integration: " message "\n", ##VA_ARGS)
|
In file included from D:\Arduino\libraries\ESPHap-1.1\homekitintegrationcpp.cpp:2:
D:\Arduino\libraries\ESPHap-1.1\esphap_debug.h:27: note: this is the location of the previous definition
27 | #define INFO(message, ...) printf_P(PSTR(">>> HomeKit: " message "\n"), ##VA_ARGS)
|
D:\Arduino\libraries\ESPHap-1.1\arduino_homekit_server.cpp: In function 'void send_tlv_response(client_context_t*, tlv_values_t*)':
D:\Arduino\libraries\ESPHap-1.1\arduino_homekit_server.cpp:1113:30: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
1113 | static char http_headers = "HTTP/1.1 200 OK\r\n"
| ^~~~~~~~~~~~~~~~~~~~~
1114 | "Content-Type: application/pairing+tlv8\r\n"
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1115 | "Content-Length: %d\r\n"
| ~~~~~~~~~~~~~~~~~~~~~~~~
1116 | "Connection: keep-alive\r\n\r\n";
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
D:\Arduino\libraries\ESPHap-1.1\arduino_homekit_server.cpp: In function 'void send_json_response(client_context_t
, int, byte*, size_t)':
D:\Arduino\libraries\ESPHap-1.1\arduino_homekit_server.cpp:1157:30: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
1157 | static char http_headers = "HTTP/1.1 %d %s\r\n"
| ^~~~~~~~~~~~~~~~~~~~
1158 | "Content-Type: application/hap+json\r\n"
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1159 | "Content-Length: %d\r\n"
| ~~~~~~~~~~~~~~~~~~~~~~~~
1160 | "Connection: keep-alive\r\n\r\n";
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
D:\Arduino\libraries\ESPHap-1.1\arduino_homekit_server.cpp: In function 'int homekit_get_accessory_id(char
, size_t)':
D:\Arduino\libraries\ESPHap-1.1\arduino_homekit_server.cpp:4201:6: error: control reaches end of non-void function [-Werror=return-type]
4201 | free(accessory_id);
| ~~~~^~~~~~~~~~~~~~
cc1plus.exe: some warnings being treated as errors
Multiple libraries were found for "WiFiManager.h"
Used: D:\Arduino\libraries\WiFiManager
Not used: D:\Arduino\libraries\WiFiManager-2.0.11-beta
exit status 1
Error compiling for board NodeMCU 1.0 (ESP-12E Module).

@matrixall
Copy link
Author

These steps seem to solve the issue:

  • Commenting Line 19 in homeintegration.h
  • Adding return 0; to int homekit_get_accessory_id in arduino_homekit_server.cpp (Line 4,213)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant