From: Ezra Peisach Date: Mon, 29 Dec 2008 12:36:31 +0000 (+0000) Subject: Add prototype for usage. Change invocation of usage to db_usage when using an argume... X-Git-Tag: krb5-1.7-alpha1~133 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=e88ac4cb173af67a50149166cf6d88e5d8d9dfb4;p=krb5.git Add prototype for usage. Change invocation of usage to db_usage when using an argument. Include adm_proto.h for prototype for krb5_keysalt_iterate git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21625 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/plugins/kdb/ldap/ldap_util/kdb5_ldap_realm.c b/src/plugins/kdb/ldap/ldap_util/kdb5_ldap_realm.c index b7e553479..c13d96710 100644 --- a/src/plugins/kdb/ldap/ldap_util/kdb5_ldap_realm.c +++ b/src/plugins/kdb/ldap/ldap_util/kdb5_ldap_realm.c @@ -87,6 +87,7 @@ #include #include #include +#include #include "kdb5_ldap_util.h" #include "kdb5_ldap_list.h" #include @@ -2004,7 +2005,7 @@ static char *strdur(duration) static void print_realm_params(krb5_ldap_realm_params *rparams, int mask) { char **slist = NULL; - int num_entry_printed = 0, i = 0; + unsigned int num_entry_printed = 0, i = 0; /* Print the Realm Attributes on the standard output */ printf("%25s: %-50s\n", "Realm Name", global_params.realm); diff --git a/src/plugins/kdb/ldap/ldap_util/kdb5_ldap_util.c b/src/plugins/kdb/ldap/ldap_util/kdb5_ldap_util.c index 9ed1f2dee..33511af47 100644 --- a/src/plugins/kdb/ldap/ldap_util/kdb5_ldap_util.c +++ b/src/plugins/kdb/ldap/ldap_util/kdb5_ldap_util.c @@ -104,7 +104,7 @@ krb5_boolean manual_mkey = FALSE; * This function prints the usage of kdb5_ldap_util, which is * the LDAP configuration utility. */ -void usage() +void usage(void) { fprintf(stderr, "Usage: " "kdb5_ldap_util [-D user_dn [-w passwd]] [-H ldapuri]\n" @@ -420,7 +420,6 @@ int main(argc, argv) * we will print the help corresponding to the sub-command. */ if (print_help_message) { - char *cmd_name = cmd_argv[0]; free(cmd_argv); cmd_argv = NULL; usage(); diff --git a/src/plugins/kdb/ldap/ldap_util/kdb5_ldap_util.h b/src/plugins/kdb/ldap/ldap_util/kdb5_ldap_util.h index a2b3bb802..d27dd5247 100644 --- a/src/plugins/kdb/ldap/ldap_util/kdb5_ldap_util.h +++ b/src/plugins/kdb/ldap/ldap_util/kdb5_ldap_util.h @@ -63,10 +63,10 @@ extern char *progname; extern int exit_status; extern krb5_context util_context; -extern void usage(); +extern void usage(void); extern void db_usage(int); -#define ARG_VAL (--argc > 0 ? (koptarg = *(++argv)) : (char *)(usage(MAIN_HELP), NULL)) +#define ARG_VAL (--argc > 0 ? (koptarg = *(++argv)) : (char *)(db_usage(MAIN_HELP), NULL)) /* Following are the bitmaps that indicate which of the options among -D, -w, -h, -p & -t * were specified on the command line.