qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v2] puv3: always compile-check debug printf
@ 2017-03-16  5:41 Anishka0107
  2017-03-17  4:29 ` Stefan Hajnoczi
  0 siblings, 1 reply; 2+ messages in thread
From: Anishka0107 @ 2017-03-16  5:41 UTC (permalink / raw)
  To: qemu-devel; +Cc: jsnow, stefanha, Anishka0107

     To prevent bitrot of the format string of the debug statement, files with
     conditional debug statements should ensure that printf is compiled always,
     and enclosed within if(0) statements and not in #ifdef.

Signed-off-by: Anishka Gupta <rimjhim0107@gmail.com>
---
 include/hw/unicore32/puv3.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/include/hw/unicore32/puv3.h b/include/hw/unicore32/puv3.h
index e268484..9fdf0a1 100644
--- a/include/hw/unicore32/puv3.h
+++ b/include/hw/unicore32/puv3.h
@@ -46,8 +46,7 @@
 #define DPRINTF(fmt, ...)
     if (DEBUG_PUV3) {
         fprintf(stderr, "%s: " fmt , __func__, ## __VA_ARGS__)
-    }
-    else {
+    } else {
         do {} while (0)
     }
 
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-03-17  4:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-16  5:41 [Qemu-devel] [PATCH v2] puv3: always compile-check debug printf Anishka0107
2017-03-17  4:29 ` Stefan Hajnoczi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).