Hi,
I'm attempting to compile the sample program tzcfg101.ino using the Particle web ide. I'm receiving the following error.
Thanks for the help!
Tim
lib/TzCfg/src/TzCfg.cpp: In member function 'void TzCfg::eraseTzEeprom()':
lib/TzCfg/src/TzCfg.cpp:260:43: warning: 'void* memset(void*, int, size_t)' writing to an object of type 'class TzBlock' with no trivial copy-assignment [-Wclass-memaccess]
260 | memset(&tzBlk, 0xFF, sizeof(tzBlk));
| ^
In file included from lib/TzCfg/src/TzCfg.cpp:1:
lib/TzCfg/src/TzCfg.h:14:7: note: 'class TzBlock' declared here
14 | class TzBlock {
| ^~~~~~~
lib/TzCfg/src/TzCfg.cpp: In member function 'int TzCfg::setLocalTime(uint8_t)':
lib/TzCfg/src/TzCfg.cpp:331:52: error: call of overloaded 'String(time_t&)' is ambiguous
331 | strncat(hostPath, String(tzWeb.tranTime), sizeof(hostPath));
| ^
In file included from ../wiring/inc/spark_wiring_stream.h:30,
from ../wiring/inc/spark_wiring.h:40,
from ./inc/application.h:42,
from lib/TzCfg/src/TzCfg.h:3,
from lib/TzCfg/src/TzCfg.cpp:1:
../wiring/inc/spark_wiring_string.h:85:14: note: candidate: 'String::String(double, int)'
85 | explicit String(double, int decimalPlaces=6);
| ^~~~~~
../wiring/inc/spark_wiring_string.h:84:14: note: candidate: 'String::String(float, int)'
84 | explicit String(float, int decimalPlaces=6);
| ^~~~~~
../wiring/inc/spark_wiring_string.h:83:11: note: candidate: 'String::String(long unsigned int, unsigned char)'
83 | explicit String(unsigned long, unsigned char base=10);
| ^~~~~~
../wiring/inc/spark_wiring_string.h:82:11: note: candidate: 'String::String(long int, unsigned char)'
82 | explicit String(long, unsigned char base=10);
| ^~~~~~
../wiring/inc/spark_wiring_string.h:81:11: note: candidate: 'String::String(unsigned int, unsigned char)'
81 | explicit String(unsigned int, unsigned char base=10);
| ^~~~~~
../wiring/inc/spark_wiring_string.h:80:11: note: candidate: 'String::String(int, unsigned char)'
80 | explicit String(int, unsigned char base=10);
| ^~~~~~
../wiring/inc/spark_wiring_string.h:79:11: note: candidate: 'String::String(unsigned char, unsigned char)'
79 | explicit String(unsigned char, unsigned char base=10);
| ^~~~~~
../wiring/inc/spark_wiring_string.h:78:11: note: candidate: 'String::String(char)'
78 | explicit String(char c);
| ^~~~~~
../wiring/inc/spark_wiring_string.h:76:2: note: candidate: 'String::String(StringSumHelper&&)'
76 | String(StringSumHelper &&rval);
| ^~~~~~
../wiring/inc/spark_wiring_string.h:75:2: note: candidate: 'String::String(String&&)'
75 | String(String &&rval);
| ^~~~~~
../wiring/inc/spark_wiring_string.h:71:2: note: candidate: 'String::String(const String&)'
71 | String(const String &str);
| ^~~~~~
lib/TzCfg/src/TzCfg.cpp:314:16: warning: 'char* strncat(char*, const char*, size_t)' specified bound 193 equals destination size [-Wstringop-overflow=]
314 | strncat(hostPath, "&format=json", sizeof(hostPath));
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/TzCfg/src/TzCfg.cpp:318:24: warning: 'char* strncat(char*, const char*, size_t)' specified bound 193 equals destination size [-Wstringop-overflow=]
318 | strncat(hostPath, "&by=zone&zone=", sizeof(hostPath));
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/TzCfg/src/TzCfg.cpp:322:24: warning: 'char* strncat(char*, const char*, size_t)' specified bound 193 equals destination size [-Wstringop-overflow=]
322 | strncat(hostPath, "&by=position&lat=", sizeof(hostPath));
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/TzCfg/src/TzCfg.cpp:324:24: warning: 'char* strncat(char*, const char*, size_t)' specified bound 193 equals destination size [-Wstringop-overflow=]
324 | strncat(hostPath, "&lng=", sizeof(hostPath));
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/TzCfg/src/TzCfg.cpp:330:20: warning: 'char* strncat(char*, const char*, size_t)' specified bound 193 equals destination size [-Wstringop-overflow=]
330 | strncat(hostPath, "&time=", sizeof(hostPath));
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../build/module.mk:286: recipe for target '../build/target/user/platform-6-mTzCfg/src/TzCfg.o' failed
make[2]: *** [../build/target/user/platform-6-mTzCfg/src/TzCfg.o] Error 1
make[2]: Leaving directory '/firmware/user'
../../../build/recurse.mk:11: recipe for target 'user' failed
make[1]: Leaving directory '/firmware/modules/photon/user-part'
make[1]: *** [user] Error 2
../build/recurse.mk:11: recipe for target 'modules/photon/user-part' failed
make: *** [modules/photon/user-part] Error 2