* 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
+2000-07-24 Ezra Peisach <epeisach@mit.edu>
+
+ * 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 <epeisach@mit.edu>
* prof_init.c (profile_init_path): Use profile_filespec_t instead
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)
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;
/* 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]);
goto cleanup;
}
- if ((retval = profile_init(flist, profilep)))
+ if ((retval = profile_init((const_profile_filespec_t *) flist,
+ profilep)))
goto cleanup;
*bufpp = bp;
#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 <Files.h>
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);
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);
}