From c4f7c6870333c6efaee5cf15d53e1a45a394e78e Mon Sep 17 00:00:00 2001 From: Mark Kettenis Date: Tue, 4 May 2010 21:09:25 +0000 Subject: [PATCH] * remote.c (register_remote_support_xml) (remote_query_supported_append, remote_query_supported): Add cast to NULL used as sentinel. * tracepoint.c (tvariables_info_1): Likewise. * utils.c (add_internal_problem_command): Likewise. --- gdb/ChangeLog | 8 ++++++++ gdb/remote.c | 8 ++++---- gdb/tracepoint.c | 4 ++-- gdb/utils.c | 10 ++++++---- 4 files changed, 20 insertions(+), 10 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 38ca84f2823..ece4fc00751 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,11 @@ +2010-05-04 Mark Kettenis + + * remote.c (register_remote_support_xml) + (remote_query_supported_append, remote_query_supported): Add cast + to NULL used as sentinel. + * tracepoint.c (tvariables_info_1): Likewise. + * utils.c (add_internal_problem_command): Likewise. + 2010-05-04 Matthew Gretton-Dann * dwarf2loc.c (read_pieced_value, write_pieced_value, diff --git a/gdb/remote.c b/gdb/remote.c index d5f48946fbb..34042fa4871 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -3486,7 +3486,7 @@ register_remote_support_xml (const char *xml ATTRIBUTE_UNUSED) { #if defined(HAVE_LIBEXPAT) if (remote_support_xml == NULL) - remote_support_xml = concat ("xmlRegisters=", xml, NULL); + remote_support_xml = concat ("xmlRegisters=", xml, (char *) NULL); else { char *copy = xstrdup (remote_support_xml + 13); @@ -3504,7 +3504,7 @@ register_remote_support_xml (const char *xml ATTRIBUTE_UNUSED) while ((p = strtok (NULL, ",")) != NULL); xfree (copy); - p = concat (remote_support_xml, ",", xml, NULL); + p = concat (remote_support_xml, ",", xml, (char *) NULL); xfree (remote_support_xml); remote_support_xml = p; } @@ -3516,7 +3516,7 @@ remote_query_supported_append (char *msg, const char *append) { if (msg) { - char *p = concat (msg, ";", append, NULL); + char *p = concat (msg, ";", append, (char *) NULL); xfree (msg); return p; } @@ -3556,7 +3556,7 @@ remote_query_supported (void) if (q) { - char *p = concat ("qSupported:", q, NULL); + char *p = concat ("qSupported:", q, (char *) NULL); xfree (q); putpkt (p); xfree (p); diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c index 1e0feecf7c0..d62f66012d2 100644 --- a/gdb/tracepoint.c +++ b/gdb/tracepoint.c @@ -446,7 +446,7 @@ tvariables_info_1 (void) back_to2 = make_cleanup_ui_out_tuple_begin_end (uiout, "variable"); - name = concat ("$", tsv->name, NULL); + name = concat ("$", tsv->name, (char *) NULL); make_cleanup (xfree, name); ui_out_field_string (uiout, "name", name); ui_out_field_string (uiout, "initial", plongest (tsv->initial_value)); @@ -3171,7 +3171,7 @@ tfile_open (char *filename, int from_tty) filename = tilde_expand (filename); if (!IS_ABSOLUTE_PATH(filename)) { - temp = concat (current_directory, "/", filename, (char *)NULL); + temp = concat (current_directory, "/", filename, (char *) NULL); xfree (filename); filename = temp; } diff --git a/gdb/utils.c b/gdb/utils.c index b4b85b1f344..875faafe100 100644 --- a/gdb/utils.c +++ b/gdb/utils.c @@ -1120,13 +1120,15 @@ add_internal_problem_command (struct internal_problem *problem) add_prefix_cmd ((char*) problem->name, class_maintenance, set_internal_problem_cmd, set_doc, set_cmd_list, - concat ("maintenance set ", problem->name, " ", NULL), + concat ("maintenance set ", problem->name, " ", + (char *) NULL), 0/*allow-unknown*/, &maintenance_set_cmdlist); add_prefix_cmd ((char*) problem->name, class_maintenance, show_internal_problem_cmd, show_doc, show_cmd_list, - concat ("maintenance show ", problem->name, " ", NULL), + concat ("maintenance show ", problem->name, " ", + (char *) NULL), 0/*allow-unknown*/, &maintenance_show_cmdlist); set_doc = xstrprintf (_("\ @@ -3346,9 +3348,9 @@ xfullpath (const char *filename) directory separator, avoid doubling it. */ real_path = gdb_realpath (dir_name); if (IS_DIR_SEPARATOR (real_path[strlen (real_path) - 1])) - result = concat (real_path, base_name, (char *)NULL); + result = concat (real_path, base_name, (char *) NULL); else - result = concat (real_path, SLASH_STRING, base_name, (char *)NULL); + result = concat (real_path, SLASH_STRING, base_name, (char *) NULL); xfree (real_path); return result; -- 2.30.2