qemu-arm
[Top][All Lists]
Advanced

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

Re: [PATCH for-5.0] hw/gpio/aspeed_gpio.c: Don't directly include assert


From: Cédric Le Goater
Subject: Re: [PATCH for-5.0] hw/gpio/aspeed_gpio.c: Don't directly include assert.h
Date: Fri, 3 Apr 2020 15:28:39 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0

On 4/3/20 2:47 PM, Peter Maydell wrote:
> Remove a direct include of assert.h -- this is already
> provided by qemu/osdep.h, and it breaks our rule that the
> first include must always be osdep.h.
> 
> In particular we must get the assert() macro via osdep.h
> to avoid compile failures on mingw (see the comment in
> osdep.h where we redefine assert() for that platform).
> 
> Signed-off-by: Peter Maydell <address@hidden>


Reviewed-by: Cédric Le Goater <address@hidden>

> ---
> Reported via a random comment on our github mirror...
> we should probably do a proper clean-includes run post-5.0.

with a 'sort' maybe.

Thanks,

C. 

> 
>  hw/gpio/aspeed_gpio.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/hw/gpio/aspeed_gpio.c b/hw/gpio/aspeed_gpio.c
> index 41e11ea9b04..e52fcfd9a03 100644
> --- a/hw/gpio/aspeed_gpio.c
> +++ b/hw/gpio/aspeed_gpio.c
> @@ -6,8 +6,6 @@
>   * SPDX-License-Identifier: GPL-2.0-or-later
>   */
>  
> -#include <assert.h>
> -
>  #include "qemu/osdep.h"
>  #include "qemu/host-utils.h"
>  #include "qemu/log.h"
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]