Fix PR gdb/21364: Dead code due to an unreachable condition in osdata.c
Pedro's recent commits enabling -Wwrite-strings has changed a bit the logic of info_osdata. Now, 'type' is always non-NULL, so we have to check if it's an empty string instead of NULL. One of the checks was fixed, but there is another that was left behind. This commit fixes it. gdb/ChangeLog: 2017-04-10 Sergio Durigan Junior <sergiodj@redhat.com> PR gdb/21364 * osdata.c (info_osdata): Check if 'type' is an empty string instead of NULL.
This commit is contained in:
parent
28d909e539
commit
a5bef50fdb
@ -1,3 +1,9 @@
|
||||
2017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
|
||||
|
||||
PR gdb/21364
|
||||
* osdata.c (info_osdata): Check if 'type' is an empty string
|
||||
instead of NULL.
|
||||
|
||||
2017-04-10 Pedro Alves <palves@redhat.com>
|
||||
|
||||
* thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
|
||||
|
||||
@ -318,7 +318,7 @@ info_osdata (const char *type)
|
||||
for a column named "Title", and only include it with MI
|
||||
output; this column's normal use is for titles for interface
|
||||
elements like menus, and it clutters up CLI output. */
|
||||
if (!type && !uiout->is_mi_like_p ())
|
||||
if (*type == '\0' && !uiout->is_mi_like_p ())
|
||||
{
|
||||
struct osdata_column *col;
|
||||
int ix;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user