* prof_init.c: Cleanup internal type warnings in calls to profile_init
authorEzra Peisach <epeisach@mit.edu>
Mon, 24 Jul 2000 16:16:28 +0000 (16:16 +0000)
committerEzra Peisach <epeisach@mit.edu>
Mon, 24 Jul 2000 16:16:28 +0000 (16:16 +0000)
* 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

src/util/profile/ChangeLog
src/util/profile/prof_file.c
src/util/profile/prof_init.c
src/util/profile/profile.hin
src/util/profile/test_parse.c

index 9b8f9b667f9dac6ec9b4452bda933a350c449f57..a0f2b79ea911180da6b511f043063f36cc4d7558 100644 (file)
@@ -1,3 +1,15 @@
+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
index 77c4f551e679cb0dd52790cebb8fc64db57b89c6..83f447729450b8a4631543deb50391689be3fa37 100644 (file)
@@ -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)
index 448c2228e0421676d26704b711fcce88bfd41509..b3b275a66ea38750300acc2e06449bba0ff5c215 100644 (file)
@@ -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;
index e86d6896355dab40c91b59968f8882b3d5b95e8d..60387f08edd5d4483c61d4bd3cbce19ffcb14ffd 100644 (file)
@@ -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 <Files.h>
index 29e2b59405b9e064210deaf93418018d3e69b24a..4386750581d081ca63003c4ab89a68e07d7b3c63 100644 (file)
@@ -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);
        }