From b36cec19e826c19648964576ef2d20d63f99e888 Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Thu, 21 Apr 2016 11:34:18 +0100 Subject: 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 * 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. --- gdb/python/python.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gdb/python') diff --git a/gdb/python/python.c b/gdb/python/python.c index 9c972ec..b90e5e5 100644 --- a/gdb/python/python.c +++ b/gdb/python/python.c @@ -1706,7 +1706,7 @@ message == an error message without a stack will be printed."), /foo/lib/pythonX.Y/... This must be done before calling Py_Initialize. */ progname = concat (ldirname (python_libdir), SLASH_STRING, "bin", - SLASH_STRING, "python", NULL); + SLASH_STRING, "python", (char *) NULL); #ifdef IS_PY3K oldloc = setlocale (LC_ALL, NULL); setlocale (LC_ALL, ""); @@ -1881,7 +1881,7 @@ gdbpy_finish_initialization (const struct extension_language_defn *extlang) /* Add the initial data-directory to sys.path. */ - gdb_pythondir = concat (gdb_datadir, SLASH_STRING, "python", NULL); + gdb_pythondir = concat (gdb_datadir, SLASH_STRING, "python", (char *) NULL); make_cleanup (xfree, gdb_pythondir); sys_path = PySys_GetObject ("path"); -- cgit v1.1