From ef47609ab73ba222e0ef9f2da51dca4650af69d8 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Mon, 7 Mar 2011 21:49:51 +0100 Subject: gui-wizard-gtk: add code to export/unexport config variables. Untested Signed-off-by: Denys Vlasenko --- src/cli/report.cpp | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'src/cli') diff --git a/src/cli/report.cpp b/src/cli/report.cpp index ff18d19c..ebbe8e0b 100644 --- a/src/cli/report.cpp +++ b/src/cli/report.cpp @@ -649,14 +649,8 @@ static int run_events(const char *dump_dir_name, for (GList *li = env_list; li; li = g_list_next(li)) { char *s = (char*)li->data; - /* Need to make a copy: just cutting s at '=' and unsetenv'ing - * the result would be a bug! s _itself_ is in environment now, - * we must not modify it there! - */ - char *name = xstrndup(s, strchrnul(s, '=') - s); - VERB3 log("Unexporting '%s'", name); - unsetenv(name); - free(name); + VERB3 log("Unexporting '%s'", s); + safe_unsetenv(s); free(s); } g_list_free(env_list); -- cgit From 93b9b18b5096c7591c02036e1c908f3bcbb09f29 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Wed, 9 Mar 2011 14:12:09 +0100 Subject: add -Wwrite-strings everywhere Signed-off-by: Denys Vlasenko --- src/cli/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/cli') diff --git a/src/cli/Makefile.am b/src/cli/Makefile.am index 0a5c6e1a..345598d0 100644 --- a/src/cli/Makefile.am +++ b/src/cli/Makefile.am @@ -13,7 +13,7 @@ abrt_cli_CPPFLAGS = \ $(ENABLE_SOCKET_OR_DBUS) \ $(DBUS_CFLAGS) $(GLIB_CFLAGS) \ -D_GNU_SOURCE \ - -Wall -Werror + -Wall -Wwrite-strings -Werror # $(GTK_CFLAGS) abrt_cli_LDADD = \ ../lib/libreport.la \ -- cgit