[planner] Fix warning: variable 'cmd' set but not used
- From: Alexandre Franke <afranke src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [planner] Fix warning: variable 'cmd' set but not used
- Date: Sun, 25 Dec 2011 02:53:34 +0000 (UTC)
commit 9fae7203a6030a4210e7f3643c5428335b82ba12
Author: Alexandre Franke <alexandre franke gmail com>
Date: Sun Dec 25 03:52:36 2011 +0100
Fix warning: variable 'cmd' set but not used
https://bugzilla.gnome.org/show_bug.cgi?id=662063
src/planner-task-dialog.c | 17 +++++++----------
1 files changed, 7 insertions(+), 10 deletions(-)
---
diff --git a/src/planner-task-dialog.c b/src/planner-task-dialog.c
index ca078dc..a1d6afc 100644
--- a/src/planner-task-dialog.c
+++ b/src/planner-task-dialog.c
@@ -1072,7 +1072,6 @@ static PlannerCmd *
task_cmd_edit_note (DialogData *data,
const gchar *focus_in_note)
{
- PlannerCmd *cmd_base;
TaskCmdEditNote *cmd;
gchar *note;
@@ -1083,13 +1082,11 @@ task_cmd_edit_note (DialogData *data,
return NULL;
}
- cmd_base = planner_cmd_new (TaskCmdEditNote,
- _("Edit task note"),
- task_cmd_edit_note_do,
- task_cmd_edit_note_undo,
- task_cmd_edit_note_free);
-
- cmd = (TaskCmdEditNote *) cmd_base;
+ cmd = (TaskCmdEditNote *) planner_cmd_new (TaskCmdEditNote,
+ _("Edit task note"),
+ task_cmd_edit_note_do,
+ task_cmd_edit_note_undo,
+ task_cmd_edit_note_free);
cmd->property = g_strdup ("note");
cmd->task = g_object_ref (data->task);
@@ -1098,9 +1095,9 @@ task_cmd_edit_note (DialogData *data,
cmd->note = note;
planner_cmd_manager_insert_and_do (planner_window_get_cmd_manager (data->main_window),
- cmd_base);
+ (PlannerCmd *) cmd);
- return cmd_base;
+ return (PlannerCmd *) cmd;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]