# threads.c: In function 'krb5int_thread_support_init':
# threads.c:456: warning: implicit declaration of function 'krb5int_err_init'
# errors.c: In function 'krb5int_vset_error':
# errors.c:52: warning: passing argument 1 of 'free' discards qualifiers from pointer target type
# errors.c:59: warning: implicit declaration of function 'vasprintf'
# errors.c: In function 'krb5int_get_error':
# errors.c:76: warning: assignment discards qualifiers from pointer target type
# errors.c:80: warning: implicit declaration of function 'krb5int_call_thread_support_init'
# errors.c:120: warning: assignment discards qualifiers from pointer target type
# errors.c: In function 'krb5int_clear_error':
# errors.c:146: warning: passing argument 2 of 'krb5int_free_error' discards qualifiers from pointer target type
#
--- util/support/errors.c
+++ util/support/errors.c	2006/06/21 07:36:30
@@ -31,6 +31,9 @@
 {
     return k5_mutex_finish_init (&krb5int_error_info_support_mutex);
 }
+
+extern int krb5int_call_thread_support_init(void);
+
 #define initialize()	krb5int_call_thread_support_init()
 #define lock()		k5_mutex_lock(&krb5int_error_info_support_mutex)
 #define unlock()	k5_mutex_unlock(&krb5int_error_info_support_mutex)
@@ -49,7 +52,7 @@
 		    const char *fmt, va_list args)
 {
     if (ep->msg && ep->msg != ep->scratch_buf) {
-	free (ep->msg);
+	free ((char*)ep->msg);
 	ep->msg = NULL;
     }
     ep->code = code;
@@ -73,7 +76,7 @@
     if (code != ep->code)
 	krb5int_clear_error (ep);
     if (ep->msg) {
-	r = ep->msg;
+	r = (char*)ep->msg;
 	ep->msg = NULL;
 	return r;
     }
@@ -117,7 +120,7 @@
 	sprintf (ep->scratch_buf, _("error %ld"), code);
 	return ep->scratch_buf;
     }
-    r = fptr(code);
+    r = (char*)fptr(code);
     if (r == NULL) {
 	unlock();
 	goto format_number;
@@ -143,7 +146,7 @@
 void
 krb5int_clear_error (struct errinfo *ep)
 {
-    krb5int_free_error (ep, ep->msg);
+    krb5int_free_error (ep, (char*)ep->msg);
     ep->msg = NULL;
 }
 
--- util/support/threads.c
+++ util/support/threads.c	2006/06/21 07:25:22
@@ -36,6 +36,8 @@
 MAKE_INIT_FUNCTION(krb5int_thread_support_init);
 MAKE_FINI_FUNCTION(krb5int_thread_support_fini);
 
+extern int krb5int_err_init(void);
+
 #ifndef ENABLE_THREADS /* no thread support */
 
 static void (*destructors[K5_KEY_MAX])(void *);
