From 8d3362699e89b6066fff2bc0f3e446cb2eddfbdd Mon Sep 17 00:00:00 2001 From: Keith Vetter Date: Thu, 2 Mar 1995 02:15:25 +0000 Subject: [PATCH] Several small 16 vs 32 bit casts git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5056 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/asn.1/ChangeLog | 6 ++++++ src/lib/krb5/asn.1/asn1_decode.c | 1 + src/lib/krb5/asn.1/asn1_encode.c | 4 ++-- src/lib/krb5/asn.1/asn1_k_encode.c | 2 +- src/lib/krb5/asn.1/asn1_k_encode.h | 2 +- src/lib/krb5/asn.1/asn1_misc.c | 2 ++ 6 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/lib/krb5/asn.1/ChangeLog b/src/lib/krb5/asn.1/ChangeLog index 1278a1ea7..b0681b65d 100644 --- a/src/lib/krb5/asn.1/ChangeLog +++ b/src/lib/krb5/asn.1/ChangeLog @@ -1,3 +1,9 @@ +Wed Mar 1 18:00:00 1995 Keith Vetter (keithv@fusion.com) + + * asn1_decode.c, asn1_encode.c, ans1_k_encode.c, asn1_misc.c: 16 vs + 32 bit casts. + * asn1_k_encode.h: added missing INTERFACE to a prototype + Tue Feb 28 00:32:48 1995 John Gilmore (gnu at toad.com) * asn1_decode.h, asn1_encode.h, asn1_get.h, asn1_k_decode.h, diff --git a/src/lib/krb5/asn.1/asn1_decode.c b/src/lib/krb5/asn.1/asn1_decode.c index 7b033d200..b2f11db25 100644 --- a/src/lib/krb5/asn.1/asn1_decode.c +++ b/src/lib/krb5/asn.1/asn1_decode.c @@ -172,6 +172,7 @@ asn1_error_code INTERFACE asn1_decode_generaltime(buf, val) char *s; struct tm ts; time_t t; + time_t gmt_mktime PROTOTYPE((struct tm *)); tag(ASN1_GENERALTIME); diff --git a/src/lib/krb5/asn.1/asn1_encode.c b/src/lib/krb5/asn.1/asn1_encode.c index c620d9f2d..a91520b04 100644 --- a/src/lib/krb5/asn.1/asn1_encode.c +++ b/src/lib/krb5/asn.1/asn1_encode.c @@ -38,7 +38,7 @@ asn1_error_code INTERFACE asn1_encode_integer(buf, val, retlen) valcopy = val; do { - digit = valcopy&0xFF; + digit = (int) (valcopy&0xFF); retval = asn1buf_insert_octet(buf,(asn1_octet) digit); if(retval) return retval; length++; @@ -75,7 +75,7 @@ asn1_error_code INTERFACE asn1_encode_unsigned_integer(buf, val, retlen) valcopy = val; do { - digit = valcopy&0xFF; + digit = (int) (valcopy&0xFF); retval = asn1buf_insert_octet(buf,(asn1_octet) digit); if(retval) return retval; length++; diff --git a/src/lib/krb5/asn.1/asn1_k_encode.c b/src/lib/krb5/asn.1/asn1_k_encode.c index 2cde64463..77858f625 100644 --- a/src/lib/krb5/asn.1/asn1_k_encode.c +++ b/src/lib/krb5/asn.1/asn1_k_encode.c @@ -149,7 +149,7 @@ asn1_error_code INTERFACE asn1_encode_principal_name(buf, val, retlen) if(val == NULL || val->data == NULL) return ASN1_MISSING_FIELD; - for(n = (val->length)-1; n >= 0; n--){ + for(n = (int) ((val->length)-1); n >= 0; n--){ if(val->data[n].data == NULL) return ASN1_MISSING_FIELD; retval = asn1_encode_generalstring(buf, (val->data)[n].length, diff --git a/src/lib/krb5/asn.1/asn1_k_encode.h b/src/lib/krb5/asn.1/asn1_k_encode.h index d0000ebdf..93be05da3 100644 --- a/src/lib/krb5/asn.1/asn1_k_encode.h +++ b/src/lib/krb5/asn.1/asn1_k_encode.h @@ -170,7 +170,7 @@ asn1_error_code INTERFACE asn1_encode_last_req PROTOTYPE((asn1buf *buf, const krb5_last_req_entry **val, int *retlen)); -asn1_error_code asn1_encode_sequence_of_pa_data +asn1_error_code INTERFACE asn1_encode_sequence_of_pa_data PROTOTYPE((asn1buf *buf, const krb5_pa_data **val, int *retlen)); asn1_error_code INTERFACE asn1_encode_sequence_of_ticket diff --git a/src/lib/krb5/asn.1/asn1_misc.c b/src/lib/krb5/asn.1/asn1_misc.c index ce6f7b534..3231a6385 100644 --- a/src/lib/krb5/asn.1/asn1_misc.c +++ b/src/lib/krb5/asn.1/asn1_misc.c @@ -22,6 +22,8 @@ */ #include "asn1_misc.h" +#include +#include asn1_error_code INTERFACE asn1_krb5_realm_copy(target, source) krb5_principal target; -- 2.26.2