[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Subject: [PATCH] explicit cast to char*


On Wednesday, 8 March 2017 09:23:25 CET Max Noppel wrote:
>  From 80933a4a6962c269ca1a6f9804498716789d219b Mon Sep 17 00:00:00 2001
> From: noppel <noppel@xxxxxxxxxxxxx>
> Date: Wed, 8 Mar 2017 09:22:23 +0100
> Subject: [PATCH] explicit cast to char*

Which compiler complains here? We do C99 and the source is very clean in this 
regards.


Cheers,


	Andreas

> ---
>   src/cmocka.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/src/cmocka.c b/src/cmocka.c
> index b91dd65..f66e569 100644
> --- a/src/cmocka.c
> +++ b/src/cmocka.c
> @@ -1783,7 +1783,7 @@ static void vcm_print_error(const char* const
> format, va_list args)
>       if (cm_error_message == NULL) {
>           /* CREATE MESSAGE */
> 
> -        cm_error_message = libc_malloc(len + 1);
> +        cm_error_message = (char*)libc_malloc(len + 1);
>           if (cm_error_message == NULL) {
>               /* TODO */
>               goto end;
> @@ -1793,7 +1793,7 @@ static void vcm_print_error(const char* const
> format, va_list args)
>           char *tmp;
> 
>           msg_len = strlen(cm_error_message);
> -        tmp = libc_realloc(cm_error_message, msg_len + len + 1);
> +        tmp = (char*)libc_realloc(cm_error_message, msg_len + len + 1);
>           if (tmp == NULL) {
>               goto end;
>           }


-- 
Andreas Schneider                   GPG-ID: CC014E3D
www.cryptomilk.org                asn@xxxxxxxxxxxxxx

References:
Subject: [PATCH] explicit cast to char*Max Noppel <max@noppelmax.online>