aboutsummaryrefslogtreecommitdiffstats
path: root/src/cmd
diff options
context:
space:
mode:
authorSimon Warta <[email protected]>2015-06-23 11:34:29 +0200
committerSimon Warta <[email protected]>2015-06-23 11:34:29 +0200
commit89525f688bd120f7a252338fb2bd12b9ccd869d9 (patch)
treefd61dd64fd5997d2416b5afddb8b4527ff6c9f09 /src/cmd
parent7c993192825982826069c8b28f0a94d7b9f2fa65 (diff)
Get rid of 3 unused warnings for argc
- 2x use BOTAN_UNUSED when OptionParser is used - 1x argc is checked now
Diffstat (limited to 'src/cmd')
-rw-r--r--src/cmd/compress.cpp6
-rw-r--r--src/cmd/keygen.cpp1
-rw-r--r--src/cmd/speed.cpp1
3 files changed, 8 insertions, 0 deletions
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] << " <file>" << 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);