]> cygwin.com Git - cygwin-apps/setup.git/commit
Fix -Werror=misleading-indentation errors seen with gcc 6
authorJon Turney <jon.turney@dronecode.org.uk>
Thu, 19 Oct 2017 01:20:55 +0000 (02:20 +0100)
committerJon Turney <jon.turney@dronecode.org.uk>
Thu, 19 Oct 2017 12:33:37 +0000 (13:33 +0100)
commitf003c5585301efc65c1848d71993d8a13a94cdd5
tree79bd2c631840d688bfb69cdfd424ff2c05e93daf
parent2666daacead168518c0a85044e14d6304bb45a8d
Fix -Werror=misleading-indentation errors seen with gcc 6

This looks like an actual bug which has been lurking here since forever,
fortunately not exposed since hardly anything uses Option::Optional...

libgetopt++/src/OptionSet.cc: In member function 'void OptionSet::doOption(std::__cxx11::string&, const size_type&)':
libgetopt++/src/OptionSet.cc:125:25: error: this 'if' clause does not guard... [-Werror=misleading-indentation]
                         if (!isOption(maybepos))
                         ^~
libgetopt++/src/OptionSet.cc:128:8: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if'
        argv.erase(argv.begin() + 1);
        ^~~~
libgetopt++/src/OptionSet.cc:159:25: error: this 'if' clause does not guard... [-Werror=misleading-indentation]
                         if (!isOption(maybepos))
                         ^~
libgetopt++/src/OptionSet.cc:161:8: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if'
        argv.erase(argv.begin() + 1);
        ^~~~
libgetopt++/src/OptionSet.cc
This page took 0.050037 seconds and 5 git commands to generate.