thiagoralves / openplc Goto Github PK
View Code? Open in Web Editor NEWSoftware for the OpenPLC - an open source industrial controller
License: GNU General Public License v3.0
Software for the OpenPLC - an open source industrial controller
License: GNU General Public License v3.0
From Unable to build OpenPLC emulator. C warning: no return statement in function on Stack Overflow:
I encountered a problem trying to run build.sh for OpenPCL master. I get three warnings and the build fails:
openplc.cpp: in function 'void* modbusThread openplc.cpp:52:1: warning: no return statement in function returning non-void [-Wreturn-type] persistent_storage.cpp: in function 'int readPersistentStorage()': persistent_storage.cpp:107:1 warning: control reaches end of non-void function [-Wreturn-type] server.cpp: in function 'void* handleConnections(void*)': server.cpp:138:1 warning: no return statement in function returning non-void [-Wreturn-type]
The OP did not state the failures.
Looking at some of the sources, like openplc.cpp:52
:
void *modbusThread(void *arg)
{
startServer(502);
}
It may be a good idea to clear the warnings so inexperienced folks don't have to attempt it. It looks like startServer
does not return a value:
$ grep -IR startServer
core/server.cpp:void startServer(int port)
core/openplc.cpp: startServer(502);
core/ladder.h:void startServer(int port);
So maybe change modbusThread
to something like:
void *modbusThread(void *arg)
{
startServer(502);
return nullptr;
}
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.