Bug#811593: FTBFS with GCC 6: statement indented as if it were guarded by
Yeah, I think it's time. There are other good option libraries for c++ around, and config manager is superceded by myrepos. On 14 Jan 2017 8:23 AM, "Simon McVittie" wrote: > On Sun, 08 Jan 2017 at 17:16:56 +0100, John Paul Adrian Glaubitz wrote: > > Hi Mike! > > > > > The attached patch should fix the issue, although it's not completely > > > clear to me if these were hidden (until now) mistakes or not. > > > > It actually looks like those were mistakes and the proper fix would have > > been to use braces around the next two statements > > Since the correct fix is not immediately obvious, and the only package > depending on this one appears to have been unmaintained upstream since > 2012, I would be tempted to remove both those packages from Debian rather > than fixing this. > > I've opened #851301 and #851302. > > S >
Bug#811593: FTBFS with GCC 6: statement indented as if it were guarded by
On Sun, 08 Jan 2017 at 17:16:56 +0100, John Paul Adrian Glaubitz wrote: > Hi Mike! > > > The attached patch should fix the issue, although it's not completely > > clear to me if these were hidden (until now) mistakes or not. > > It actually looks like those were mistakes and the proper fix would have > been to use braces around the next two statements Since the correct fix is not immediately obvious, and the only package depending on this one appears to have been unmaintained upstream since 2012, I would be tempted to remove both those packages from Debian rather than fixing this. I've opened #851301 and #851302. S
Bug#811593: FTBFS with GCC 6: statement indented as if it were guarded by
Hi Mike! > The attached patch should fix the issue, although it's not completely > clear to me if these were hidden (until now) mistakes or not. It actually looks like those were mistakes and the proper fix would have been to use braces around the next two statements, so that argv.erase() is executed when "isOption(maybepos)" is false: if (!isOption(maybepos)) { /* not an option */ value = argv[1]; argv.erase(argv.begin() + 1); } This becomes obvious when you scroll down further in the case statement at case Option::Required: where we have: if (isOption(maybepos)) /* The next argv is an option */ return; value = argv[1]; argv.erase(argv.begin() + 1); So, the two statements are always executed when isOption(maybepos) is false. Adrian -- .''`. John Paul Adrian Glaubitz : :' : Debian Developer - glaub...@debian.org `. `' Freie Universitaet Berlin - glaub...@physik.fu-berlin.de `-GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
Bug#811593: FTBFS with GCC 6: statement indented as if it were guarded by
tags 811593 patch thanks Hi, The attached patch should fix the issue, although it's not completely clear to me if these were hidden (until now) mistakes or not. robertc: Are you also upstream for this? If so is the actual behavior what you were expecting? -- Mike Gerow ge...@mgerow.com diff -u libgetopt++-0.0.2-p22/debian/changelog libgetopt++-0.0.2-p22/debian/changelog --- libgetopt++-0.0.2-p22/debian/changelog +++ libgetopt++-0.0.2-p22/debian/changelog @@ -1,3 +1,10 @@ +libgetopt++ (0.0.2-p22-3.2) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Fix misleading indentation in src/OptionSet.cc. (Closes: #811593) + + -- Mike Gerow Thu, 07 Jul 2016 20:06:17 +0200 + libgetopt++ (0.0.2-p22-3.1) unstable; urgency=medium * Non-maintainer upload. diff -u libgetopt++-0.0.2-p22/debian/patches/series libgetopt++-0.0.2-p22/debian/patches/series --- libgetopt++-0.0.2-p22/debian/patches/series +++ libgetopt++-0.0.2-p22/debian/patches/series @@ -2,0 +3 @@ +fix_gcc6_ftbfs.diff only in patch2: unchanged: --- libgetopt++-0.0.2-p22.orig/debian/patches/fix_gcc6_ftbfs.diff +++ libgetopt++-0.0.2-p22/debian/patches/fix_gcc6_ftbfs.diff @@ -0,0 +1,20 @@ +--- a/src/OptionSet.cc b/src/OptionSet.cc +@@ -126,7 +126,7 @@ + if (!isOption(maybepos)) + /* not an option */ + value = argv[1]; +- argv.erase(argv.begin() + 1); ++ argv.erase(argv.begin() + 1); + } + } else { + /* value if present is in this argv */ +@@ -159,7 +159,7 @@ + + if (!isOption(maybepos)) + value = argv[1]; +- argv.erase(argv.begin() + 1); ++ argv.erase(argv.begin() + 1); + } + } + } signature.asc Description: PGP signature