From 54d0413ff896f3240d5e4c2c9aaf67cb2360c528 Mon Sep 17 00:00:00 2001 From: Nathan Neulinger Date: Thu, 5 Jul 2001 16:09:58 +0000 Subject: [PATCH] auth-setkey-warnings-cleanup-20010705 get rid of more warnings, add missing args to printf strings --- src/auth/setkey.c | 33 +++++++++++++++++++++++---------- 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/src/auth/setkey.c b/src/auth/setkey.c index 411c04a6b..ee8e4426f 100644 --- a/src/auth/setkey.c +++ b/src/auth/setkey.c @@ -8,14 +8,26 @@ */ #include +#include #include +#include +#include #ifdef AFS_NT40_ENV #include -#include #include #include +#endif +#ifdef HAVE_STRINGS_H +#include #else +#ifdef HAVE_STRING_H +#include +#endif +#endif +#ifdef HAVE_NETINET_IN_H #include +#endif +#ifdef HAVE_NETDB_H #include #endif #include "cellconfig.h" @@ -23,9 +35,10 @@ #include #include "AFS_component_version_number.c" -int char2hex(char c); -int hex2char(char c); +static int char2hex(char c); +static int hex2char(char c); +int main(argc, argv) int argc; char **argv; { @@ -67,7 +80,7 @@ char **argv; { code = afsconf_AddKey(tdir, atoi(argv[2]), tkey, 1); if (code) { - printf("setkey: failed to set key, code %d.\n", code); + printf("setkey: failed to set key, code %d.\n", (int) code); exit(1); } } @@ -80,7 +93,7 @@ char **argv; { kvno = atoi(argv[2]); code = afsconf_DeleteKey(tdir, kvno); if (code) { - printf("setkey: failed to delete key %d, (code %d)\n", kvno, code); + printf("setkey: failed to delete key %d, (code %d)\n", (int) kvno, (int) code); exit(1); } } @@ -91,7 +104,7 @@ char **argv; { code = afsconf_GetKeys(tdir, &tkeys); if (code) { - printf("setkey: failed to get keys, code %d\n", code); + printf("setkey: failed to get keys, code %d\n", (int) code); exit(1); } for(i=0;i= '0' && c <='9') return ( c - 48); @@ -132,7 +145,7 @@ int char2hex(char c) return -1; } -int hex2char(char c) +static int hex2char(char c) { if (c <=9) return (c+48); -- 2.39.5