aboutsummaryrefslogtreecommitdiffstats
path: root/examples/pdf-split-pages.cc
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2020-04-16 17:43:37 +0200
committerJay Berkenbilt <ejb@ql.org>2020-04-16 18:41:43 +0200
commit92d3cbecd4ea375d8de95bffc0fe8651c698f568 (patch)
treedcaed532423d2b836251d8203a14db594adca2be /examples/pdf-split-pages.cc
parent66198f447f45a87718b6457756976baa8defb2fd (diff)
downloadqpdf-92d3cbecd4ea375d8de95bffc0fe8651c698f568.tar.zst
Fix warnings reported by -Wshadow=local (fixes #431)
Diffstat (limited to 'examples/pdf-split-pages.cc')
-rw-r--r--examples/pdf-split-pages.cc7
1 files changed, 3 insertions, 4 deletions
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 <string>
#include <cstring>
-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
{