From: Mathieu Desnoyers Date: Mon, 7 May 2012 15:10:52 +0000 (-0400) Subject: rculfhash: use do {} while (0) for dbg_printf() X-Git-Tag: v0.7.0~19 X-Git-Url: http://git.lttng.org./?a=commitdiff_plain;h=87fbf522618013b675cfd10863630506ad882ef7;hp=87fbf522618013b675cfd10863630506ad882ef7;p=urcu.git rculfhash: use do {} while (0) for dbg_printf() found by clang(make CC=clang). avoid empty statement. ------------------------- if (condition) dbg_printf() /* forget ";", but compiler say nothing if dbg_printf() is empty */ statement; ------------------------- also add printf format check. (we can use gcc extention "__printf(1, 2)" to declare a dummy inline function to do the check, but I use "printf()" directly here) Signed-off-by: Lai Jiangshan Signed-off-by: Mathieu Desnoyers ---