Re: [PATCH 3/3] Add NOWARN and NOERR compile conditions

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

 



On 07/31/2015 07:46 PM, Christopher Li wrote:
On Thu, Jul 30, 2015 at 4:45 AM, Tony Camuso <tcamuso@xxxxxxxxxx> wrote:

I thought it would be less intrusive, since I don't know how useful
this would be to others.

If you prefer a switch, I will do that.

I agree that this should be run time behavior.

+
+#if defined NOWARN || defined NOERR
+               return token->next;
+#else

What is up with this change? It is not output warning or not.
It affect the parsing as well. If sparse can't bail out properly,
this should be a separate patch.

Chris


Hi, Chris.

I've since submitted a runtime patch (3/3 V3) with a switch as a
response to this patch, but it basically does the same thing here.

Consider the case where the source contains something like this...

	struct foo {
		union {
			int number;
			int *pointer;
		};
	};

There being no ident for the union within the struct, we get the warning,
"missing identifier in declaration" etc.

Code without the patch.

	/* Just a type declaration? */
	if (!ident) {
		warning(token->pos, "missing identifier in declaration");
		return expect(token, ';', "at the end of type declaration");
	}
Regards,
Tony

--
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