changeset 790:5d4ad1d77da4

Kill a few gcc4 warnings
author Mikael Berthe <mikael@lilotux.net>
date Thu, 06 Apr 2006 23:02:30 +0200
parents 1fa93cc6f5e3
children 6c9e8fb69965
files mcabber/src/hbuf.c mcabber/src/screen.c
diffstat 2 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/mcabber/src/hbuf.c	Thu Apr 06 22:36:46 2006 +0200
+++ b/mcabber/src/hbuf.c	Thu Apr 06 23:02:30 2006 +0200
@@ -75,7 +75,7 @@
     hbuf_block_elt->ptr    = hbuf_b_prev->ptr_end;
     hbuf_block_elt->flags  = HBB_FLAG_PERSISTENT;
     hbuf_block_elt->ptr_end_alloc = hbuf_b_prev->ptr_end_alloc;
-    g_list_append(*p_hbuf, hbuf_block_elt);
+    *p_hbuf = g_list_append(*p_hbuf, hbuf_block_elt);
   }
 
   if (strlen(text) >= HBB_BLOCKSIZE) {
@@ -113,7 +113,7 @@
       hbuf_block_elt->ptr_end  = end;
       hbuf_block_elt->flags    = HBB_FLAG_PERSISTENT;
       hbuf_block_elt->ptr_end_alloc = hbuf_b_prev->ptr_end_alloc;
-      g_list_append(*p_hbuf, hbuf_block_elt);
+      *p_hbuf = g_list_append(*p_hbuf, hbuf_block_elt);
       line = hbuf_block_elt->ptr;
     } else {
       // We need to break where we can find a space char
@@ -131,7 +131,7 @@
       hbuf_block_elt->ptr_end  = end;
       hbuf_block_elt->flags    = 0;
       hbuf_block_elt->ptr_end_alloc = hbuf_b_prev->ptr_end_alloc;
-      g_list_append(*p_hbuf, hbuf_block_elt);
+      *p_hbuf = g_list_append(*p_hbuf, hbuf_block_elt);
       line = hbuf_block_elt->ptr;
     }
     cr = strchr(line, '\n');
@@ -182,7 +182,7 @@
     if (!(hbuf_b_next->flags & HBB_FLAG_PERSISTENT)) {
       hbuf_b_curr->ptr_end = hbuf_b_next->ptr_end;
       g_free(hbuf_b_next);
-      g_list_delete_link(curr_elt, next_elt);
+      curr_elt = g_list_delete_link(curr_elt, next_elt);
     } else
       curr_elt = next_elt;
   }
--- a/mcabber/src/screen.c	Thu Apr 06 22:36:46 2006 +0200
+++ b/mcabber/src/screen.c	Thu Apr 06 23:02:30 2006 +0200
@@ -876,7 +876,7 @@
   } else if (jb_getstatus() != offline) {
     enum imstatus budstate;
     budstate = buddy_getstatus(BUDDATA(current_buddy), NULL);
-    if (budstate >= 0 && budstate < imstatus_size)
+    if (budstate < imstatus_size)
       status = imstatus2char[budstate];
   }
 
@@ -1010,7 +1010,7 @@
     } else if (currentstatus != offline) {
       enum imstatus budstate;
       budstate = buddy_getstatus(BUDDATA(buddy), NULL);
-      if (budstate >= 0 && budstate < imstatus_size)
+      if (budstate < imstatus_size)
         status = imstatus2char[budstate];
     }
     if (buddy == current_buddy) {