From: Ezra Peisach Date: Mon, 24 Jul 2000 16:16:28 +0000 (+0000) Subject: * prof_init.c: Cleanup internal type warnings in calls to profile_init X-Git-Tag: krb5-1.3-alpha1~1955 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=df46f3e4ddddddf7302edca3fa2b98cb68ac8df2;p=krb5.git * prof_init.c: Cleanup internal type warnings in calls to profile_init * test_parse.c (main): Cast arguments to error_message. * prof_file.c (profile_open_file): Variable with argument to malloc should be unsigned. * profile.hin: Revert changes to const_profile_filespect_t and profile_filespec_t to preserve interface. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12585 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/util/profile/ChangeLog b/src/util/profile/ChangeLog index 9b8f9b667..a0f2b79ea 100644 --- a/src/util/profile/ChangeLog +++ b/src/util/profile/ChangeLog @@ -1,3 +1,15 @@ +2000-07-24 Ezra Peisach + + * prof_init.c: Cleanup internal type warnings in calls to profile_init. + + * test_parse.c (main): Cast arguments to error_message. + + * prof_file.c (profile_open_file): Variable with argument to + malloc should be unsigned. + + * profile.hin: Revert changes to const_profile_filespect_t and + profile_filespec_t to preserve interface. + 2000-06-26 Ezra Peisach * prof_init.c (profile_init_path): Use profile_filespec_t instead diff --git a/src/util/profile/prof_file.c b/src/util/profile/prof_file.c index 77c4f551e..83f447729 100644 --- a/src/util/profile/prof_file.c +++ b/src/util/profile/prof_file.c @@ -73,7 +73,7 @@ errcode_t profile_open_file(filespec, ret_prof) prf_file_t prf; errcode_t retval; char *home_env = 0; - int len; + unsigned int len; prf = malloc(sizeof(struct _prf_file_t)); if (!prf) diff --git a/src/util/profile/prof_init.c b/src/util/profile/prof_init.c index 448c2228e..b3b275a66 100644 --- a/src/util/profile/prof_init.c +++ b/src/util/profile/prof_init.c @@ -83,7 +83,7 @@ profile_init_path(filepath, ret_profile) profile_t *ret_profile; { int n_entries, i; - int ent_len; + unsigned int ent_len; const char *s, *t; profile_filespec_t *filenames; errcode_t retval; @@ -119,7 +119,8 @@ profile_init_path(filepath, ret_profile) /* cap the array */ filenames[i] = 0; - retval = profile_init(filenames, ret_profile); + retval = profile_init((const_profile_filespec_t *) filenames, + ret_profile); /* count back down and free the entries */ while(--i >= 0) free(filenames[i]); @@ -349,7 +350,8 @@ errcode_t profile_ser_internalize(unused, profilep, bufpp, remainp) goto cleanup; } - if ((retval = profile_init(flist, profilep))) + if ((retval = profile_init((const_profile_filespec_t *) flist, + profilep))) goto cleanup; *bufpp = bp; diff --git a/src/util/profile/profile.hin b/src/util/profile/profile.hin index e86d68963..60387f08e 100644 --- a/src/util/profile/profile.hin +++ b/src/util/profile/profile.hin @@ -53,8 +53,8 @@ extern "C" { #ifdef PROFILE_USES_PATHS typedef char* profile_filespec_t; /* path as C string */ typedef char* profile_filespec_list_t; /* list of : separated paths, C string */ -typedef const profile_filespec_t const_profile_filespec_t; /* path as C string */ -typedef const profile_filespec_list_t const_profile_filespec_list_t; /* list of : separated paths, C string */ +typedef const char * const_profile_filespec_t; /* path as C string */ +typedef const char * const_profile_filespec_list_t; /* list of : separated paths, C string */ #else /* On MacOS, we use native file specifiers as unique file identifiers */ #include diff --git a/src/util/profile/test_parse.c b/src/util/profile/test_parse.c index 29e2b5940..438675058 100644 --- a/src/util/profile/test_parse.c +++ b/src/util/profile/test_parse.c @@ -32,7 +32,8 @@ int main(argc, argv) retval = profile_parse_file(f, &root); if (retval) { - printf("profile_parse_file error %s\n", error_message(retval)); + printf("profile_parse_file error %s\n", + error_message((errcode_t) retval)); exit(1); } fclose(f); @@ -43,7 +44,7 @@ int main(argc, argv) retval = profile_verify_node(root); if (retval) { printf("profile_verify_node reported an error: %s\n", - error_message(retval)); + error_message((errcode_t) retval)); exit(1); }