Re: [PATCH 3/3 V3] Add Wall_off switch to disable errors and warnings

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

 



> diff --git a/parse.c b/parse.c
> index 02275d8..d70dffb 100644
> --- a/parse.c
> +++ b/parse.c
> @@ -2746,6 +2746,10 @@ struct token *external_declaration(struct token *token, struct symbol_list **lis
>  
>  	/* Just a type declaration? */
>  	if (!ident) {
> +
> +		if (Wall_off)
> +			return token->next;
> +
>  		warning(token->pos, "missing identifier in declaration");
>  		return expect(token, ';', "at the end of type declaration");

This is on the wrong level.
You need to silence sparse in the spare_error function.

Not on the level where you do the expect() - otherwise you would
have to sprinkle "if (Wall_off)" checks everywhere.

This was also a problem in v1 of the patch.

	Sam
--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux