Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 21 Jun 2009 08:36:31 +0000 (UTC)
From:      Roman Divacky <rdivacky@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r194576 - head/sys/fs/ntfs
Message-ID:  <200906210836.n5L8aVWs000457@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rdivacky
Date: Sun Jun 21 08:36:30 2009
New Revision: 194576
URL: http://svn.freebsd.org/changeset/base/194576

Log:
  In non-debugging mode make this define (void)0 instead of nothing. This
  helps to catch bugs like the below with clang.
  
  	if (cond);		<--- note the trailing ;
  	   something();
  
  Approved by:	ed (mentor)
  Discussed on:	current@

Modified:
  head/sys/fs/ntfs/ntfs.h

Modified: head/sys/fs/ntfs/ntfs.h
==============================================================================
--- head/sys/fs/ntfs/ntfs.h	Sun Jun 21 07:54:47 2009	(r194575)
+++ head/sys/fs/ntfs/ntfs.h	Sun Jun 21 08:36:30 2009	(r194576)
@@ -296,11 +296,11 @@ MALLOC_DECLARE(M_NTFSNTHASH);
 #if NTFS_DEBUG > 1
 #define ddprintf(a) printf a
 #else
-#define ddprintf(a)
+#define ddprintf(a)	(void)0
 #endif
 #else
-#define dprintf(a)
-#define ddprintf(a)
+#define dprintf(a)	(void)0
+#define ddprintf(a)	(void)0
 #endif
 
 extern struct vop_vector ntfs_vnodeops;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200906210836.n5L8aVWs000457>