From: Ezra Peisach Date: Tue, 8 May 2001 17:10:18 +0000 (+0000) Subject: * disp_major_status.c (display_unknown): Remove unused variable X-Git-Tag: krb5-1.3-alpha1~1515 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=017db8877acda90f692017243245f0d3b741e3c5;p=krb5.git * disp_major_status.c (display_unknown): Remove unused variable * util_token.c (g_make_token_header): Remove incorrect cast of length argument to memcpy. * oid_ops.c (generic_gss_str_to_oid): Cast argument of isxxx() functions to int - avoids gcc warning when these are implemented as macros indexing an array. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13236 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/gssapi/generic/ChangeLog b/src/lib/gssapi/generic/ChangeLog index 7de3eeaa4..731eab20b 100644 --- a/src/lib/gssapi/generic/ChangeLog +++ b/src/lib/gssapi/generic/ChangeLog @@ -1,3 +1,19 @@ +2001-05-08 Ezra Peisach + + * disp_major_status.c (display_unknown): Remove unused variable. + + * util_token.c (g_make_token_header): Remove incorrect cast of + length argument to memcpy. + + * oid_ops.c (generic_gss_str_to_oid): Cast argument of isxxx() + functions to int - avoids gcc warning when these are implemented + as macros indexing an array. + +2001-05-04 Ezra Peisach + + * disp_major_status.c (display_unknown): Declare as static. Remove + non-useful code. + 2001-04-17 Ken Raeburn * Makefile.in (unixmac): Target deleted. diff --git a/src/lib/gssapi/generic/disp_major_status.c b/src/lib/gssapi/generic/disp_major_status.c index e2df893e1..218370d14 100644 --- a/src/lib/gssapi/generic/disp_major_status.c +++ b/src/lib/gssapi/generic/disp_major_status.c @@ -107,16 +107,16 @@ static const char * const unknown_error = "Unknown %s (field = %d)"; /**/ -int display_unknown(kind, value, buffer) +static int +display_unknown(kind, value, buffer) const char *kind; OM_uint32 value; gss_buffer_t buffer; { - int len; char *str; if ((str = - (char *) xmalloc(len = strlen(unknown_error)+strlen(kind)+7)) == NULL) + (char *) xmalloc(strlen(unknown_error)+strlen(kind)+7)) == NULL) return(0); sprintf(str, unknown_error, kind, value); diff --git a/src/lib/gssapi/generic/oid_ops.c b/src/lib/gssapi/generic/oid_ops.c index 641c28dd6..a73589879 100644 --- a/src/lib/gssapi/generic/oid_ops.c +++ b/src/lib/gssapi/generic/oid_ops.c @@ -278,13 +278,13 @@ generic_gss_str_to_oid(minor_status, oid_str, oid) bp = (char *) oid_str->value; cp = bp; /* Skip over leading space */ - while ((bp < &cp[oid_str->length]) && isspace(*bp)) + while ((bp < &cp[oid_str->length]) && isspace((int) *bp)) bp++; if (*bp == '{') { brace = 1; bp++; } - while ((bp < &cp[oid_str->length]) && isspace(*bp)) + while ((bp < &cp[oid_str->length]) && isspace((int) *bp)) bp++; startp = bp; nbytes = 0; @@ -296,20 +296,20 @@ generic_gss_str_to_oid(minor_status, oid_str, oid) *minor_status = EINVAL; return(GSS_S_FAILURE); } - while ((bp < &cp[oid_str->length]) && isdigit(*bp)) + while ((bp < &cp[oid_str->length]) && isdigit((int) *bp)) bp++; - while ((bp < &cp[oid_str->length]) && isspace(*bp)) + while ((bp < &cp[oid_str->length]) && isspace((int) *bp)) bp++; if (sscanf(bp, "%ld", &numbuf) != 1) { *minor_status = EINVAL; return(GSS_S_FAILURE); } - while ((bp < &cp[oid_str->length]) && isdigit(*bp)) + while ((bp < &cp[oid_str->length]) && isdigit((int) *bp)) bp++; - while ((bp < &cp[oid_str->length]) && isspace(*bp)) + while ((bp < &cp[oid_str->length]) && isspace((int) *bp)) bp++; nbytes++; - while (isdigit(*bp)) { + while (isdigit((int) *bp)) { if (sscanf(bp, "%ld", &numbuf) != 1) { *minor_status = EINVAL; return(GSS_S_FAILURE); @@ -318,9 +318,9 @@ generic_gss_str_to_oid(minor_status, oid_str, oid) nbytes++; numbuf >>= 7; } - while ((bp < &cp[oid_str->length]) && isdigit(*bp)) + while ((bp < &cp[oid_str->length]) && isdigit((int) *bp)) bp++; - while ((bp < &cp[oid_str->length]) && isspace(*bp)) + while ((bp < &cp[oid_str->length]) && isspace((int) *bp)) bp++; } if (brace && (*bp != '}')) { @@ -337,20 +337,20 @@ generic_gss_str_to_oid(minor_status, oid_str, oid) op = (unsigned char *) (*oid)->elements; bp = startp; sscanf(bp, "%ld", &numbuf); - while (isdigit(*bp)) + while (isdigit((int) *bp)) bp++; - while (isspace(*bp)) + while (isspace((int) *bp)) bp++; onumbuf = 40*numbuf; sscanf(bp, "%ld", &numbuf); onumbuf += numbuf; *op = (unsigned char) onumbuf; op++; - while (isdigit(*bp)) + while (isdigit((int) *bp)) bp++; - while (isspace(*bp)) + while (isspace((int) *bp)) bp++; - while (isdigit(*bp)) { + while (isdigit((int) *bp)) { sscanf(bp, "%ld", &numbuf); nbytes = 0; /* Have to fill in the bytes msb-first */ @@ -369,9 +369,9 @@ generic_gss_str_to_oid(minor_status, oid_str, oid) idx--; numbuf >>= 7; } - while (isdigit(*bp)) + while (isdigit((int) *bp)) bp++; - while (isspace(*bp)) + while (isspace((int) *bp)) bp++; } *minor_status = 0; diff --git a/src/lib/gssapi/generic/util_token.c b/src/lib/gssapi/generic/util_token.c index 38d1fb198..6dd2c379f 100644 --- a/src/lib/gssapi/generic/util_token.c +++ b/src/lib/gssapi/generic/util_token.c @@ -148,7 +148,7 @@ void g_make_token_header(mech, body_size, buf, tok_type) der_write_length(buf, 4 + mech->length + body_size); *(*buf)++ = 0x06; *(*buf)++ = (unsigned char) mech->length; - TWRITE_STR(*buf, mech->elements, ((int) mech->length)); + TWRITE_STR(*buf, mech->elements, mech->length); *(*buf)++ = (unsigned char) ((tok_type>>8)&0xff); *(*buf)++ = (unsigned char) (tok_type&0xff); }