From a34576395e2c009c6ae9902cbdcf6acb84b20079 Mon Sep 17 00:00:00 2001 From: Ezra Peisach Date: Mon, 19 Feb 2007 02:37:10 +0000 Subject: [PATCH] Ensure consistancy between prototypes and functions I am using an older compiler that is complaining that prototypes do not match the functions they reference. The issue is that a number of prototypes are using "const int foo" while the function is "int foo". From a caller sense it makes no difference - but the compiler is correct they are different. All is now consistant. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19169 dc483132-0cff-0310-8789-dd5450dbe970 --- src/include/k5-int.h | 2 +- src/lib/crypto/crc32/crc-32.h | 6 +++--- src/lib/gssapi/krb5/acquire_cred.c | 2 +- src/lib/gssapi/mechglue/mglueP.h | 2 +- src/lib/krb5/asn.1/asn1_make.h | 20 ++++++++++---------- src/lib/krb5/asn.1/asn1buf.h | 8 ++++---- src/lib/krb5/krb/get_in_tkt.c | 4 ++-- src/lib/krb5/krb/in_tkt_sky.c | 7 ------- src/lib/krb5/os/an_to_ln.c | 2 +- 9 files changed, 23 insertions(+), 30 deletions(-) diff --git a/src/include/k5-int.h b/src/include/k5-int.h index d84449803..2ff107c4b 100644 --- a/src/include/k5-int.h +++ b/src/include/k5-int.h @@ -1686,7 +1686,7 @@ krb5_error_code krb5_encrypt_tkt_part krb5_error_code krb5_encode_kdc_rep (krb5_context, - const krb5_msgtype, + krb5_msgtype, const krb5_enc_kdc_rep_part *, int using_subkey, const krb5_keyblock *, diff --git a/src/lib/crypto/crc32/crc-32.h b/src/lib/crypto/crc32/crc-32.h index 10facaa58..0efc00625 100644 --- a/src/lib/crypto/crc32/crc-32.h +++ b/src/lib/crypto/crc32/crc-32.h @@ -60,11 +60,11 @@ #define CRC32_CKSUM_LENGTH 4 void -mit_crc32 (const krb5_pointer in, size_t in_length, unsigned long *c); +mit_crc32 (krb5_pointer in, size_t in_length, unsigned long *c); #ifdef CRC32_SHIFT4 -void mit_crc32_shift4(const krb5_pointer /* in */, - const size_t /* in_length */, +void mit_crc32_shift4(krb5_pointer /* in */, + size_t /* in_length */, unsigned long * /* cksum */); #endif diff --git a/src/lib/gssapi/krb5/acquire_cred.c b/src/lib/gssapi/krb5/acquire_cred.c index 3f213a12e..43d21220c 100644 --- a/src/lib/gssapi/krb5/acquire_cred.c +++ b/src/lib/gssapi/krb5/acquire_cred.c @@ -566,7 +566,7 @@ krb5_gss_acquire_cred(minor_status, desired_name, time_req, /* if the princ wasn't filled in already, fill it in now */ - if (!cred->princ && (desired_name != GSS_C_NO_CREDENTIAL)) + if (!cred->princ && (desired_name != GSS_C_NO_NAME)) if ((code = krb5_copy_principal(context, (krb5_principal) desired_name, &(cred->princ)))) { if (cred->ccache) diff --git a/src/lib/gssapi/mechglue/mglueP.h b/src/lib/gssapi/mechglue/mglueP.h index 70da996d1..85ae002c3 100644 --- a/src/lib/gssapi/mechglue/mglueP.h +++ b/src/lib/gssapi/mechglue/mglueP.h @@ -427,7 +427,7 @@ OM_uint32 gssint_create_copy_buffer( OM_uint32 gssint_copy_oid_set( OM_uint32 *, /* minor_status */ - const gss_OID_set_desc *, /* oid set */ + const gss_OID_set_desc * const, /* oid set */ gss_OID_set * /* new oid set */ ); diff --git a/src/lib/krb5/asn.1/asn1_make.h b/src/lib/krb5/asn.1/asn1_make.h index 715054908..de13d7b52 100644 --- a/src/lib/krb5/asn.1/asn1_make.h +++ b/src/lib/krb5/asn.1/asn1_make.h @@ -48,9 +48,9 @@ asn1_error_code asn1_make_etag (asn1buf *buf, - const asn1_class asn1class, - const asn1_tagnum tagnum, - const unsigned int in_len, + asn1_class asn1class, + asn1_tagnum tagnum, + unsigned int in_len, unsigned int *retlen); /* requires *buf is allocated, in_len is the length of an ASN.1 encoding which has just been inserted in *buf @@ -61,10 +61,10 @@ asn1_error_code asn1_make_etag Returns ENOMEM if memory runs out. */ asn1_error_code asn1_make_tag - (asn1buf *buf, const asn1_class asn1class, - const asn1_construction construction, - const asn1_tagnum tagnum, - const unsigned int in_len, + (asn1buf *buf, asn1_class asn1class, + asn1_construction construction, + asn1_tagnum tagnum, + unsigned int in_len, unsigned int *retlen); /* requires *buf is allocated, in_len is the length of an ASN.1 encoding which has just been inserted in *buf @@ -121,9 +121,9 @@ asn1_error_code asn1_make_length /* "helper" procedure for asn1_make_tag */ asn1_error_code asn1_make_id (asn1buf *buf, - const asn1_class asn1class, - const asn1_construction construction, - const asn1_tagnum tagnum, + asn1_class asn1class, + asn1_construction construction, + asn1_tagnum tagnum, unsigned int *retlen); /* requires *buf is allocated, asn1class and tagnum are appropriate for the ASN.1 encoding which has just been inserted in *buf diff --git a/src/lib/krb5/asn.1/asn1buf.h b/src/lib/krb5/asn.1/asn1buf.h index 854801edd..c9c956adf 100644 --- a/src/lib/krb5/asn.1/asn1buf.h +++ b/src/lib/krb5/asn.1/asn1buf.h @@ -122,10 +122,10 @@ asn1_error_code asn1buf_imbed position starts at the beginning of *subbuf. */ asn1_error_code asn1buf_sync - (asn1buf *buf, asn1buf *subbuf, const asn1_class Class, - const asn1_tagnum lasttag, - const unsigned int length, const int indef, - const int seqindef); + (asn1buf *buf, asn1buf *subbuf, asn1_class Class, + asn1_tagnum lasttag, + unsigned int length, int indef, + int seqindef); /* requires *subbuf is a sub-buffer of *buf, as created by asn1buf_imbed. lasttag is the last tagnumber read. effects Synchronizes *buf's current position to match that of *subbuf. */ diff --git a/src/lib/krb5/krb/get_in_tkt.c b/src/lib/krb5/krb/get_in_tkt.c index ee0a1127e..937cdc4c9 100644 --- a/src/lib/krb5/krb/get_in_tkt.c +++ b/src/lib/krb5/krb/get_in_tkt.c @@ -65,7 +65,7 @@ /* some typedef's for the function args to make things look a bit cleaner */ typedef krb5_error_code (*git_key_proc) (krb5_context, - const krb5_enctype, + krb5_enctype, krb5_data *, krb5_const_pointer, krb5_keyblock **); @@ -440,7 +440,7 @@ static const krb5_enctype get_in_tkt_enctypes[] = { krb5_error_code KRB5_CALLCONV krb5_get_in_tkt(krb5_context context, - const krb5_flags options, + krb5_flags options, krb5_address * const * addrs, krb5_enctype * ktypes, krb5_preauthtype * ptypes, diff --git a/src/lib/krb5/krb/in_tkt_sky.c b/src/lib/krb5/krb/in_tkt_sky.c index 6de207550..75edb55da 100644 --- a/src/lib/krb5/krb/in_tkt_sky.c +++ b/src/lib/krb5/krb/in_tkt_sky.c @@ -40,13 +40,6 @@ struct skey_keyproc_arg { * "keyseed" is actually a krb5_keyblock *, or NULL if we should fetch * from system area. */ -static krb5_error_code skey_keyproc - (krb5_context, - const krb5_enctype, - krb5_data *, - krb5_const_pointer, - krb5_keyblock **); - static krb5_error_code skey_keyproc(krb5_context context, krb5_enctype type, krb5_data *salt, krb5_const_pointer keyseed, krb5_keyblock **key) diff --git a/src/lib/krb5/os/an_to_ln.c b/src/lib/krb5/os/an_to_ln.c index 73465d66c..1df75b188 100644 --- a/src/lib/krb5/os/an_to_ln.c +++ b/src/lib/krb5/os/an_to_ln.c @@ -675,7 +675,7 @@ default_an_to_ln(krb5_context context, krb5_const_principal aname, const unsigne */ krb5_error_code KRB5_CALLCONV -krb5_aname_to_localname(krb5_context context, krb5_const_principal aname, const int lnsize_in, char *lname) +krb5_aname_to_localname(krb5_context context, krb5_const_principal aname, int lnsize_in, char *lname) { krb5_error_code kret; char *realm; -- 2.26.2