From 89525f688bd120f7a252338fb2bd12b9ccd869d9 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Tue, 23 Jun 2015 11:34:29 +0200 Subject: Get rid of 3 unused warnings for argc - 2x use BOTAN_UNUSED when OptionParser is used - 1x argc is checked now --- src/cmd/compress.cpp | 6 ++++++ src/cmd/keygen.cpp | 1 + src/cmd/speed.cpp | 1 + 3 files changed, 8 insertions(+) (limited to 'src') diff --git a/src/cmd/compress.cpp b/src/cmd/compress.cpp index ca5161644..35f74f8af 100644 --- a/src/cmd/compress.cpp +++ b/src/cmd/compress.cpp @@ -83,6 +83,12 @@ void parse_extension(const std::string& in_file, int uncompress(int argc, char* argv[]) { + if(argc != 2) + { + std::cout << "Usage: " << argv[0] << " " << std::endl; + return 1; + } + const std::string in_file = argv[1]; std::ifstream in(in_file); diff --git a/src/cmd/keygen.cpp b/src/cmd/keygen.cpp index f5dfd425e..7cd9b1cc0 100644 --- a/src/cmd/keygen.cpp +++ b/src/cmd/keygen.cpp @@ -76,6 +76,7 @@ Private_Key* gen_key(RandomNumberGenerator& rng, const std::string& algo, size_t int keygen(int argc, char* argv[]) { + BOTAN_UNUSED(argc); OptionParser opts("algo=|bits=|passphrase=|pbe="); opts.parse(argv); diff --git a/src/cmd/speed.cpp b/src/cmd/speed.cpp index 63100d1d9..5e12ff3bc 100644 --- a/src/cmd/speed.cpp +++ b/src/cmd/speed.cpp @@ -193,6 +193,7 @@ void bench_algo(const std::string& algo, int speed(int argc, char* argv[]) { + BOTAN_UNUSED(argc); OptionParser opts("seconds=|buf-size="); opts.parse(argv); -- cgit v1.2.3