diff --git a/src/iconv_tools.cc b/src/iconv_tools.cc index 0c548f85..9847ec3e 100644 --- a/src/iconv_tools.cc +++ b/src/iconv_tools.cc @@ -45,11 +45,11 @@ static iconv_t **iconv_cd = 0; int register_iconv(iconv_t *new_iconv) { - iconv_cd = realloc(iconv_cd, sizeof(iconv_t *) * (iconv_count + 1)); + iconv_cd = (void ***) realloc(iconv_cd, sizeof(iconv_t *) * (iconv_count + 1)); if (!iconv_cd) { CRIT_ERR(NULL, NULL, "Out of memory"); } - iconv_cd[iconv_count] = malloc(sizeof(iconv_t)); + iconv_cd[iconv_count] = (void **) malloc(sizeof(iconv_t)); if (!iconv_cd[iconv_count]) { CRIT_ERR(NULL, NULL, "Out of memory"); } diff --git a/src/iconv_tools.h b/src/iconv_tools.h index a552d982..c252abb2 100644 --- a/src/iconv_tools.h +++ b/src/iconv_tools.h @@ -31,10 +31,6 @@ #ifndef _ICONV_TOOLS_H #define _ICONV_TOOLS_H -#ifdef __cplusplus -extern "C" { -#endif - void free_iconv(struct text_object *); void iconv_convert(size_t *, char *, char *, size_t); void init_iconv_start(struct text_object *, void *, const char *); @@ -43,8 +39,4 @@ void init_iconv_stop(void); void print_iconv_start(struct text_object *, char *, int); void print_iconv_stop(struct text_object *, char *, int); -#ifdef __cplusplus -} -#endif - #endif /* _ICONV_TOOLS_H */