diff --git a/lib/com_err/com_err.c b/lib/com_err/com_err.c index 52f6e2e43..d212e40d3 100644 --- a/lib/com_err/com_err.c +++ b/lib/com_err/com_err.c @@ -63,7 +63,7 @@ error_message (long code) } KRB5_LIB_FUNCTION int KRB5_LIB_CALL -init_error_table(const char **msgs, long base, int count) +init_error_table(const char *const *msgs, long base, int count) { initialize_error_table_r(&_et_list, msgs, count, base); return 0; diff --git a/lib/com_err/com_err.h b/lib/com_err/com_err.h index e71eabf2e..0588fe014 100644 --- a/lib/com_err/com_err.h +++ b/lib/com_err/com_err.h @@ -51,7 +51,7 @@ KRB5_LIB_FUNCTION const char * KRB5_LIB_CALL error_message (long); KRB5_LIB_FUNCTION int KRB5_LIB_CALL -init_error_table (const char**, long, int); +init_error_table (const char *const *, long, int); KRB5_LIB_FUNCTION void KRB5_LIB_CALL com_err_va (const char *, long, const char *, va_list) diff --git a/lib/com_err/com_right.h b/lib/com_err/com_right.h index 7741684f0..9efb633e5 100644 --- a/lib/com_err/com_right.h +++ b/lib/com_err/com_right.h @@ -79,7 +79,7 @@ KRB5_LIB_FUNCTION const char * KRB5_LIB_CALL com_right_r (struct et_list *list, long code, char *, size_t); KRB5_LIB_FUNCTION void KRB5_LIB_CALL -initialize_error_table_r (struct et_list **, const char **, int, long); +initialize_error_table_r (struct et_list **, const char *const *, int, long); KRB5_LIB_FUNCTION void KRB5_LIB_CALL free_error_table (struct et_list *); diff --git a/lib/com_err/compile_et.c b/lib/com_err/compile_et.c index 84ebf0cc9..033e0aaab 100644 --- a/lib/com_err/compile_et.c +++ b/lib/com_err/compile_et.c @@ -87,7 +87,7 @@ generate_c(void) fprintf(c_file, "#define N_(x) (x)\n"); fprintf(c_file, "\n"); - fprintf(c_file, "static const char *%s_error_strings[] = {\n", name); + fprintf(c_file, "static const char *const %s_error_strings[] = {\n", name); for(ec = codes, n = 0; ec; ec = ec->next, n++) { while(n < ec->number) { diff --git a/lib/com_err/error.c b/lib/com_err/error.c index bf046da22..3ce714bfc 100644 --- a/lib/com_err/error.c +++ b/lib/com_err/error.c @@ -81,7 +81,7 @@ struct foobar { KRB5_LIB_FUNCTION void KRB5_LIB_CALL initialize_error_table_r(struct et_list **list, - const char **messages, + const char *const *messages, int num_errors, long base) {