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

error when compiled #19

Open
wifi75 opened this issue Jul 29, 2020 · 2 comments
Open

error when compiled #19

wifi75 opened this issue Jul 29, 2020 · 2 comments

Comments

@wifi75
Copy link

wifi75 commented Jul 29, 2020

hello on ubuntu server after send command make clean && make
I get this error:

rm -f *.o sdm120c
gcc -c -o sdm120c.o sdm120c.c -O2 -Wall -g `pkg-config --cflags libmodbus`
sdm120c.c: In function ‘log_message’:
sdm120c.c:264:24: warning: format not a string literal and no format arguments [-Wformat-security]
        fprintf(stderr, buffer);
                        ^~~~~~
sdm120c.c:273:30: warning: format not a string literal and no format arguments [-Wformat-security]
             syslog(LOG_INFO, versionbuffer);
                              ^~~~~~~~~~~~~
sdm120c.c:276:30: warning: format not a string literal and no format arguments [-Wformat-security]
             syslog(LOG_INFO, parent);
                              ^~~~~~
sdm120c.c:277:30: warning: format not a string literal and no format arguments [-Wformat-security]
             syslog(LOG_INFO, cmdline);
                              ^~~~~~~
sdm120c.c:280:26: warning: format not a string literal and no format arguments [-Wformat-security]
         syslog(LOG_INFO, buffer);
                          ^~~~~~
gcc -o sdm120c sdm120c.o -O2 -Wall -g `pkg-config --libs libmodbus`
chmod 4711 sdm120c

what can I do?

@ehoutsma
Copy link

sudo make install?

I don't see any errors, only warnings.

gianfrdp added a commit that referenced this issue Jan 27, 2021
Fix for issues #16, #17, #19
@asarubbo
Copy link

With the updated version I think there is still an issue here:

syslog(LOG_INFO, buffer);

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

3 participants