aboutsummaryrefslogtreecommitdiff
path: root/gdb/main.c
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2016-04-21 11:34:18 +0100
committerPedro Alves <palves@redhat.com>2016-04-21 11:34:18 +0100
commitb36cec19e826c19648964576ef2d20d63f99e888 (patch)
tree63fd4feb5e17a10fb337e47938b4dd335239ca98 /gdb/main.c
parent96bf8cb07d2cc8d6f7b509c4430be9966fff1fdd (diff)
downloadgdb-b36cec19e826c19648964576ef2d20d63f99e888.zip
gdb-b36cec19e826c19648964576ef2d20d63f99e888.tar.gz
gdb-b36cec19e826c19648964576ef2d20d63f99e888.tar.bz2
Add missing sentinel 'char *' casts in concat/reconcat calls
The wildebeest-debian-wheezy-i686 buildslave's build is broken due to: ../../binutils-gdb/gdb/python/python.c: In function void _initialize_python(): ../../binutils-gdb/gdb/python/python.c:1709:36: error: missing sentinel in function call [-Werror=format] Reproduced on Fedora 23 by sticking a few: #undef NULL #define 0 in build/gdb/build-gnulib/{stddef|signal|stdio}.h. Hopefully this caught all instances. gdb/ChangeLog: 2016-04-21 Pedro Alves <palves@redhat.com> * dwarf2read.c (try_open_dwop_file, open_dwo_file) (file_file_name, file_full_name): Add char * cast to sentinel in concat/reconcat calls. * event-top.c (top_level_prompt): Likewise. * guile/guile.c (initialize_scheme_side): Likewise. * linux-tdep.c (linux_fill_prpsinfo): Likewise. * macrotab.c (macro_source_fullname): Likewise. * main.c (get_init_files, captured_main): Likewise. * psymtab.c (psymtab_to_fullname): Likewise. * python/python.c (_initialize_python) (gdbpy_finish_initialization): Likewise. * source.c (symtab_to_fullname): Likewise.
Diffstat (limited to 'gdb/main.c')
-rw-r--r--gdb/main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/main.c b/gdb/main.c
index 2ce1713..c6c702c 100644
--- a/gdb/main.c
+++ b/gdb/main.c
@@ -232,7 +232,7 @@ get_init_files (const char **system_gdbinit,
for (p = tmp_sys_gdbinit; IS_DIR_SEPARATOR (*p); ++p)
continue;
relocated_sysgdbinit = concat (gdb_datadir, SLASH_STRING, p,
- NULL);
+ (char *) NULL);
xfree (tmp_sys_gdbinit);
}
else
@@ -560,7 +560,7 @@ captured_main (void *data)
#ifdef WITH_PYTHON_PATH
{
/* For later use in helping Python find itself. */
- char *tmp = concat (WITH_PYTHON_PATH, SLASH_STRING, "lib", NULL);
+ char *tmp = concat (WITH_PYTHON_PATH, SLASH_STRING, "lib", (char *) NULL);
python_libdir = relocate_gdb_directory (tmp, PYTHON_PATH_RELOCATABLE);
xfree (tmp);