Re: WARN_ON() which sometimes sucks

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

 



On Tue, Jul 31, 2007 at 07:55:27PM +0400, Alexey Dobriyan wrote:
> It started when I tried to write
> 
> 	WARN_ON(m->seq_ops_allocated);
> 
> in today's "[PATCH] single_open/seq_release leak diagnostics?.
> Suprisingly compiler told me piss off with:
> 
> 	  CC      fs/seq_file.o
> 	fs/seq_file.c: In function 'seq_release':
> 	fs/seq_file.c:285: error: 'typeof' applied to a bit-field
> 
> Well, duh! Earlier versions of WARN_ON allowed that until commit
> 684f978347deb42d180373ac4c427f82ef963171? which added typeof().
> 
> OK, nobody noticed that WARN_ON(bitfield) stopped working. But I
> question the rationale of that commit:

Actually, the real problem is different - WTF do we need that typeof
anyway?
	int ret_warn_on = !!(condition);
	[same as now]
will work just fine...
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux