[Xfce4-commits] [panel-plugins/xfce4-timer-plugin] 01/02: Resolve GCC warning: ISO C90 forbids mixed declarations and code

noreply at xfce.org noreply at xfce.org
Fri Sep 7 02:52:55 CEST 2018


This is an automated email from the git hooks/post-receive script.

a   n   d   r   e       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       m   a   s   t   e   r   
   in repository panel-plugins/xfce4-timer-plugin.

commit 1a73e70928acb2e9731ef1767eb6fab132501718
Author: Andre Miranda <andreldm at xfce.org>
Date:   Thu Sep 6 21:09:31 2018 -0300

    Resolve GCC warning: ISO C90 forbids mixed declarations and code
---
 panel-plugin/xfcetimer.c | 22 ++++++++++++----------
 1 file changed, 12 insertions(+), 10 deletions(-)

diff --git a/panel-plugin/xfcetimer.c b/panel-plugin/xfcetimer.c
index cf604dd..d0af382 100644
--- a/panel-plugin/xfcetimer.c
+++ b/panel-plugin/xfcetimer.c
@@ -68,24 +68,26 @@ make_menu (plugin_data *pd);
 static gboolean
 repeat_alarm (gpointer data)
 {
-	alarm_t *alrm;
-	alrm = (alarm_t *) data;
-	plugin_data *pd = alrm->pd;
+  alarm_t *alrm;
+  gchar *command;
+  plugin_data *pd;
+
+  alrm = (alarm_t *) data;
+  pd = alrm->pd;
 
   /* Don't repeat anymore */
   if (alrm->rem_repetitions == 0)
     {
-	  alrm->is_repeating=FALSE;
+      alrm->is_repeating=FALSE;
       return FALSE;
     }
 
-  gchar *command;
   if (strlen(alrm->command)>0)
-  command = g_strdup(alrm->command);
+    command = g_strdup(alrm->command);
   else if (pd->use_global_command)
-	  command = g_strdup (pd->global_command);
+    command = g_strdup (pd->global_command);
   else
-	  command = g_strdup("");
+    command = g_strdup("");
 
   g_spawn_command_line_async (command, NULL);
   alrm->rem_repetitions = alrm->rem_repetitions - 1;
@@ -185,6 +187,8 @@ update_function (gpointer data)
 		  }
 	  callAgain =  TRUE;
 	  }else{
+			  gchar *command;
+
 			  /* Countdown is over, stop timer and free resources */
 			  if (alrm->timer)
 				  g_timer_destroy(alrm->timer);
@@ -196,8 +200,6 @@ update_function (gpointer data)
 			  alrm->timeout = 0;
 			  alrm->timer_on = FALSE;
 
-			  gchar *command;
-
 			  /* If an alarm command is set, it overrides the default (if any) */
 			  if (strlen(alrm->command)>0)
 				command = g_strdup(alrm->command);

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list