Re: [tip:core/urgent] WARN_ON_SMP(): Allow use in if() statements on UP

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

 



On Fri, 2011-03-25 at 21:31 +0200, Alexey Dobriyan wrote:

> > Would you like me to add a comment that states:
> > 
> > 	/*
> > 	 * Use ({0;}) as just "0" will cause gcc to output:
> > 	 *   warning: statement with no effect
> > 	 */
> 
> Try ((void)0)

Maybe I should update the comment to stop further confusion:

	/*
	 * Use ({0;}) as it works nicely in both an if statement and
	 * as a stand alone line statement.
	 *   "0;" causes "warning: statement with no effect"
	 *   ((void)0) does not work in an if () condition.
	 */

-- Steve


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


[Index of Archives]     [Linux Stable Commits]     [Linux Stable Kernel]     [Linux Kernel]     [Linux USB Devel]     [Linux Video &Media]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux