This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[RFA/commit] Fix build failure in varobj.c:update_dynamic_varobj_children
- From: Joel Brobecker <brobecker at adacore dot com>
- To: gdb-patches at sourceware dot org
- Cc: Joel Brobecker <brobecker at adacore dot com>
- Date: Tue, 9 Apr 2013 09:48:49 -0700
- Subject: [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