fix ASSERT and ASSERT_ALWAYS
- remove the != 0 inside the unlikely in ASSERT_ALWAYS because sparse now
complains about comparisons between pointers and 0
- add a standalone ASSERT implementation because defining it to
ASSERT_ALWAYS means the string is expanded before the token passing
stringification. This way we get the actual content of the
assertation in the assfail message and don't overflow sparse's
stringification buffer leading to sparse error messages.
Signed-off-by: Christoph Hellwig <hch@xxxxxx>
Date: Thu Aug 2 17:52:47 AEST 2007
Workarea: chook.melbourne.sgi.com:/build/dgc/isms/2.6.x-xfs
Inspected by: hch@xxxxxx
The following file(s) were checked into:
longdrop.melbourne.sgi.com:/isms/linux/2.6.x-xfs-melb
Modid: xfs-linux-melb:xfs-kern:29310a
fs/xfs/support/debug.h - 1.18 - changed
http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/support/debug.h.diff?r1=text&tr1=1.18&r2=text&tr2=1.17&f=h
- Clean up sparse warnings fo ASSERT_ALWAYS and make ASSERT always
stringify the failure correctly.
|