s3ler / linux-mqtt-sn-gateway Goto Github PK
View Code? Open in Web Editor NEWLinux based MQTT-SN Gateway
Linux based MQTT-SN Gateway
After cloning with git i use this command cmake -G"Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug -DTRANSMISSION_PROTOCOL=TELNET
then I have the following output error when i try to do make linux-mqtt-sn-gateway
.
[ 41%] Built target PahoLinuxMqttMessageHandler
[ 64%] Built target core-mqtt-sn-gateway
[ 74%] Built target arduino-linux-abstraction
[ 77%] Building CXX object CMakeFiles/lib-linux-mqtt-sn-gateway.dir/src/Implementation/Telnet/LinuxTelnetSocket.cpp.o
In file included from /Users/bng/mqttsn/testGateway/linux-mqtt-sn-gateway/src/Implementation/Telnet/LinuxTelnetSocket.cpp:5:
In file included from /Users/bng/mqttsn/testGateway/linux-mqtt-sn-gateway/src/Implementation/Telnet/LinuxTelnetSocket.h:9:
In file included from /Users/bng/mqttsn/testGateway/linux-mqtt-sn-gateway/src/core-mqtt-sn-gateway/src/SocketInterface.h:10:
In file included from /Users/bng/mqttsn/testGateway/linux-mqtt-sn-gateway/src/core-mqtt-sn-gateway/src/MqttSnMessageHandler.h:10:
In file included from /Users/bng/mqttsn/testGateway/linux-mqtt-sn-gateway/src/core-mqtt-sn-gateway/src/CoreInterface.h:6:
/Users/bng/mqttsn/testGateway/linux-mqtt-sn-gateway/src/core-mqtt-sn-gateway/src/mqttsn_messages.h:172:32: warning: 'memset' call operates on objects of
type 'msg_willtopic' while the size is based on a different type 'msg_willtopic *' [-Wsizeof-pointer-memaccess]
memset(this, 0, sizeof(this));
~~~~ ^~~~
/Users/bng/mqttsn/testGateway/linux-mqtt-sn-gateway/src/core-mqtt-sn-gateway/src/mqttsn_messages.h:172:32: note: did you mean to dereference the argument to
'sizeof' (and multiply it by the number of elements)?
memset(this, 0, sizeof(this));
^~~~
/Users/bng/mqttsn/testGateway/linux-mqtt-sn-gateway/src/core-mqtt-sn-gateway/src/mqttsn_messages.h:192:32: warning: 'memset' call operates on objects of
type 'msg_willmsg' while the size is based on a different type 'msg_willmsg *' [-Wsizeof-pointer-memaccess]
memset(this, 0, sizeof(this));
~~~~ ^~~~
/Users/bng/mqttsn/testGateway/linux-mqtt-sn-gateway/src/core-mqtt-sn-gateway/src/mqttsn_messages.h:192:32: note: did you mean to dereference the argument to
'sizeof' (and multiply it by the number of elements)?
memset(this, 0, sizeof(this));
^~~~
/Users/bng/mqttsn/testGateway/linux-mqtt-sn-gateway/src/core-mqtt-sn-gateway/src/mqttsn_messages.h:249:32: warning: 'memset' call operates on objects of
type 'msg_publish' while the size is based on a different type 'msg_publish *' [-Wsizeof-pointer-memaccess]
memset(this, 0, sizeof(this));
~~~~ ^~~~
/Users/bng/mqttsn/testGateway/linux-mqtt-sn-gateway/src/core-mqtt-sn-gateway/src/mqttsn_messages.h:249:32: note: did you mean to dereference the argument to
'sizeof' (and multiply it by the number of elements)?
memset(this, 0, sizeof(this));
^~~~
/Users/bng/mqttsn/testGateway/linux-mqtt-sn-gateway/src/core-mqtt-sn-gateway/src/mqttsn_messages.h:320:32: warning: 'memset' call operates on objects of
type 'msg_subscribe_shorttopic' while the size is based on a different type 'msg_subscribe_shorttopic *' [-Wsizeof-pointer-memaccess]
memset(this, 0, sizeof(this));
~~~~ ^~~~
/Users/bng/mqttsn/testGateway/linux-mqtt-sn-gateway/src/core-mqtt-sn-gateway/src/mqttsn_messages.h:320:32: note: did you mean to dereference the argument to
'sizeof' (and multiply it by the number of elements)?
memset(this, 0, sizeof(this));
^~~~
/Users/bng/mqttsn/testGateway/linux-mqtt-sn-gateway/src/core-mqtt-sn-gateway/src/mqttsn_messages.h:355:32: warning: 'memset' call operates on objects of
type 'msg_subscribe_topicname' while the size is based on a different type 'msg_subscribe_topicname *' [-Wsizeof-pointer-memaccess]
memset(this, 0, sizeof(this));
~~~~ ^~~~
/Users/bng/mqttsn/testGateway/linux-mqtt-sn-gateway/src/core-mqtt-sn-gateway/src/mqttsn_messages.h:355:32: note: did you mean to dereference the argument to
'sizeof' (and multiply it by the number of elements)?
memset(this, 0, sizeof(this));
^~~~
/Users/bng/mqttsn/testGateway/linux-mqtt-sn-gateway/src/Implementation/Telnet/LinuxTelnetSocket.cpp:103:1: warning: control may reach end of non-void
function [-Wreturn-type]
}
^
/Users/bng/mqttsn/testGateway/linux-mqtt-sn-gateway/src/Implementation/Telnet/LinuxTelnetSocket.cpp:109:9: warning: logical not is only applied to the left
hand side of this comparison [-Wlogical-not-parentheses]
if (!(sock = socket(AF_INET, SOCK_STREAM, 0)) > 0) {
^ ~
/Users/bng/mqttsn/testGateway/linux-mqtt-sn-gateway/src/Implementation/Telnet/LinuxTelnetSocket.cpp:109:9: note: add parentheses after the '!' to evaluate
the comparison first
if (!(sock = socket(AF_INET, SOCK_STREAM, 0)) > 0) {
^
( )
/Users/bng/mqttsn/testGateway/linux-mqtt-sn-gateway/src/Implementation/Telnet/LinuxTelnetSocket.cpp:109:9: note: add parentheses around left hand side
expression to silence this warning
if (!(sock = socket(AF_INET, SOCK_STREAM, 0)) > 0) {
^
( )
/Users/bng/mqttsn/testGateway/linux-mqtt-sn-gateway/src/Implementation/Telnet/LinuxTelnetSocket.cpp:593:21: error: implicit instantiation of undefined
template 'std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >'
std::string s = std::to_string(address->bytes[i]);
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/iosfwd:193:33: note: template is declared here
class _LIBCPP_TYPE_VIS_ONLY basic_string;
^
/Users/bng/mqttsn/testGateway/linux-mqtt-sn-gateway/src/Implementation/Telnet/LinuxTelnetSocket.cpp:610:21: error: implicit instantiation of undefined
template 'std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >'
std::string s = std::to_string(buf[i]);
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/iosfwd:193:33: note: template is declared here
class _LIBCPP_TYPE_VIS_ONLY basic_string;
^
7 warnings and 2 errors generated.
make[3]: *** [CMakeFiles/lib-linux-mqtt-sn-gateway.dir/src/Implementation/Telnet/LinuxTelnetSocket.cpp.o] Error 1
make[2]: *** [CMakeFiles/lib-linux-mqtt-sn-gateway.dir/all] Error 2
make[1]: *** [CMakeFiles/linux-mqtt-sn-gateway.dir/rule] Error 2
make: *** [linux-mqtt-sn-gateway] Error 2
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.