This is related to PR 196712 and blocks updating the default version of GCC from 4.8 to 4.9. http://package18.nyi.freebsd.org/data/93i386-default-PR196712/2015-01-18_16h49m19s/logs/errors/obfsclient-0.0.2_1.log g++49 -DHAVE_CONFIG_H -I. -I./src -I. -I/usr/local/include -Wall -Werror -fno-exceptions -fno-rtti -D_THREAD_SAFE -pthread -I/usr/local/include -I/usr/local/include -I/usr/include -O2 -pipe -Wl,-rpath=/usr/local/lib/gcc49 -fno-strict-aliasing -Wl,-rpath=/usr/local/lib/gcc49 -std=c++11 -MT src/obfsclient-main.o -MD -MP -MF src/.deps/obfsclient-main.Tpo -c -o src/obfsclient-main.o `test -f 'src/main.cc' || echo './'`src/main.cc In file included from src/main.cc:49:0: src/ext/optionparser.h: In static member function 'static bool option::Parser::workhorse(bool, const option::Descriptor*, int, const char**, option::Parser::Action&, bool, bool, int)': src/ext/optionparser.h:1637:47: error: 'optarg' may be used uninitialized in this function [-Werror=maybe-uninitialized] if (optarg != 0 && have_more_args && optarg == args[1]) ^ src/ext/optionparser.h:1557:11: error: 'idx' may be used uninitialized in this function [-Werror=maybe-uninitialized] int idx; ^ cc1plus: all warnings being treated as errors
Maintainer CC'd
Created attachment 153521 [details] Potential fix that was only tested with clang so far Thanks for the report. The attached patch imports upstream commits which should fix this. So far I only tested it with clang, though.
A commit references this bug: Author: gerald Date: Sun Mar 22 01:24:48 UTC 2015 New revision: 381884 URL: https://svnweb.freebsd.org/changeset/ports/381884 Log: Improve portability and allow for building with GCC 4.9 and above. This backports some upstream fixes. PR: 197909 Submitted by: Fabian Keil <fk@fabiankeil.de> (maintainer) Changes: head/security/obfsclient/files/ head/security/obfsclient/files/patch-crypto-ctr.h head/security/obfsclient/files/patch-ext-optionparser.h head/security/obfsclient/files/patch-scramblesuit-client.cc
Thanks for providing this fix, Fabian. And apologies for somehow missing this for some weeks. Do not hesitate to let me know if I can be of help.
Assign to committer