From 74b86b4ae65d77068aa64336f1c36c3a75e50ab4 Mon Sep 17 00:00:00 2001 From: "Nickolay V. Shmyrev" Date: Tue, 16 Aug 2005 15:49:48 +0000 Subject: [PATCH] Fix build warnings and compilation with dbus 0.35.2 --- ChangeLog | 11 +++++++++++ configure.ac | 2 +- shell/ev-utils.c | 8 ++------ shell/ev-window.c | 1 + 4 files changed, 15 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 49ff9894..204474d4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2005-08-16 Nickolay V. Shmyrev + + * shell/ev-utils.c: (set_umask_permissions), (write_to_temp_file): + * shell/ev-window.c: + Fix build warnings + +2005-08-16 Carlos Garcia Campos + + * configure.ac: Update script to get dbus version. + Fix for the bug #313443. + 2005-08-16 Nickolay V. Shmyrev * shell/ev-window.c: (ev_window_cmd_escape): diff --git a/configure.ac b/configure.ac index 519474b9..c0f0163a 100644 --- a/configure.ac +++ b/configure.ac @@ -75,7 +75,7 @@ if test "x$enable_dbus" = "xyes" ; then AC_DEFINE([ENABLE_DBUS],[1],[Define if DBUS support is enabled]) - DBUS_VERSION=`$PKG_CONFIG --modversion dbus-glib-1 | sed 's/0.\([[0-9]]*\)/\1/'` + DBUS_VERSION=`$PKG_CONFIG --modversion dbus-glib-1 | sed 's/0\.\([[0-9]]*\)\.\?\([[0-9]]*\)/\1/'` AC_DEFINE_UNQUOTED(DBUS_VERSION, $DBUS_VERSION, [DBUS version.]) fi diff --git a/shell/ev-utils.c b/shell/ev-utils.c index 21563eb9..9fc74c65 100644 --- a/shell/ev-utils.c +++ b/shell/ev-utils.c @@ -213,6 +213,7 @@ ev_print_region_contents (GdkRegion *region) #include #include #include +#include static gboolean rename_file (const char *old_name, @@ -240,8 +241,6 @@ set_umask_permissions (int fd, * the umask in between the getting and the setting of the umask. * So we have to do the whole thing in a child process. */ - - int save_errno; pid_t pid; pid = fork (); @@ -276,9 +275,7 @@ set_umask_permissions (int fd, if (WIFEXITED (status)) { - save_errno = WEXITSTATUS (status); - - if (save_errno == 0) + if (WEXITSTATUS (status) == 0) { return TRUE; } @@ -309,7 +306,6 @@ write_to_temp_file (const gchar *contents, gchar *retval; FILE *file; gint fd; - int save_errno; retval = NULL; diff --git a/shell/ev-window.c b/shell/ev-window.c index 68174cc3..d860d745 100644 --- a/shell/ev-window.c +++ b/shell/ev-window.c @@ -62,6 +62,7 @@ #include "ev-stock-icons.h" #include "ev-metadata-manager.h" #include "ev-file-helpers.h" +#include "ev-utils.h" #include -- 2.43.5