This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[RFA/commit] Fix build failure in varobj.c:update_dynamic_varobj_children


Hello,

Something that our compiler started flagging. When building GDB
without Python, the compiler does not like the `0 && "message"'
expression. I am proposing we replace this with...

    gdb_assert_no_reached ("message");

... instead, which should be better anyway.

gdb/ChangeLog:

        * varobj.c (update_dynamic_varobj_children) [!HAVE_PYTHON]:
        Use gdb_assert_not_reached instead of invalid boolean expression.

Tested by rebuilding on x86_64-linux. Any objection to this?

Thanks,
-- 
Joel

---
 gdb/varobj.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gdb/varobj.c b/gdb/varobj.c
index 8458836..467e59a 100644
--- a/gdb/varobj.c
+++ b/gdb/varobj.c
@@ -1252,7 +1252,7 @@ update_dynamic_varobj_children (struct varobj *var,
 
   return 1;
 #else
-  gdb_assert (0 && "should never be called if Python is not enabled");
+  gdb_assert_not_reached ("should never be called if Python is not enabled");
 #endif
 }
 
-- 
1.7.10.4


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]