On 12/05/2017 12:16, Christian Beer wrote: > On 12.05.2017 12:05, Vitalii Koshura wrote: >> Hello Gianfranco, >> >> We have Travis CI for continuous builds and it is not failed. >> Could you please take a look why Travis built it ok and you got errors? > My guess is that there is a compiler option that warns about format > errors which is treated as an error because of another option and both > are not activated in our default build but they are on the debian build. > I thought it's a compiler vresion issue but my gcc 6 doesn't even warn > me about this. The travis build uses gcc 4 I think.
I had seen it in past versions of the BOINC client and the one or other app - I recall some history on using "printf" without a format. That is fine for string literals like 'printf("huhu")' but you cannot just do "char *c="huhu"; printf(c);". Or, to be more precise, you apparently can but you should not, really, it should be printf("%s",c), instead. The compiler says just that and Debian rebuilds enforce compiler settings that do not allow it to pass. Debian refers to this as "hardening", where there is more on https://wiki.debian.org/Hardening . You may want to discuss adding those flags for your travis builds, too. Cheers, Steffen >> 2017-05-12 12:20 GMT+03:00 Gianfranco Costamagna < >> costamagnagianfra...@yahoo.it>: >> >>> Hello David, >>> >>> boinc_client-app.o `test -f 'app.cpp' || echo './'`app.cpp >>> /usr/bin/g++ -DHAVE_CONFIG_H -I. -I.. -I.. -I../api -I../db -I../lib >>> -I../lib/mac -I../sched -I../tools -I../vda -pthread -Wdate-time >>> -D_FORTIFY_SOURCE=2 -Wall -Wextra -Wshadow -Wredundant-decls >>> -Wdisabled-optimization -Wpointer-arith -Wstrict-aliasing -Wcast-align >>> -I/usr/include -I/usr/include/openssl -g -O3 -fdebug-prefix-map=/<< >>> BUILDDIR>>/boinc-7.7.0+dfsg~git20170511+r23716~r6~ubuntu16.10.1=. -fPIE >>> -fstack-protector-strong -Wformat -Werror=format-security -Wall -O3 >>> -funroll-loops -fforce-addr -ffast-math -flto -Wall -c -o >>> boinc_client-app_config.o `test -f 'app_config.cpp' || echo >>> './'`app_config.cpp >>> app_config.cpp: In function ‘void >>> print_msgs(std::vector<std::__cxx11::basic_string<char> >>>> , PROJECT*)’: >>> app_config.cpp:128:58: error: format not a string literal and no format >>> arguments [-Werror=format-security] >>> msg_printf_notice(p, false, NULL, msgs[i].c_str()); >>> ^ >>> cc1plus: some warnings being treated as errors >>> >>> >>> +static void print_msgs(vector<string> msgs, PROJECT* p) { >>> + for (unsigned int i=0; i<msgs.size(); i++) { >>> + msg_printf_notice(p, false, NULL, msgs[i].c_str()); >>> + } >>> >>> you probably need to use >>> msg_printf_notice(p, false, NULL, "%s", msgs[i].c_str()); >>> >>> (note: I didn't test the above) >>> >>> cheers, >>> >>> G. >>> _______________________________________________ >>> boinc_dev mailing list >>> boinc_dev@ssl.berkeley.edu >>> https://lists.ssl.berkeley.edu/mailman/listinfo/boinc_dev >>> To unsubscribe, visit the above URL and >>> (near bottom of page) enter your email address. >> _______________________________________________ >> boinc_dev mailing list >> boinc_dev@ssl.berkeley.edu >> https://lists.ssl.berkeley.edu/mailman/listinfo/boinc_dev >> To unsubscribe, visit the above URL and >> (near bottom of page) enter your email address. > > _______________________________________________ > boinc_dev mailing list > boinc_dev@ssl.berkeley.edu > https://lists.ssl.berkeley.edu/mailman/listinfo/boinc_dev > To unsubscribe, visit the above URL and > (near bottom of page) enter your email address. _______________________________________________ boinc_dev mailing list boinc_dev@ssl.berkeley.edu https://lists.ssl.berkeley.edu/mailman/listinfo/boinc_dev To unsubscribe, visit the above URL and (near bottom of page) enter your email address.