Commit 4925e0f4 authored by Jim Meyering's avatar Jim Meyering Committed by Viswanath Sivakumar

folly/Format-inl.h: fix gcc-4.9-exposed shadowing warning/error (trivial)

Summary:
* folly/Format-inl.h (BaseFormatter): Move decls of P and END down
past the shadowed decls.  Otherwise, gcc-4.9 would emit this:
./folly/Format-inl.h:209:10: error: declaration of 'p' shadows a previous local [-Werror=shadow-local]
./folly/Format-inl.h:202:8: error: shadowed declaration is here [-Werror=shadow-local]
./folly/Format-inl.h:210:10: error: declaration of 'end' shadows a previous local [-Werror=shadow-local]
./folly/Format-inl.h:203:8: error: shadowed declaration is here [-Werror=shadow-local]

Test Plan:
Run this and note there are fewer errors than before:
fbconfig --platform-all=gcc-4.9-glibc-2.20 tao/server && fbmake dbgo

Reviewed By: andrewjcg@fb.com

Subscribers: trunkagent, net-systems@, folly-diffs@

FB internal diff: D1766673

Tasks: 5941250

Signature: t1:1766673:1420569376:22c5c3a012715e479b27ba6f0bde1a3b079a3be3
parent 9009c2b4
......@@ -199,8 +199,6 @@ template <class Derived, bool containerMode, class... Args>
template <class Output>
void BaseFormatter<Derived, containerMode, Args...>::appendOutput(Output& out)
const {
auto p = str_.begin();
auto end = str_.end();
// Copy raw string (without format specifiers) to output;
// not as simple as we'd like, as we still need to translate "}}" to "}"
......@@ -225,6 +223,9 @@ void BaseFormatter<Derived, containerMode, Args...>::appendOutput(Output& out)
}
};
auto p = str_.begin();
auto end = str_.end();
int nextArg = 0;
bool hasDefaultArgIndex = false;
bool hasExplicitArgIndex = false;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment