From e7002b527df7c295bb89e5f58fa2a86b69bcdbfd Mon Sep 17 00:00:00 2001 From: Ezra Peisach Date: Thu, 11 Jan 1996 00:22:43 +0000 Subject: [PATCH] * locate_kdc.c (krb5_locate_kdc): Add parrentheses for assignment in conditional. (gcc -Wall) * init_os_ctx.c (krb5_os_init_context): Remove unused variables * an_to_ln.c (aname_do_match): Initialize local variable before referenced. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@7288 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/os/ChangeLog | 10 ++++++++++ src/lib/krb5/os/an_to_ln.c | 4 ++-- src/lib/krb5/os/init_os_ctx.c | 7 ++++--- src/lib/krb5/os/locate_kdc.c | 4 ++-- 4 files changed, 18 insertions(+), 7 deletions(-) diff --git a/src/lib/krb5/os/ChangeLog b/src/lib/krb5/os/ChangeLog index 944826140..b77b45d5f 100644 --- a/src/lib/krb5/os/ChangeLog +++ b/src/lib/krb5/os/ChangeLog @@ -1,3 +1,13 @@ +Fri Jan 5 09:00:47 1996 Ezra Peisach + + * locate_kdc.c (krb5_locate_kdc): Add parrentheses for assignment + in conditional. (gcc -Wall) + + * init_os_ctx.c (krb5_os_init_context): Remove unused variables + + * an_to_ln.c (aname_do_match): Initialize local variable before + referenced. + Thu Jan 4 22:23:04 1996 Theodore Y. Ts'o * hostaddr.c (krb5_os_hostaddr): New function which takes a diff --git a/src/lib/krb5/os/an_to_ln.c b/src/lib/krb5/os/an_to_ln.c index c0c72fb72..9748daf66 100644 --- a/src/lib/krb5/os/an_to_ln.c +++ b/src/lib/krb5/os/an_to_ln.c @@ -207,7 +207,7 @@ aname_do_match(string, contextp) char **contextp; { krb5_error_code kret; - char *regexp, *startp, *endp; + char *regexp, *startp, *endp = 0; size_t regexlen; #if HAVE_REGCOMP regex_t match_exp; @@ -479,7 +479,7 @@ rule_an_to_ln(context, rule, aname, lnsize, lname) krb5_error_code kret; char *current; char *fprincname; - char *selstring; + char *selstring = 0; int num_comps, compind; char *cout; krb5_data *datap; diff --git a/src/lib/krb5/os/init_os_ctx.c b/src/lib/krb5/os/init_os_ctx.c index ea5d80af7..ba80694bc 100644 --- a/src/lib/krb5/os/init_os_ctx.c +++ b/src/lib/krb5/os/init_os_ctx.c @@ -105,7 +105,10 @@ os_init_paths(ctx, secure) { krb5_error_code retval = 0; char *name = 0; + +#if defined(_MACINTOSH) || defined(_WINDOWS) const char *filenames[2]; +#endif ctx->profile_secure = secure; @@ -156,9 +159,7 @@ krb5_os_init_context(ctx) { krb5_os_context os_ctx; krb5_error_code retval = 0; - char *name; - const char *filenames[2]; - + if (ctx->os_context) return 0; diff --git a/src/lib/krb5/os/locate_kdc.c b/src/lib/krb5/os/locate_kdc.c index d5a280803..418072f8f 100644 --- a/src/lib/krb5/os/locate_kdc.c +++ b/src/lib/krb5/os/locate_kdc.c @@ -75,9 +75,9 @@ krb5_locate_kdc(context, realm, addr_pp, naddrs) return code; #ifdef KRB5_USE_INET - if (sp = getservbyname(KDC_PORTNAME, "udp")) + if ((sp = getservbyname(KDC_PORTNAME, "udp"))) udpport = sp->s_port; - if (sp = getservbyname(KDC_SECONDARY_PORTNAME, "udp")) + if ((sp = getservbyname(KDC_SECONDARY_PORTNAME, "udp"))) sec_udpport = sp->s_port; #endif if (sec_udpport == udpport) -- 2.26.2