Some code cleanup
authorMikael Berthe <mikael@lilotux.net>
Thu, 09 Mar 2006 20:15:37 +0100
changeset 735 2f027806cd48
parent 734 1d9f0efcfcee
child 736 a8fa82e611c3
Some code cleanup This patch will kill a few pedantic warnings
mcabber/src/compl.c
mcabber/src/hooks.c
mcabber/src/jabglue.c
mcabber/src/screen.c
mcabber/src/utils.c
--- a/mcabber/src/compl.c	Thu Mar 09 19:40:00 2006 +0100
+++ b/mcabber/src/compl.c	Thu Mar 09 20:15:37 2006 +0100
@@ -60,7 +60,7 @@
 {
   compl *c;
   GSList *sl_cat;
-  int len = strlen(prefix);
+  size_t len = strlen(prefix);
 
   if (InputCompl) { // This should not happen, but hey...
     cancel_completion();
--- a/mcabber/src/hooks.c	Thu Mar 09 19:40:00 2006 +0100
+++ b/mcabber/src/hooks.c	Thu Mar 09 20:15:37 2006 +0100
@@ -95,7 +95,6 @@
         if (!strncmp(msg, "/me ", 4))
           wmsg = mmsg = g_strdup_printf("PRIV#*%s %s", resname, msg+4);
       }
-      /*message_flags |= HBB_PREFIX_HLIGHT;*/
     } else {
       // This is a regular chatroom message.
       // Let's see if we are the message sender, in which case we'll
--- a/mcabber/src/jabglue.c	Thu Mar 09 19:40:00 2006 +0100
+++ b/mcabber/src/jabglue.c	Thu Mar 09 20:15:37 2006 +0100
@@ -224,7 +224,7 @@
 
   // Keepalive
   if (KeepaliveDelay) {
-    if (now > LastPingTime + KeepaliveDelay)
+    if (now > LastPingTime + (time_t)KeepaliveDelay)
       jb_keepalive();
   }
 }
--- a/mcabber/src/screen.c	Thu Mar 09 19:40:00 2006 +0100
+++ b/mcabber/src/screen.c	Thu Mar 09 20:15:37 2006 +0100
@@ -811,7 +811,7 @@
 // Display the buddylist (not really the roster) on the screen
 void scr_DrawRoster(void)
 {
-  static guint offset = 0;
+  static int offset = 0;
   char *name, *rline;
   int maxx, maxy;
   GList *buddy;
@@ -1022,7 +1022,7 @@
   scr_ShowWindow(jidto);
 }
 
-void inline set_autoaway(bool setaway)
+inline void set_autoaway(bool setaway)
 {
   static enum imstatus oldstatus;
   static char *oldmsg;
@@ -1071,7 +1071,7 @@
   if (!activity) {
     time_t now;
     time(&now);
-    if (!Autoaway && (now > LastActivity + autoaway_timeout))
+    if (!Autoaway && (now > LastActivity + (time_t)autoaway_timeout))
       set_autoaway(TRUE);
   }
 }
--- a/mcabber/src/utils.c	Thu Mar 09 19:40:00 2006 +0100
+++ b/mcabber/src/utils.c	Thu Mar 09 20:15:37 2006 +0100
@@ -150,7 +150,7 @@
 {
   static const char *tmpdir;
   const char *tmpvars[] = { "MCABBERTMPDIR", "TMP", "TMPDIR", "TEMP" };
-  int i;
+  unsigned int i;
 
   if (tmpdir)
     return tmpdir;
@@ -394,7 +394,7 @@
 {
   char **arglst;
   const char *p, *start, *end;
-  int i = 0;
+  unsigned int i = 0;
   int instring = FALSE;
   int escape = FALSE;