FirebaseExtended / firebase-arduino

Arduino samples for Firebase.
Apache License 2.0
948 stars 494 forks source link

Compilation error: exit status 1 #561

Open jameysu opened 1 year ago

jameysu commented 1 year ago
c:\Users\63938\Documents\Arduino\libraries\FirebaseArduino\src\Firebase.cpp: In member function 'int FirebaseRequest::sendRequest(const string&, const string&, char*, const string&, const string&)': c:\Users\63938\Documents\Arduino\libraries\FirebaseArduino\src\Firebase.cpp:78:1: error: no return statement in function returning non-void [-Werror=return-type] 78 } ^ c:\Users\63938\Documents\Arduino\libraries\FirebaseArduino\src\Firebase.cpp: In member function 'void FirebaseStream::startStreaming(const string&, const string&, const string&)': c:\Users\63938\Documents\Arduino\libraries\FirebaseArduino\src\Firebase.cpp:91:16: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 91 analyzeError("STREAM", status, path_with_auth); ^~~~ c:\Users\63938\Documents\Arduino\libraries\FirebaseArduino\src\FirebaseHttpClient_Esp8266.cpp: In member function 'virtual void FirebaseHttpClientEsp8266::begin(const string&)': c:\Users\63938\Documents\Arduino\libraries\FirebaseArduino\src\FirebaseHttpClient_Esp8266.cpp:47:50: error: no matching function for call to 'begin(const char*, const char [60])' 47 http_.begin(url.c_str(), kFirebaseFingerprint); ^ In file included from c:\Users\63938\Documents\Arduino\libraries\FirebaseArduino\src\FirebaseHttpClient_Esp8266.cpp:9: C:\Users\63938\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\ESP8266HTTPClient\src/ESP8266HTTPClient.h:166:10: note: candidate: 'bool HTTPClient::begin(String, uint16_t, String)' (near match) 166 bool begin(String host, uint16_t port, String uri = "/") attribute ((error("obsolete API, use ::begin(WiFiClient, host, port, uri)"))); ^~~~~ C:\Users\63938\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\ESP8266HTTPClient\src/ESP8266HTTPClient.h:166:10: note: conversion of argument 2 would be ill-formed: c:\Users\63938\Documents\Arduino\libraries\FirebaseArduino\src\FirebaseHttpClient_Esp8266.cpp:47:30: error: invalid conversion from 'const char*' to 'uint16_t' {aka 'short unsigned int'} [-fpermissive] 47 http_.begin(url.c_str(), kFirebaseFingerprint); ^~~~~~~~
const char*
In file included from c:\Users\63938\Documents\Arduino\libraries\FirebaseArduino\src\FirebaseHttpClient_Esp8266.cpp:9: C:\Users\63938\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\ESP8266HTTPClient\src/ESP8266HTTPClient.h:167:10: note: candidate: 'bool HTTPClient::begin(String, const uint8_t*)' (near match) 167 bool begin(String url, const uint8_t httpsFingerprint[20]) attribute ((error("obsolete API, use ::begin(WiFiClientSecure, ...)"))); ^~~~~ C:\Users\63938\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\ESP8266HTTPClient\src/ESP8266HTTPClient.h:167:10: note: conversion of argument 2 would be ill-formed: c:\Users\63938\Documents\Arduino\libraries\FirebaseArduino\src\FirebaseHttpClient_Esp8266.cpp:47:30: error: invalid conversion from 'const char' to 'const uint8_t' {aka 'const unsigned char*'} [-fpermissive] 47 http_.begin(url.c_str(), kFirebaseFingerprint); ^~~~~~~~
const char*
c:\Users\63938\Documents\Arduino\libraries\FirebaseArduino\src\FirebaseHttpClient_Esp8266.cpp: In member function 'virtual void FirebaseHttpClientEsp8266::begin(const string&, const string&)': c:\Users\63938\Documents\Arduino\libraries\FirebaseArduino\src\FirebaseHttpClient_Esp8266.cpp:51:60: error: invalid conversion from 'const char' to 'const uint8_t' {aka 'const unsigned char*'} [-fpermissive] 51 http_.begin(host.c_str(), kFirebasePort, path.c_str(), kFirebaseFingerprint); ^~~~~~~~
const char*

In file included from c:\Users\63938\Documents\Arduino\libraries\FirebaseArduino\src\FirebaseHttpClient_Esp8266.cpp:9: C:\Users\63938\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\ESP8266HTTPClient\src/ESP8266HTTPClient.h:168:70: note: initializing argument 4 of 'bool HTTPClient::begin(String, uint16_t, String, const uint8_t*)' 168 | bool begin(String host, uint16_t port, String uri, const uint8_t httpsFingerprint[20]) attribute ((error("obsolete API, use ::begin(WiFiClientSecure, ...)"))); | ~~~~^~~~~~ cc1plus.exe: some warnings being treated as errors

exit status 1

Compilation error: exit status 1