diff --git a/Lrzip.h b/Lrzip.h index 94d36a9..29bc2a9 100644 --- a/Lrzip.h +++ b/Lrzip.h @@ -128,10 +128,11 @@ typedef void (*Lrzip_Info_Cb)(void *data, int pct, int chunk_pct); * @param level The Lrzip_Log_Level of the message * @param line The line in LRZIP code where the message originated * @param file The file in LRZIP code where the message originated + * @param func The function in LRZIP code where the message originated * @param format The printf-style format of the message * @param args The matching va_list for @p format */ -typedef void (*Lrzip_Log_Cb)(void *data, unsigned int level, unsigned int line, const char *file, const char *format, va_list args); +typedef void (*Lrzip_Log_Cb)(void *data, unsigned int level, unsigned int line, const char *file, const char *func, const char *format, va_list args); /** * @typedef Lrzip_Password_Cb * @brief The callback to call for operations requiring a password diff --git a/liblrzip.c b/liblrzip.c index 344c39c..ed9622e 100644 --- a/liblrzip.c +++ b/liblrzip.c @@ -598,7 +598,7 @@ void lrzip_log_cb_set(Lrzip *lr, Lrzip_Log_Cb cb, void *log_data) { if (!lr) return; - lr->control->log_cb = (void*)cb; + lr->control->log_cb = cb; lr->control->log_data = log_data; } @@ -634,7 +634,7 @@ void lrzip_pass_cb_set(Lrzip *lr, Lrzip_Password_Cb cb, void *data) { if (!lr) return; - lr->control->pass_cb = (void*)cb; + lr->control->pass_cb = cb; lr->control->pass_data = data; } @@ -642,7 +642,7 @@ void lrzip_info_cb_set(Lrzip *lr, Lrzip_Info_Cb cb, void *data) { if (!lr) return; - lr->control->info_cb = (void*)cb; + lr->control->info_cb = cb; lr->control->info_data = data; } diff --git a/lrzip_private.h b/lrzip_private.h index d9e6db9..4a79918 100644 --- a/lrzip_private.h +++ b/lrzip_private.h @@ -441,7 +441,7 @@ struct rzip_control { int log_level; void (*info_cb)(void *data, int pct, int chunk_pct); void *info_data; - void (*log_cb)(void *data, unsigned int level, unsigned int line, const char *file, const char *func, const char *format, va_list); + void (*log_cb)(void *data, unsigned int level, unsigned int line, const char *file, const char *func, const char *format, va_list args); void *log_data; char chunk_bytes;