diff options
author | Federico G. Schwindt <fgsch@cvs.openbsd.org> | 2013-01-13 21:21:18 +0000 |
---|---|---|
committer | Federico G. Schwindt <fgsch@cvs.openbsd.org> | 2013-01-13 21:21:18 +0000 |
commit | 3aff13d026f23ec68d9fc2a91e5b19712e9be71c (patch) | |
tree | ae4cb0c33a6236b9115c57335683bc29b8a615b9 | |
parent | 9054ea03875135bbcc8dcc7ad9809f77b5cb8186 (diff) |
Fix warnings.
millert@ ok.
-rw-r--r-- | libexec/login_token/init.c | 4 | ||||
-rw-r--r-- | libexec/login_token/login_token.c | 4 | ||||
-rw-r--r-- | libexec/login_token/token.c | 10 |
3 files changed, 8 insertions, 10 deletions
diff --git a/libexec/login_token/init.c b/libexec/login_token/init.c index 631a582f66a..40412e95966 100644 --- a/libexec/login_token/init.c +++ b/libexec/login_token/init.c @@ -1,4 +1,4 @@ -/* $OpenBSD: init.c,v 1.3 2005/02/17 13:49:38 aaron Exp $ */ +/* $OpenBSD: init.c,v 1.4 2013/01/13 21:21:17 fgsch Exp $ */ /*- * Copyright (c) 1996 Berkeley Software Design, Inc. All rights reserved. @@ -93,7 +93,7 @@ token_init(char *path) fprintf(stderr, "Please invoke as one of:"); for (i = 0; i < sizeof(types)/sizeof(types[0]); ++i) fprintf(stderr, " %.*s%s%s", - p - path, path, types[i].name, p + 5); + (int)(p - path), path, types[i].name, p + 5); fprintf(stderr, "\n"); exit(1); diff --git a/libexec/login_token/login_token.c b/libexec/login_token/login_token.c index 056c9125d6f..cf14ece0df5 100644 --- a/libexec/login_token/login_token.c +++ b/libexec/login_token/login_token.c @@ -1,4 +1,4 @@ -/* $OpenBSD: login_token.c,v 1.9 2012/12/04 02:24:47 deraadt Exp $ */ +/* $OpenBSD: login_token.c,v 1.10 2013/01/13 21:21:17 fgsch Exp $ */ /*- * Copyright (c) 1995, 1996 Berkeley Software Design, Inc. All rights reserved. @@ -55,7 +55,6 @@ int main(int argc, char *argv[]) { FILE *back = NULL; - char *class = 0; char *username = 0; char *instance; char challenge[1024]; @@ -114,7 +113,6 @@ main(int argc, char *argv[]) switch (argc - optind) { case 2: - class = argv[optind + 1]; case 1: username = argv[optind]; break; diff --git a/libexec/login_token/token.c b/libexec/login_token/token.c index f760395ba94..0e367bd4ef0 100644 --- a/libexec/login_token/token.c +++ b/libexec/login_token/token.c @@ -1,4 +1,4 @@ -/* $OpenBSD: token.c,v 1.13 2012/12/04 02:24:47 deraadt Exp $ */ +/* $OpenBSD: token.c,v 1.14 2013/01/13 21:21:17 fgsch Exp $ */ /*- * Copyright (c) 1995 Migration Associates Corp. All Rights Reserved @@ -173,7 +173,7 @@ tokenverify(char *username, char *challenge, char *response) memset(cipher_text.ct, 0, sizeof(cipher_text.ct)); memset(tokennumber.ct, 0, sizeof(tokennumber.ct)); - state = strtok(challenge, "\""); + (void)strtok(challenge, "\""); state = strtok(NULL, "\""); tmp.ul[0] = strtoul(state, NULL, 10); snprintf(tokennumber.ct, sizeof(tokennumber.ct), "%8.8lu",tmp.ul[0]); @@ -259,7 +259,7 @@ tokenuserinit(int flags, char *username, unsigned char *usecret, unsigned mode) TOKEN_CBlock checktxt; DES_key_schedule key_schedule; - memset(&secret.ct, 0, sizeof(secret)); + memset(&secret, 0, sizeof(secret)); /* * If no user secret passed in, create one @@ -303,7 +303,7 @@ tokenuserinit(int flags, char *username, unsigned char *usecret, unsigned mode) */ if (!(flags & TOKEN_GENSECRET)) { - memset(&secret.ct, 0, sizeof(secret)); + memset(&secret, 0, sizeof(secret)); return (0); } @@ -313,7 +313,7 @@ tokenuserinit(int flags, char *username, unsigned char *usecret, unsigned mode) secret.cb[4], secret.cb[5], secret.cb[6], secret.cb[7]); DES_key_sched(&secret.cb, &key_schedule); - memset(&secret.ct, 0, sizeof(secret)); + memset(&secret, 0, sizeof(secret)); memset(&nulls, 0, sizeof(nulls)); DES_ecb_encrypt(&nulls.cb, &checksum.cb, &key_schedule, DES_ENCRYPT); memset(&key_schedule, 0, sizeof(key_schedule)); |