[Pkg-wmaker-commits] [wmcoincoin] 28/87: debian/patches - (implicit-function-declaration.patch, incompatible_pointer_type.patch, int-to-pointer-cast.patch, maybe-uninitialized.patch, parentheses.patch, pointer-to-int-cast.patch, sign-compare.patch, sizeof-pointer-memaccess.patch, type-limits.patch, unused-but-set-parameter.patch, unused-but-set-variable.patch, unused-parameter.patch, unused-result.patch, unused-variable.patch) Fix compiler warnings.

Doug Torrance dtorrance-guest at moszumanska.debian.org
Fri Aug 28 17:27:33 UTC 2015


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

dtorrance-guest pushed a commit to branch master
in repository wmcoincoin.

commit 2ec964d4d93ddda482edf886b4e7d4bed95f7e63
Author: Doug Torrance <dtorrance at monmouthcollege.edu>
Date:   Fri Oct 24 21:27:00 2014 -0500

    debian/patches
    - (implicit-function-declaration.patch, incompatible_pointer_type.patch,
      int-to-pointer-cast.patch, maybe-uninitialized.patch, parentheses.patch,
      pointer-to-int-cast.patch, sign-compare.patch, sizeof-pointer-memaccess.patch,
      type-limits.patch, unused-but-set-parameter.patch,
      unused-but-set-variable.patch, unused-parameter.patch, unused-result.patch,
      unused-variable.patch) Fix compiler warnings.
---
 debian/patches/implicit-function-declaration.patch |  26 ++
 debian/patches/incompatible_pointer_type.patch     |  26 ++
 debian/patches/int-to-pointer-cast.patch           |  24 ++
 debian/patches/maybe-uninitialized.patch           |  15 +
 debian/patches/parentheses.patch                   |  27 ++
 debian/patches/pointer-to-int-cast.patch           |  24 ++
 debian/patches/series                              |  14 +
 debian/patches/sign-compare.patch                  |  15 +
 debian/patches/sizeof-pointer-memaccess.patch      |  15 +
 debian/patches/type-limits.patch                   |  18 +
 debian/patches/unused-but-set-parameter.patch      |  37 +++
 debian/patches/unused-but-set-variable.patch       | 361 +++++++++++++++++++++
 debian/patches/unused-parameter.patch              |  36 ++
 debian/patches/unused-result.patch                 |  89 +++++
 debian/patches/unused-variable.patch               |  25 ++
 15 files changed, 752 insertions(+)

diff --git a/debian/patches/implicit-function-declaration.patch b/debian/patches/implicit-function-declaration.patch
new file mode 100644
index 0000000..8356246
--- /dev/null
+++ b/debian/patches/implicit-function-declaration.patch
@@ -0,0 +1,26 @@
+Description: Fix -Wimplicit-function-declaration compiler warnings.
+Author: Doug Torrance
+Last-Update 2014-10-24
+
+--- a/src/pinnipede.h
++++ b/src/pinnipede.h
+@@ -238,6 +238,9 @@
+   Pixmap miniduck_pixmap;
+ };
+ 
++void ccfont_draw_string_utf8(CCFontId fid, CCColorId cid, Drawable d, int x, int y, char *str, int len);
++int ccfont_text_width_utf8(CCFontId fid, char *str, int len);
++int ccfont_text_xbox_utf8(CCFontId fid, char *str, int len, short *pxstart, short *pxoff);
+ int filter_msg_info(const board_msg_info *mi, const struct _PinnipedeFilter *filter);
+ int count_all_id_filtered(Boards *boards, struct _PinnipedeFilter *filter);
+ id_type get_first_id_filtered(Boards *boards, struct _PinnipedeFilter *filter);
+--- a/src/board_priv.h
++++ b/src/board_priv.h
+@@ -17,6 +17,7 @@
+ #define BOARD_MSG_MAX_LEN 15000 /* on peut y arriver avec un bon gros message plein de [][][][]... */
+ #define BOARD_LOGIN_MAX_LEN 60
+ 
++void convert_to_utf8(const char *src_encoding, char **psrc);
+ void release_md5_array(Board *b);
+ md5_and_time *find_md5_in_md5_array(md5_byte_t md5[16], md5_and_time *m);
+ void board_decode_message(Board *board, char *dest, const char *src);
diff --git a/debian/patches/incompatible_pointer_type.patch b/debian/patches/incompatible_pointer_type.patch
new file mode 100644
index 0000000..507dfd5
--- /dev/null
+++ b/debian/patches/incompatible_pointer_type.patch
@@ -0,0 +1,26 @@
+Description: Fix compiler warning.
+ In particular,
+ palmipede.c: In function ‘editw_insert_string’:
+ palmipede.c:572:3: warning: passing argument 2 of ‘convert_to_iso8859’
+ from incompatible pointer type [enabled by default]
+    convert_to_iso8859("UTF-8", &s);
+    ^
+ In file included from palmipede.c:193:0:
+ coin_util.h:94:6: note: expected ‘char **’ but argument is of type
+ ‘unsigned char **’
+  void convert_to_iso8859(const char *src_encoding, char **psrc);
+       ^
+Author: Doug Torrance <dtorrance at monmouthcollege.edu>
+Last-Update: 2014-10-24
+
+--- a/src/palmipede.c
++++ b/src/palmipede.c
+@@ -568,7 +568,7 @@
+ int
+ editw_insert_string(EditW *ew, const unsigned char *str)
+ {
+-  unsigned char *s = strdup(str);
++  char *s = strdup(str);
+   convert_to_iso8859("UTF-8", &s);
+   int ls,lb,lrest,ldec;
+   int tronq;
diff --git a/debian/patches/int-to-pointer-cast.patch b/debian/patches/int-to-pointer-cast.patch
new file mode 100644
index 0000000..5acb352
--- /dev/null
+++ b/debian/patches/int-to-pointer-cast.patch
@@ -0,0 +1,24 @@
+Description: Fix -Wint-to-pointer-cast compiler warnings.
+Author: Doug Torrance <dtorrance at monmouthcollege.edu>
+Last-Update: 2014-10-24
+
+--- a/src/wmccc_dialogs.c
++++ b/src/wmccc_dialogs.c
+@@ -101,7 +101,7 @@
+   if (!isinit[dlg]) {
+     g_signal_connect ((gpointer) getdlg(dlg), "response",
+                       G_CALLBACK (wmccc_dialog_response_cb),
+-                      (gpointer)dlgstack.sz);
++                      GINT_TO_POINTER(dlgstack.sz));
+   }
+   if (dlg != DLG_EDIT_OPTIONS && 
+       my_lookup_widget(w, "apply_bt") && (dlgstack.sz > 1 || glob.wmcc_pid == 0)) {    
+@@ -218,7 +218,7 @@
+   
+   g_signal_connect ((gpointer) getdlg(dlg), "response",
+                     G_CALLBACK (wmccc_dialog_response_cb),
+-                    (gpointer)dlgstack.sz);
++                    GINT_TO_POINTER(dlgstack.sz));
+   dlgstack.lst[dlgstack.sz++] = dlg;
+   gtk_widget_show(getdlg(dlg));
+ }
diff --git a/debian/patches/maybe-uninitialized.patch b/debian/patches/maybe-uninitialized.patch
new file mode 100644
index 0000000..54eafbc
--- /dev/null
+++ b/debian/patches/maybe-uninitialized.patch
@@ -0,0 +1,15 @@
+Description: Fix -Wmaybe-uninitialized compiler warnings.
+Author: Doug Torrance <dtorrance at monmouthcollege.edu>
+Last-Update: 2014-10-24
+
+--- a/src/balltrap.c
++++ b/src/balltrap.c
+@@ -225,7 +225,7 @@
+     d_next = d->next;
+     d->age++;
+     if (!duck_is_dead(d)) {
+-      float angle = 0, speed = 3 /* vitess mini */, vx, vy;
++      float angle = 0, speed = 3 /* vitess mini */, vx = 0, vy = 0;
+       int k;
+       for (k=0; k < DUCK_NCX; ++k) {
+         angle += d->angle_ampli[k]*sin(d->angle_phase[k]+t*k);
diff --git a/debian/patches/parentheses.patch b/debian/patches/parentheses.patch
new file mode 100644
index 0000000..8ca5c01
--- /dev/null
+++ b/debian/patches/parentheses.patch
@@ -0,0 +1,27 @@
+Description: Fix -Wparentheses compiler warnings.
+Author: Doug Torrance <dtorrance at monmouthcollege.edu>
+Last-Update: 2014-10-24
+
+--- a/src/http.c
++++ b/src/http.c
+@@ -814,15 +814,15 @@
+ 	                           [; expires=<date>][; domain=<domain_name>]
+ 	                           [; path=<some_path>][; secure][; httponly] */
+ 	    char *garbage;
+-		if (garbage = strcasestr(buff+11, "expires=")) {
++                if ((garbage = strcasestr(buff+11, "expires="))) {
+ 			r->new_cookie = strndup(buff+11, garbage - buff - 11);
+-		} else if (garbage = strcasestr(buff+11, "domain=")) {
++		} else if ((garbage = strcasestr(buff+11, "domain="))) {
+ 			r->new_cookie = strndup(buff+11, garbage - buff - 11);
+-		} else if (garbage = strcasestr(buff+11, "path")) {
++		} else if ((garbage = strcasestr(buff+11, "path"))) {
+ 			r->new_cookie = strndup(buff+11, garbage - buff - 11);
+-		} else if (garbage = strcasestr(buff+11, "secure")) {
++		} else if ((garbage = strcasestr(buff+11, "secure"))) {
+ 			r->new_cookie = strndup(buff+11, garbage - buff - 11);
+-		} else if (garbage = strcasestr(buff+11, "httponly")) {
++		} else if ((garbage = strcasestr(buff+11, "httponly"))) {
+ 			r->new_cookie = strndup(buff+11, garbage - buff - 11);
+ 		} else {
+ 			r->new_cookie = strdup(buff+11);
diff --git a/debian/patches/pointer-to-int-cast.patch b/debian/patches/pointer-to-int-cast.patch
new file mode 100644
index 0000000..bdc7976
--- /dev/null
+++ b/debian/patches/pointer-to-int-cast.patch
@@ -0,0 +1,24 @@
+Description: Fix -Wpointer-to-int-cast compiler warning.
+Author: Doug Torrance
+Last-Update: 2014-10-24
+
+--- a/src/pinnipede.c
++++ b/src/pinnipede.c
+@@ -2377,7 +2377,7 @@
+   Boards *boards = dock->sites->boards;
+   char survol[1024];
+   char *p;
+-  int survol_hash;
++  intptr_t survol_hash;
+   int is_a_ref = 0;
+ 
+   survol[0] = 0;
+@@ -2454,7 +2454,7 @@
+     p = survol;
+     while (*p) { survol_hash += (((unsigned)*p) * 253) + 23; p++; }
+   } else {
+-    survol_hash = (int)pw; // pourquoi pas...
++    survol_hash = (intptr_t)pw; // pourquoi pas...
+   }
+   
+   //  survol_hash = (int)pw; // ca c'est pas bon, on fait trop de refresh
diff --git a/debian/patches/series b/debian/patches/series
index 968b836..0b8b81f 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,3 +2,17 @@ format-security.patch
 fix_x11_include.patch
 autotools_fixes.patch
 fix_spelling.patch
+unused-variable.patch
+unused-but-set-variable.patch
+sizeof-pointer-memaccess.patch
+unused-result.patch
+type-limits.patch
+implicit-function-declaration.patch
+pointer-to-int-cast.patch
+unused-but-set-parameter.patch
+sign-compare.patch
+maybe-uninitialized.patch
+parentheses.patch
+int-to-pointer-cast.patch
+unused-parameter.patch
+incompatible_pointer_type.patch
diff --git a/debian/patches/sign-compare.patch b/debian/patches/sign-compare.patch
new file mode 100644
index 0000000..3ec0128
--- /dev/null
+++ b/debian/patches/sign-compare.patch
@@ -0,0 +1,15 @@
+Description: Fix -Wsign-compare compiler warnings.
+Author: Doug Torrance <dtorrance at monmouthcollege.edu>
+Last-Update: 2014-10-24
+
+--- a/src/pinnipede_totoz.c
++++ b/src/pinnipede_totoz.c
+@@ -91,7 +91,7 @@
+     pp_totoz_state_cnt++;
+ 
+     BLAHBLAH(1, myprintf("new image registered: '%<YEL %s>'\n", imgname));
+-    unsigned i, cavachier = 0; 
++    int i, cavachier = 0;
+     for (i=0; i < pp->totoz->nb_img; ++i) {
+       //printf(" %c %08x %s\n", (i == imgi) ? '!' : ' ', pp->totoz->img[i].hash, pp->totoz->img[i].name);
+       if (i != imgi && strcmp(imgname, pp->totoz->img[i].name)==0) {
diff --git a/debian/patches/sizeof-pointer-memaccess.patch b/debian/patches/sizeof-pointer-memaccess.patch
new file mode 100644
index 0000000..d3b20e8
--- /dev/null
+++ b/debian/patches/sizeof-pointer-memaccess.patch
@@ -0,0 +1,15 @@
+Description: Fix -Wsizeof-pointer-memaccess compiler warning
+Author: Doug Torrance
+Last-Update: 2014-10-24
+
+--- a/src/board_util.c
++++ b/src/board_util.c
+@@ -183,7 +183,7 @@
+ static board_msg_info *
+ board_find_md5_rec(board_msg_info *it, md5_byte_t md5[16]) {
+   board_msg_info *it2;
+-  if (it->ri && memcmp(md5, it->ri->md5, sizeof md5) == 0) return it;
++  if (it->ri && memcmp(md5, it->ri->md5, sizeof *md5) == 0) return it;
+   else if (it->left && (it2=board_find_md5_rec(it->left, md5))) return it2;
+   else if (it->right && (it2=board_find_md5_rec(it->right, md5))) return it2;
+   return NULL;
diff --git a/debian/patches/type-limits.patch b/debian/patches/type-limits.patch
new file mode 100644
index 0000000..ae49c04
--- /dev/null
+++ b/debian/patches/type-limits.patch
@@ -0,0 +1,18 @@
+Description: Fix -Wtype-limits compiler warning.
+Author: Doug Torrance <dtorrrance at monmouthcollege.edu>
+Last-Update: 2014-10-24
+
+--- a/src/pinnipede.c
++++ b/src/pinnipede.c
+@@ -599,7 +599,11 @@
+   attr = 0;
+ 
+   if (pv->is_plopified == 3) p = "plop"; /* bienvenue dans le monde de la hard plopification */
++#ifdef NO_BITFIELDS
+   assert(pv->is_plopified <= 3);
++#else
++  ;
++#endif
+ 
+   has_initial_space = 1;
+   while (p) {
diff --git a/debian/patches/unused-but-set-parameter.patch b/debian/patches/unused-but-set-parameter.patch
new file mode 100644
index 0000000..35e5bef
--- /dev/null
+++ b/debian/patches/unused-but-set-parameter.patch
@@ -0,0 +1,37 @@
+Description: Fix -Wunused-but-set-parameter compiler warnings.
+Author: Doug Torrance <dtorrance at monmouthcollege.edu>
+Last-Update: 2014-10-24
+
+--- a/src/pinnipede.c
++++ b/src/pinnipede.c
+@@ -4006,7 +4006,8 @@
+ int
+ pp_handle_keyrelease(Dock *dock, XEvent *event)
+ {
+-  dock = 0; event = 0;
++  (void) dock;
++  (void) event;
+   return 0;
+ }
+ 
+--- a/src/balloon.c
++++ b/src/balloon.c
+@@ -181,7 +181,7 @@
+   }
+   XFillPolygon(dpy, pix, gc, pt, 3, Convex, CoordModeOrigin);
+   */
+-  side=0;
++  (void) side;
+ }
+ 
+ static void
+@@ -219,7 +219,8 @@
+ 
+     *mask = bitmap;
+     *pix = pixmap;
+-    bx = by = 0;
++    (void) bx;
++    (void) by;
+ }
+ 
+ void
diff --git a/debian/patches/unused-but-set-variable.patch b/debian/patches/unused-but-set-variable.patch
new file mode 100644
index 0000000..5eadad1
--- /dev/null
+++ b/debian/patches/unused-but-set-variable.patch
@@ -0,0 +1,361 @@
+Description: Fix -Wunused-but-set-variable compiler warnings.
+Author: Doug Torrance
+Last-Update: 2014-10-24
+
+--- a/src/troll_detector.c
++++ b/src/troll_detector.c
+@@ -161,13 +161,11 @@
+ static Word *
+ decoupe_bloc(unsigned char *start, unsigned char *end, int in_tag)
+ {
+-  int n;
+   unsigned char *s, *tagstart, *tagend;
+   Word *wl;
+   
+   assert(start); assert(end);
+ 
+-  n = end - start;
+   if (start == end) return NULL;
+   wl = NULL;
+ 
+--- a/src/pinnipede.c
++++ b/src/pinnipede.c
+@@ -673,10 +673,9 @@
+     }
+     if (add_word) {
+       int is_ref;
+-      board_msg_info *ref_mi = NULL;
+ 
+       if ((attr & PWATTR_LNK) == 0) {
+-        ref_mi = check_for_horloge_ref(board->boards, mi->id, s,attr_s, PVTP_SZ, &is_ref, NULL);
++        check_for_horloge_ref(board->boards, mi->id, s,attr_s, PVTP_SZ, &is_ref, NULL);
+         if (is_ref) {
+           attr |= PWATTR_REF;
+         }
+@@ -1088,7 +1087,6 @@
+ {
+   Pinnipede *pp = dock->pinnipede;
+   int pl;
+-  int old_pos;
+   unsigned long pixel; //, old_pixel;
+   CCColorId color;
+   int y;
+@@ -1167,7 +1165,6 @@
+ 
+   pixel = 0L;
+   y = ccfont_ascent(pp->fn_base)-1;
+-  old_pos = 0;
+   if (pw) {
+     CCFontId fn;
+     pl = pw->ligne;
+@@ -1305,7 +1302,6 @@
+ 	XDrawLine(dock->display, lpix, dock->NormalGC, pw->xpos, y-ccfont_height(fn)/2, x1, y-ccfont_height(fn)/2);
+       }
+       pw->attr &= ~PWATTR_TMP_EMPH;
+-      old_pos = pw->xpos + pw->xwidth;
+       pw = pw->next;
+     }
+   }
+@@ -1361,7 +1357,7 @@
+   Boards *boards = dock->sites->boards;
+ 
+   int l;
+-  board_msg_info *ref_mi, *caller_mi;
++  board_msg_info *ref_mi;
+   unsigned char ref_comment[200];
+   int ref_in_window = 0; /* mis a 1 si le message soulign� par pw_ref est affich� parmi
+ 			    les autres messages. sinon, on l'affiche en haut, dans une petite fenetre */
+@@ -1406,7 +1402,6 @@
+     }
+   }
+ 
+-  caller_mi = NULL;
+   ref_mi = NULL;
+   nb_anti_ref = 0;
+   
+--- a/src/pinnipede_widgets.c
++++ b/src/pinnipede_widgets.c
+@@ -64,7 +64,7 @@
+ {
+   int cnt;
+   
+-  int tab_max_w,tab_min_w, tab_w, tabs_min_w=-1, tabs_max_w=-1, tabs_w=-1;
++  int tab_max_w,tab_min_w, tab_w, tabs_min_w=-1, tabs_w=-1;
+   int x,y;
+ 
+   pp->zmsg_y1 = 0;
+@@ -80,7 +80,6 @@
+   tab_min_w = 40;
+   tab_max_w = 100;
+   tabs_min_w = pp->nb_tabs * tab_min_w;
+-  tabs_max_w = pp->nb_tabs * tab_max_w;
+   tab_w = MIN(MAX(pp->win_width / pp->nb_tabs, tab_min_w), tab_max_w);
+   tabs_w = pp->nb_tabs * tab_w;
+ 
+@@ -721,7 +720,7 @@
+ static void pp_tabs_handle_motion(Dock *dock, XMotionEvent *ev) {
+   Pinnipede *pp = dock->pinnipede;
+   PinnipedeTab *pt;
+-  int refresh = 0;
++  /* int refresh = 0; */
+   ppt_survol_actions survol_part;
+   //static int flag = 0;
+   pt = pp_tabs_at_xy(dock, ev->x, ev->y, &survol_part);
+@@ -737,7 +736,7 @@
+     pp->survol_tab = pt; 
+     pp->survol_tab_part = survol_part;
+     pp_widgets_refresh(dock);
+-    refresh = 1;
++    /* refresh = 1; */
+   }
+   /*if (refresh) {
+     pp_update_and_redraw(dock,get_last_id_filtered(dock->sites->boards, &pp->filter), 100,0,1);
+@@ -933,13 +932,11 @@
+ {
+   Pinnipede *pp = dock->pinnipede;
+   Boards *boards = dock->sites->boards;
+-  SitePrefs *main_prefs; 
+   Site *main_site;
+   int i,x,y;
+ 
+   int x_minib;
+ 
+-  main_prefs = pp->active_tab->site->prefs;
+   main_site = pp->active_tab->site;
+ 
+   if (pp->use_minibar == 0) return;
+--- a/src/palmipede.c
++++ b/src/palmipede.c
+@@ -1720,10 +1720,10 @@
+ editw_set_kbfocus(Dock *dock, EditW *ew, int get_it)
+ {
+   Window focwin;
+-  int revert_to, pp_focus;
++  int revert_to;/* , pp_focus; */
+   if (Prefs.palmipede_override_redirect) {
+     XGetInputFocus(dock->display, &focwin, &revert_to);
+-    pp_focus = (pp_ismapped(dock) && focwin == pp_get_win(dock));
++    /* pp_focus = (pp_ismapped(dock) && focwin == pp_get_win(dock)); */
+     if (get_it && ew->mapped/* && !pp_focus*/)
+       XSetInputFocus(dock->display, ew->win, RevertToPointerRoot, CurrentTime);
+     else /*if (!get_it) {
+@@ -2294,10 +2294,9 @@
+ editw_handle_keyrelease(Dock *dock, EditW *ew, XEvent *event)
+ {
+   KeySym ksym;
+-  int klen;
+   unsigned char buff[4];
+ 
+-  klen = XLookupString(&event->xkey, (char*)buff, sizeof(buff), &ksym, NULL);
++  XLookupString(&event->xkey, (char*)buff, sizeof(buff), &ksym, NULL);
+   if (ksym == XK_Return || ksym == XK_KP_Enter) {
+     if (dock_red_button_check(dock)) {
+       editw_hide(dock, ew);
+--- a/src/dock.c
++++ b/src/dock.c
+@@ -1516,9 +1516,6 @@
+ static void
+ dock_handle_button_press_horloge_mode(Dock *dock, XButtonEvent *xbevent)
+ {
+-  int x,y;
+-  x = xbevent->x; y = xbevent->y;
+-  
+   if (xbevent->button == Button1 && (xbevent->state & ControlMask)) {
+     dock_unset_horloge_mode(dock);
+   }
+--- a/src/board.c
++++ b/src/board.c
+@@ -750,12 +750,12 @@
+ static void
+ board_remove_old_msg(Board *board)
+ {
+-  board_msg_info *it, *pit;
++  board_msg_info *it;
+   int cnt;
+   int removed = 0;
+ 
+   cnt = 0;
+-  it = board->msg; pit = NULL;
++  it = board->msg;
+   while (it) {
+     cnt++;
+     it = it->next;
+@@ -1340,7 +1340,7 @@
+ board_log_msg(Board *board, char *ua, char *login, char *stimestamp, char *_message, int id, 
+               const unsigned char *my_useragent)
+ {
+-  board_msg_info *nit, *pit, *ppit, *it;
++  board_msg_info *nit, *pit, *it;
+   board_msg_info *g_it, *pg_it;
+   char *message = NULL;
+   Boards *boards = board->boards;
+@@ -1378,12 +1378,10 @@
+   */
+   nit = board->msg;
+   pit = NULL;
+-  ppit = NULL;
+   while (nit) {
+     if (nit->id.lid > id) {
+       break;
+     }
+-    ppit = pit;
+     pit = nit;
+     nit = nit->next;
+   }
+--- a/src/board_pop3.c
++++ b/src/board_pop3.c
+@@ -35,10 +35,8 @@
+ 
+ char* copy_text_between_angles(const char *src, char *dest, size_t dest_sz) {
+   char *a, *b;
+-  size_t n;
+   a = strchr(src, '<'); if (!a) return NULL;
+   b = strchr(a, '>'); if (!b) return NULL;
+-  n = MIN(dest_sz, (size_t)(b-a+1));
+   memmove(dest, a, dest_sz);
+   if ((size_t)(b-a+1) < dest_sz) dest[b-a+1] = 0;
+   else dest[dest_sz-1] = 0;
+--- a/src/scrollcoin.c
++++ b/src/scrollcoin.c
+@@ -392,9 +392,8 @@
+ int
+ scrollcoin_handle_motion(ScrollCoin *sc, XMotionEvent *ev, Drawable d)
+ {
+-  int mx, my;
++  int my;
+ 
+-  mx = ev->x;
+   my = ev->y;
+   if (sc->dragging && (ev->state & Button1Mask)) {
+     int decal;
+--- a/src/picohtml.c
++++ b/src/picohtml.c
+@@ -226,7 +226,7 @@
+ 
+   /* valable pour la ligne en cours de traitement,
+      utilises pour la justification finale */
+-  int xpos_debut_ligne;
++  //int xpos_debut_ligne;
+   PicoHtmlItem *it_debut_ligne;
+ 
+   int htext, space_width, parag_skip, line_skip, parag_align, next_parag_align;
+@@ -269,7 +269,7 @@
+   x = 0; //- parag_skip;
+   y = 0; //parag_skip;
+ 
+-  xpos_debut_ligne = x;
++  //xpos_debut_ligne = x;
+   cur_color = ph->default_color;
+   while (*p) {
+     flag_item_to_add = 0;
+@@ -405,7 +405,7 @@
+     if (new_parag) {
+       x = ph->parag_indent;
+       y += parag_skip;
+-      xpos_debut_ligne = x;
++      //xpos_debut_ligne = x;
+       if (parag_align != NORMAL) {
+ 	//	justif_ligne(ph, it_debut_ligne, xpos_debut_ligne, width, parag_align);
+ 	justif_ligne(it_debut_ligne, width, parag_align);
+@@ -439,7 +439,7 @@
+       if (new_parag) {
+ 	x = ph->parag_indent;
+ 	y += parag_skip;
+-	xpos_debut_ligne = x;
++	//xpos_debut_ligne = x;
+ 	parag_align = next_parag_align;
+       }
+ 
+@@ -456,7 +456,7 @@
+ 	else
+ 		x = 0;
+ 	y += line_skip; 
+-	xpos_debut_ligne = x;
++	//xpos_debut_ligne = x;
+ 	it_debut_ligne = picohtml_additem(ph, tok, len, attrib, x, y, cur_fn, cur_color, cur_link, special_attr);
+ 	x += w;
+       } else {
+--- a/src/balloon.c
++++ b/src/balloon.c
+@@ -255,10 +255,10 @@
+   int bx, by;
+   Balloon *b = dock->balloon;
+   int xiscr;
+-  int sx,sy,sw,sh;
++  int sx,sy,sw/* ,sh */;
+   xiscr = MAX(dock_find_xiscreen_num(dock,x,y),0);
+   sx = dock->xiscreen[xiscr].x_org; sw = dock->xiscreen[xiscr].width;
+-  sy = dock->xiscreen[xiscr].y_org; sh = dock->xiscreen[xiscr].height;
++  sy = dock->xiscreen[xiscr].y_org; /* sh = dock->xiscreen[xiscr].height; */
+   if (b->mapped) {
+     balloon_hide(dock);
+   }
+--- a/src/http_unix.c
++++ b/src/http_unix.c
+@@ -204,14 +204,12 @@
+   }
+   default: { /* p�pa */
+     int got, cstat;
+-    time_t time_debut;
+     int iplist_sz = 20, iplist_len=0, iplist_ok = 0;
+ 
+     iplist = malloc(iplist_sz); assert(iplist); iplist[0] = 0;
+     if (close(tube[1]) == -1) {
+       fprintf(stderr, _("daddy: pipe full (%s), what will do now ?\n"), strerror(errno)); close(tube[0]);
+     }
+-    time_debut = time(NULL);
+     while (1) {
+       int retval;
+       if (flag_cancel_task) break;
+--- a/src/coin_util.c
++++ b/src/coin_util.c
+@@ -1273,14 +1273,13 @@
+ 
+ /* ben voila.. fionalement je l'ai faite, du coup faudrait updater url au coiffeur */
+ int split_url(const char *url, SplittedURL *d) {
+-  char *p, *p2, *start, *end;
++  char *p, *p2, *start;
+   strncpy(d->data, url, 1000); d->data[999] = 0;
+   str_trim(d->data);
+   p = d->data;
+   if (strlen(d->data) == 0) return -1;
+   if (p[0] == '"' && p[strlen(d->data)-1] == '"') { p++; d->data[strlen(d->data)-1] = 0; }
+   start = p;
+-  end = d->data + strlen(d->data);
+   p = strstr(p, "://"); if (!p) return -1;
+   *p = 0;
+   if (strcasecmp(start, "http") == 0) {
+--- a/src/prefs.c
++++ b/src/prefs.c
+@@ -525,12 +525,11 @@
+   cnt = 0;
+   do {
+     enum { MATCH_UA, MATCH_LOGIN, MATCH_SITE, REPL_UA, REPL_COL, REPL_SYMB, TOKERR } tok_type;
+-    int separ_ok = 0;
+     int i;
+     s_tok = s; /* juste pour pouvoir signaler sur que element s'est produit l'erreur */
+-    if (strncmp(s, "=>", 2) == 0 && rule_section == 1) { separ_ok = 1; rule_section = 0; s += 2; }
+-    else if (s == str) separ_ok = 1;
+-    else if (*s == ',') { separ_ok = 1; s++; }
++    if (strncmp(s, "=>", 2) == 0 && rule_section == 1) { rule_section = 0; s += 2; }
++    else if (s == str) ;
++    else if (*s == ',') s++;
+     else goto erreur;
+ 
+     while (*s && *s <= ' ') s++;
+--- a/src/wmccc.c
++++ b/src/wmccc.c
+@@ -209,12 +209,11 @@
+ /* Function to open a dialog box displaying the message provided. */
+ void quick_message(gchar *message_fmt, ...) {
+   va_list ap;
+-  GtkWidget *label;
+   char s[1024];
+   va_start(ap, message_fmt);
+   vsnprintf(s,1024,message_fmt,ap);
+   va_end(ap);
+-  label = messagebox_dialog("messagebox_label"); 
++  messagebox_dialog("messagebox_label");
+   gtk_label_set_text(GTK_LABEL(messagebox_dialog("messagebox_label")), s);
+   gtk_dialog_run (GTK_DIALOG(messagebox_dialog(NULL)));
+ }
diff --git a/debian/patches/unused-parameter.patch b/debian/patches/unused-parameter.patch
new file mode 100644
index 0000000..e4bfa0d
--- /dev/null
+++ b/debian/patches/unused-parameter.patch
@@ -0,0 +1,36 @@
+Description: Fix -Wunused-parameter compiler warnings.
+Author: Doug Torrance <dtorrance at monmouthcollege.edu>
+Last-Update: 2014-10-24
+
+--- a/src/wmccc_callbacks.c
++++ b/src/wmccc_callbacks.c
+@@ -13,7 +13,8 @@
+ on_bottom1_activate                    (GtkMenuItem     *menuitem,
+                                         gpointer         user_data)
+ {
+-
++  (void) menuitem;
++  (void) user_data;
+ }
+ 
+ 
+@@ -21,6 +22,7 @@
+ on_left1_activate                      (GtkMenuItem     *menuitem,
+                                         gpointer         user_data)
+ {
+-
++  (void) menuitem;
++  (void) user_data;
+ }
+ 
+--- a/src/wmccc_support.c
++++ b/src/wmccc_support.c
+@@ -80,6 +80,8 @@
+   gchar *pathname = NULL;
+   GtkWidget *pixmap;
+ 
++  (void) widget;
++
+   if (!filename || !filename[0])
+       return gtk_image_new ();
+ 
diff --git a/debian/patches/unused-result.patch b/debian/patches/unused-result.patch
new file mode 100644
index 0000000..345f9a0
--- /dev/null
+++ b/debian/patches/unused-result.patch
@@ -0,0 +1,89 @@
+Description: Fix -Wunused-result compiler warnings.
+Author: Doug Torrance <dtorrance at monmouthcollege.edu>
+Last-Update: 2014-10-24
+
+--- a/src/raster.c
++++ b/src/raster.c
+@@ -449,7 +449,9 @@
+       fprintf(stderr, _("Error while reading '%s' !? [%s]\n"), xpm_file, strerror(errno));
+     }
+ 
+-    l[0] = 0; fgets(l, LEN_MAX, f);
++    l[0] = 0;
++    if (!fgets(l, LEN_MAX, f))
++      fprintf(stderr, "fgets() failed: %s\n", strerror(errno));
+     
+     /* on ne prend en compte QUE LES LIGNES QUI COMMENCE PAR '"' et QUI SE TERMINENT PAR '",' */
+     
+--- a/src/pinnipede.c
++++ b/src/pinnipede.c
+@@ -4255,7 +4255,8 @@
+       int i;
+       pp->nb_visited_links = nlnk;
+       for (i=0; i < pp->nb_visited_links; i++) {
+-	fscanf(f, "%d\n", &pp->visited_links[i]);
++        if (fscanf(f, "%d\n", &pp->visited_links[i]) == EOF)
++          myfprintf(stderr, "fscanf() failed\n");
+       }
+     }
+     pp_tabs_restore_state(dock,f);
+--- a/src/pinnipede_totoz.c
++++ b/src/pinnipede_totoz.c
+@@ -502,7 +502,8 @@
+         } else {
+           fclose(f);
+           cmd = str_printf("echo \"%s.%s\" `wmcoincoin_player -i \"%s\"` \"%s\" > \"%s\"", imgfname, extlist[i], pathimg, mimelist[i], pathdesc);
+-          system(cmd);
++          if (system(cmd) == -1)
++            myfprintf(stderr, "%s failed\n", cmd);
+           free(cmd);
+           pp_totoz_register_img(dock->pinnipede, imgname, PP_TOTOZ_STATUS_FOUND);
+           pp_totoz_update_status(dock, imgname);
+--- a/src/board.c
++++ b/src/board.c
+@@ -367,7 +367,8 @@
+     board->time_shift_max = tmax;
+     board->time_shift = t;
+   }
+-  fscanf(f, "last_viewed_id=%d", &board->last_viewed_id);
++  if (fscanf(f, "last_viewed_id=%d", &board->last_viewed_id) == EOF)
++    myfprintf(stderr, "fscanf() failed\n");
+   if (board_is_rss_feed(board) || board_is_pop3(board)) {
+     board->last_viewed_id = -1; /* on dispose d'une liste de md5 */
+     release_md5_array(board);
+@@ -1638,7 +1639,8 @@
+     subs[9] = qhost;
+     shift_cmd = str_multi_substitute(cmd, keys, subs, 10);
+     BLAHBLAH(2, myprintf("post_cmd: /bin/sh -c %<YEL %s>\n", shift_cmd));
+-    system(shift_cmd);
++    if (system(shift_cmd) == -1)
++      myfprintf(stderr, "%s failed\n", shift_cmd);
+ 
+     free(shift_cmd);
+     free(qlogin);
+--- a/src/wmcoincoin.c
++++ b/src/wmcoincoin.c
+@@ -491,7 +491,8 @@
+   /*
+     system fait appel � /bin/sh , mais on a backslash� tous les caract�res embetants
+   */
+-  system(s);
++  if (system(s) == -1)
++	  myfprintf(stderr, "%s failed\n", s);
+ }
+ 
+ int
+--- a/platypus/gifread.c
++++ b/platypus/gifread.c
+@@ -89,7 +89,10 @@
+ static void
+ file_block_getter(uint8_t *p, uint32_t s, Gif_Reader *grr)
+ {
+-  fread(p, 1, s, grr->f);
++	size_t bytes_read;
++
++	bytes_read = fread(p, 1, s, grr->f);
++	assert(bytes_read == s && !ferror(grr->f));
+ }
+ 
+ static uint32_t
diff --git a/debian/patches/unused-variable.patch b/debian/patches/unused-variable.patch
new file mode 100644
index 0000000..64a11a9
--- /dev/null
+++ b/debian/patches/unused-variable.patch
@@ -0,0 +1,25 @@
+Description: Fix -Wunused-variable compiler warnings.
+Author: Doug Torrance
+Last-Update: 2014-10-19
+
+--- a/src/fontcoincoin.c
++++ b/src/fontcoincoin.c
+@@ -244,7 +244,6 @@
+   XGlyphInfo ext;
+   if (len == -1) len = strlen(str);
+   XftTextExtents8(display, ccfonts[fid]->xfn, str, len, &ext);
+-  int plop = ext.width;
+   XftTextExtentsUtf8(display, ccfonts[fid]->xfn, str, len, &ext);
+   return ext.width;
+ }
+--- a/src/kbcoincoin.c
++++ b/src/kbcoincoin.c
+@@ -54,7 +54,7 @@
+       rlen = Xutf8LookupString(ic, event, buf, buf_len, &kb_state()->ksym, &status);
+     }
+   }
+-  unsigned i;
++  //unsigned i;
+   switch (status) {
+     case XLookupNone:
+       //printf("XLookupNone\n");

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-wmaker/wmcoincoin.git



More information about the Pkg-wmaker-commits mailing list