From 92d3cbecd4ea375d8de95bffc0fe8651c698f568 Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Thu, 16 Apr 2020 11:43:37 -0400 Subject: Fix warnings reported by -Wshadow=local (fixes #431) --- examples/pdf-split-pages.cc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'examples/pdf-split-pages.cc') diff --git a/examples/pdf-split-pages.cc b/examples/pdf-split-pages.cc index f8997bbe..ea1c92bc 100644 --- a/examples/pdf-split-pages.cc +++ b/examples/pdf-split-pages.cc @@ -15,7 +15,6 @@ #include #include -static char const* whoami = 0; static bool static_id = false; static void process(char const* whoami, @@ -50,7 +49,7 @@ static void process(char const* whoami, } } -void usage() +void usage(char const* whoami) { std::cerr << "Usage: " << whoami << " infile outprefix" << std::endl; exit(2); @@ -58,7 +57,7 @@ void usage() int main(int argc, char* argv[]) { - whoami = QUtil::getWhoami(argv[0]); + char const* whoami = QUtil::getWhoami(argv[0]); // For libtool's sake.... if (strncmp(whoami, "lt-", 3) == 0) @@ -75,7 +74,7 @@ int main(int argc, char* argv[]) if (argc != 3) { - usage(); + usage(whoami); } try { -- cgit v1.2.3-54-g00ecf