This is related to PR 196712 and blocks updating the default version of
GCC from 4.8 to 4.9.
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)
src/ext/optionparser.h:1557:11: error: 'idx' may be used uninitialized in this function [-Werror=maybe-uninitialized]
cc1plus: all warnings being treated as errors
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:
Date: Sun Mar 22 01:24:48 UTC 2015
New revision: 381884
Improve portability and allow for building with GCC 4.9 and above.
This backports some upstream fixes.
Submitted by: Fabian Keil <firstname.lastname@example.org> (maintainer)
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