ACK: [PATCH 10/27] lib: fwts_json.h: fix casting warning, add missing const

Alex Hung alex.hung at canonical.com
Wed Aug 15 17:55:40 UTC 2018


On 2018-08-15 06:11 AM, Colin King wrote:
> From: Colin Ian King <colin.king at canonical.com>
> 
> We need to be comparing a const pointer, add in the missing const
> to clean up a build warning.
> 
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
>   src/lib/include/fwts_json.h | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/lib/include/fwts_json.h b/src/lib/include/fwts_json.h
> index 82a0cc09..d81b60d4 100644
> --- a/src/lib/include/fwts_json.h
> +++ b/src/lib/include/fwts_json.h
> @@ -29,6 +29,6 @@
>    *  versions return NULL, so check for these. Sigh.
>    */
>   #define FWTS_JSON_ERROR(ptr) \
> -	( (ptr == NULL) || ((json_object*)ptr == __FWTS_JSON_ERR_PTR__) )
> +	( (ptr == NULL) || ((const json_object *)ptr == __FWTS_JSON_ERR_PTR__) )
>   
>   #endif
> 

Acked-by: Alex Hung <alex.hung at canonical.com>



More information about the fwts-devel mailing list