[gnome-commander] Removes gcc warning about uid_t which can not be less than zero
- From: Uwe Scholz <uwescholz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-commander] Removes gcc warning about uid_t which can not be less than zero
- Date: Tue, 11 Apr 2017 20:27:38 +0000 (UTC)
commit ce98b7d9d2a707083acedcad4268b64c58e8240f
Author: Uwe Scholz <uwescholz src gnome org>
Date: Wed Mar 22 21:34:19 2017 +0100
Removes gcc warning about uid_t which can not be less than zero
src/dialogs/gnome-cmd-chown-dialog.cc | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/src/dialogs/gnome-cmd-chown-dialog.cc b/src/dialogs/gnome-cmd-chown-dialog.cc
index 632f4db..0f27bf1 100644
--- a/src/dialogs/gnome-cmd-chown-dialog.cc
+++ b/src/dialogs/gnome-cmd-chown-dialog.cc
@@ -87,15 +87,19 @@ static void on_ok (GtkButton *button, GnomeCmdChownDialog *dialog)
{
uid_t uid = -1;
gid_t gid = -1;
+ gint gid_temp;
if (gcmd_owner.is_root())
{
- uid = gnome_cmd_chown_component_get_owner (GNOME_CMD_CHOWN_COMPONENT
(dialog->priv->chown_component));
- g_return_if_fail (uid >= 0);
+ gint uid_temp;
+ uid_temp = gnome_cmd_chown_component_get_owner (GNOME_CMD_CHOWN_COMPONENT
(dialog->priv->chown_component));
+ g_return_if_fail (uid_temp >= 0);
+ uid = uid_temp;
}
- gid = gnome_cmd_chown_component_get_group (GNOME_CMD_CHOWN_COMPONENT (dialog->priv->chown_component));
- g_return_if_fail (gid >= 0);
+ gid_temp = gnome_cmd_chown_component_get_group (GNOME_CMD_CHOWN_COMPONENT
(dialog->priv->chown_component));
+ g_return_if_fail (gid_temp >= 0);
+ gid = gid_temp;
gboolean recurse = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (dialog->priv->recurse_check));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]