diff options
author | Klemens Nanni <kn@cvs.openbsd.org> | 2022-08-26 00:24:57 +0000 |
---|---|---|
committer | Klemens Nanni <kn@cvs.openbsd.org> | 2022-08-26 00:24:57 +0000 |
commit | d4eed0fae3378da3c3662bc6f179b99023dd2504 (patch) | |
tree | 362c78a15c7c5d9a92f46930bfd5cbe4d70768cc /usr.bin/signify/signify.c | |
parent | f02638fd53100eed88bbe73813dcd4558968acf0 (diff) |
Move (unused) variables under !VERIFYONLY
install media does not use any of -cns, so move their handling out under
!VERIFYONLY to silence -Wunused-but-set-variable warnings in
distrib/special/signify.
OK deraadt
Diffstat (limited to 'usr.bin/signify/signify.c')
-rw-r--r-- | usr.bin/signify/signify.c | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/usr.bin/signify/signify.c b/usr.bin/signify/signify.c index 42c7500ab9b..1ab609ae5dd 100644 --- a/usr.bin/signify/signify.c +++ b/usr.bin/signify/signify.c @@ -1,4 +1,4 @@ -/* $OpenBSD: signify.c,v 1.135 2020/01/21 12:13:21 tb Exp $ */ +/* $OpenBSD: signify.c,v 1.136 2022/08/26 00:24:56 kn Exp $ */ /* * Copyright (c) 2013 Ted Unangst <tedu@openbsd.org> * @@ -751,13 +751,14 @@ verifyzdata(uint8_t *zdata, unsigned long long zdatalen, int main(int argc, char **argv) { - const char *pubkeyfile = NULL, *seckeyfile = NULL, *msgfile = NULL, - *sigfile = NULL; + const char *pubkeyfile = NULL, *msgfile = NULL, *sigfile = NULL; char sigfilebuf[PATH_MAX]; - const char *comment = "signify"; char *keytype = NULL; - int ch; +#ifndef VERIFYONLY + const char *seckeyfile = NULL, *comment = "signify"; int none = 0; +#endif + int ch; int embedded = 0; int quiet = 0; int gzip = 0; @@ -790,6 +791,15 @@ main(int argc, char **argv) usage(NULL); verb = SIGN; break; + case 'c': + comment = optarg; + break; + case 'n': + none = 1; + break; + case 's': + seckeyfile = optarg; + break; case 'z': gzip = 1; break; @@ -799,27 +809,18 @@ main(int argc, char **argv) usage(NULL); verb = VERIFY; break; - case 'c': - comment = optarg; - break; case 'e': embedded = 1; break; case 'm': msgfile = optarg; break; - case 'n': - none = 1; - break; case 'p': pubkeyfile = optarg; break; case 'q': quiet = 1; break; - case 's': - seckeyfile = optarg; - break; case 't': keytype = optarg; break; |