Skip to contentSkip to conversation

tci: Fix wrong macro name for debug code

PATCH Applied Stefan Weil 3 participants 3 messages May 3, 2012 – May 8, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tci: Fix wrong macro name for debug code

Code which is compiled with CONFIG_TCG_DEBUG (set by configure option --enable-debug-tcg) should not disable the assert macro by defining NDEBUG.

With the wrong macro name CONFIG_TCG_DEBUG, all assertions in tci.c were completely useless because NDEBUG was always defined.

---
 tci.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Please apply this fix before the release of QEMU 1.1.

Thanks,

Stefan Weil

tci.c +1 -1
index 23a8368..e40c080 100644
@@ -20,7 +20,7 @@
 #include "config.h"
 
 /* Defining NDEBUG disables assertions (which makes the code faster). */
-#if !defined(CONFIG_TCG_DEBUG) && !defined(NDEBUG)
+#if !defined(CONFIG_DEBUG_TCG) && !defined(NDEBUG)
 # define NDEBUG
 #endif
 
Signature · 1 line
1.7.9
Reviewed-by on v1 1/1
#1 lore raw
Quoted 8 lines · Stefan Weil

Code which is compiled with CONFIG_TCG_DEBUG (set by configure option --enable-debug-tcg) should not disable the assert macro by defining NDEBUG.

With the wrong macro name CONFIG_TCG_DEBUG, all assertions in tci.c were completely useless because NDEBUG was always defined.

This now matches the equivalent check in tcg/tcg.c.

-- PMM

#2 lore raw
In reply to Stefan Weil
Quoted 8 lines · Stefan Weil

Code which is compiled with CONFIG_TCG_DEBUG (set by configure option --enable-debug-tcg) should not disable the assert macro by defining NDEBUG.

With the wrong macro name CONFIG_TCG_DEBUG, all assertions in tci.c were completely useless because NDEBUG was always defined.

Applied. Thanks.

Regards,

Anthony Liguori

Quoted 23 lines
---
  tci.c |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)

Please apply this fix before the release of QEMU 1.1.

Thanks,

Stefan Weil

tci.c +1 -1
index 23a8368..e40c080 100644
@@ -20,7 +20,7 @@
  #include "config.h"
 
  /* Defining NDEBUG disables assertions (which makes the code faster). */
-#if !defined(CONFIG_TCG_DEBUG)&&  !defined(NDEBUG)
+#if !defined(CONFIG_DEBUG_TCG)&&  !defined(NDEBUG)
  # define NDEBUG
  #endif