[U-Boot] [PATCH 2/7] common: avb_verify: Fix invalid 'for' loop condition
Igor Opaniuk
igor.opaniuk at linaro.org
Thu Aug 16 08:34:56 UTC 2018
Reviewed-by: Igor Opaniuk <igor.opaniuk at linaro.org>
On 14 August 2018 at 03:43, Eugeniu Rosca <roscaeugeniu at gmail.com> wrote:
> Fix below compiler [1] warning:
>
> common/avb_verify.c: In function ‘avb_find_dm_args’:
> common/avb_verify.c:179:30: warning: left-hand operand of comma expression has no effect [-Wunused-value]
> for (i = 0; i < AVB_MAX_ARGS, args[i]; ++i) {
>
> [1] aarch64-linux-gnu-gcc (Linaro GCC 7.2-2017.11)
>
> Signed-off-by: Eugeniu Rosca <erosca at de.adit-jv.com>
> ---
> common/avb_verify.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/common/avb_verify.c b/common/avb_verify.c
> index 20e35ade3029..e6f3f207ff6f 100644
> --- a/common/avb_verify.c
> +++ b/common/avb_verify.c
> @@ -176,7 +176,7 @@ static int avb_find_dm_args(char **args, char *str)
> if (!str)
> return -1;
>
> - for (i = 0; i < AVB_MAX_ARGS, args[i]; ++i) {
> + for (i = 0; i < AVB_MAX_ARGS && args[i]; ++i) {
> if (strstr(args[i], str))
> return i;
> }
> --
> 2.18.0
>
--
Regards,
Igor Opaniuk
More information about the U-Boot
mailing list