File tgif-4.2.5-warnings.patch of Package tgif

--- align.c.original	2011-06-28 04:04:56.000000000 +0200
+++ align.c	2020-11-03 21:40:07.772018142 +0100
@@ -926,11 +926,12 @@
    struct ObjRec *obj_ptr;
 {
    struct TextRec *text_ptr;
-   int new_ltx, new_lty, dx, dy, ltx, lty;
+   int new_ltx, dx, dy, ltx;
 
    text_ptr = obj_ptr->detail.t;
 
-   ltx = obj_ptr->obbox.ltx; lty = obj_ptr->obbox.lty;
+   /* lty is always zero! */
+   ltx = obj_ptr->obbox.ltx;
    switch (horiAlign) {
    case ALIGN_L: text_ptr->minilines.just = JUST_L; break;
    case ALIGN_C: text_ptr->minilines.just = JUST_C; break;
@@ -938,7 +939,7 @@
    }
    UpdTextBBox(obj_ptr);
    dx = dy = 0;
-   new_ltx = obj_ptr->obbox.ltx; new_lty = obj_ptr->obbox.lty;
+   new_ltx = obj_ptr->obbox.ltx;
    dx = ltx-new_ltx;
 
    if (text_ptr->cached_bitmap != None) {
@@ -1006,8 +1007,7 @@
 
       for (vsel_ptr = topVSel; vsel_ptr != NULL; vsel_ptr = vsel_ptr->next) {
          StretchStructuredSplineInfo sssi;
-         int curved=(-1), ssn=(-1);
-         IntPoint *ssvlist=NULL;
+         int curved=(-1);
          struct PolyRec *poly_ptr=NULL;
          struct PolygonRec *polygon_ptr=NULL;
 
@@ -1020,8 +1020,6 @@
             n = poly_ptr->n;
             vlist = poly_ptr->vlist;
             if (curved == LT_STRUCT_SPLINE) {
-               ssn = poly_ptr->ssn;
-               ssvlist = poly_ptr->ssvlist;
                SetIPTInfoForStretchPoly(vsel_ptr->v_index[0], n, vlist, &sssi);
             }
             break;
@@ -1031,8 +1029,6 @@
             n = polygon_ptr->n;
             vlist = polygon_ptr->vlist;
             if (curved == LT_STRUCT_SPLINE) {
-               ssn = polygon_ptr->ssn;
-               ssvlist = polygon_ptr->ssvlist;
                SetIPTInfoForStretchPolygon(vsel_ptr->v_index[0], n, vlist,
                      &sssi);
             }
@@ -1395,7 +1391,7 @@
    HighLightReverse();
    if (curChoice == VERTEXMODE) {
       for (vsel_ptr = topVSel; vsel_ptr != NULL; vsel_ptr = vsel_ptr->next) {
-         int changed=FALSE, n=0, ssn=(-1), curved=(-1);
+         int changed=FALSE, n=0, curved=(-1);
          IntPoint *vlist=NULL, *ssvlist=NULL;
          struct PolyRec *poly_ptr=NULL;
          struct PolygonRec *polygon_ptr=NULL;
@@ -1411,7 +1407,6 @@
             n = poly_ptr->n;
             vlist = poly_ptr->vlist;
             if (curved == LT_STRUCT_SPLINE) {
-               ssn = poly_ptr->ssn;
                ssvlist = poly_ptr->ssvlist;
                SetIPTInfoForStretchPoly(vsel_ptr->v_index[0], n, vlist, &sssi);
             }
@@ -1422,7 +1417,6 @@
             n = polygon_ptr->n;
             vlist = polygon_ptr->vlist;
             if (curved == LT_STRUCT_SPLINE) {
-               ssn = polygon_ptr->ssn;
                ssvlist = polygon_ptr->ssvlist;
                SetIPTInfoForStretchPolygon(vsel_ptr->v_index[0], n, vlist,
                      &sssi);
--- animate.c.original	2011-06-28 04:04:56.000000000 +0200
+++ animate.c	2020-11-03 21:41:27.265155804 +0100
@@ -46,7 +46,6 @@
    register XPoint *token;
    int x, y, num_pts, j, x_dist, y_dist;
    IntPoint *v;
-   struct BBRec bbox;
    double slope, delta_x, delta_y;
    XGCValues values;
 
@@ -61,8 +60,6 @@
    XChangeGC(mainDisplay, drawGC,
          GCForeground | GCFunction | GCLineStyle | GCLineWidth, &values);
 
-   bbox.ltx = 0; bbox.lty = 0; bbox.rbx = 2*TOKEN_R; bbox.rby = 2*TOKEN_R;
-
    num_pts = PolyPtr->n;
    v = PolyPtr->vlist;
    token = (XPoint *)malloc(5*sizeof(XPoint));
--- arc.c.original	2020-12-29 21:21:29.241162802 +0100
+++ arc.c	2020-12-29 21:17:19.205714400 +0100
@@ -642,18 +642,14 @@
    register struct ArcRec *arc_ptr=ObjPtr->detail.a;
    int fill, trans_pat, width, pen, dash, color_index;
    int xc, yc, xr, yr, dir, angle1, angle2, style, a_angle1, a_angle2;
-   int x1, y1, aw, ah;
 
    trans_pat = ObjPtr->trans_pat;
    fill = arc_ptr->fill;
    width = arc_ptr->width;
-   aw = arc_ptr->aw;
-   ah = arc_ptr->ah;
    pen = arc_ptr->pen;
    dash = arc_ptr->dash;
    style = arc_ptr->style;
    xc = arc_ptr->xc; yc = arc_ptr->yc;
-   x1 = arc_ptr->x1; y1 = arc_ptr->y1;
    xr = (int)(arc_ptr->w/2); yr = (int)(arc_ptr->h/2);
    dir = arc_ptr->dir;
    angle1 = -round(((double)arc_ptr->angle1)/64.0);
@@ -1740,6 +1736,7 @@
       if (curChoice == DRAWEDGEARC) {
          obj_ptr = CreateArcObj(cx, cy, OrigX, OrigY, first_x, first_y,
                dir, ltx, lty, w, h, angle1, angle2, FALSE);
+         obj_ptr->x += 0;
       } else {
          obj_ptr = CreateArcObj(OrigX, OrigY, first_x, first_y, saved_x,
                saved_y, dir, ltx, lty, w, h, angle1, angle2, FALSE);
@@ -1825,6 +1822,7 @@
    int aw=origArrowHeadW[0], ah=origArrowHeadH[0];
    int xc, yc, x1, y1, x2, y2, dir, angle1, angle2;
    int invisible=FALSE, transformed=FALSE;
+   char *discard;
 
    *ObjPtr = NULL;
 
@@ -2125,7 +2123,8 @@
       char inbuf[MAXSTRING+1];
       struct XfrmMtrxRec *ctm;
 
-      (void)fgets(inbuf, MAXSTRING, FP);
+      discard=fgets(inbuf, MAXSTRING, FP);
+      UNUSED ((void) discard);
       scanLineNum++;
       InitScan(inbuf, "\t\n, ");
 
--- attr.c.original	2011-06-28 04:04:56.000000000 +0200
+++ attr.c	2020-11-04 19:50:54.652139162 +0100
@@ -1451,15 +1451,13 @@
    EditAttrInfo *pEditAttrInfo;
    /* pEditAttrInfo will also be freed before returning */
 {
-   int i=0, num_attrs=0, *fore_colors=NULL, *attr_indices=NULL;
+   int i=0, num_attrs=0;
    char **attr_names=NULL, **attr_values=NULL, **attr_strings=NULL;
    char **status_strings=NULL;
 
    if (pEditAttrInfo == NULL) return;
 
    num_attrs = pEditAttrInfo->num_attrs;
-   fore_colors = pEditAttrInfo->fore_colors;
-   attr_indices = pEditAttrInfo->attr_indices;
    attr_names = pEditAttrInfo->attr_names;
    attr_values = pEditAttrInfo->attr_values;
    attr_strings = pEditAttrInfo->attr_strings;
--- box.c.original	2011-06-28 04:04:56.000000000 +0200
+++ box.c	2020-12-29 20:36:06.758535994 +0100
@@ -569,6 +569,7 @@
    char color_str[40], bg_color_str[40], *s, width_spec[40];
    int ltx, lty, rbx, rby, fill, width, pen, dash, w, id=0, trans_pat=FALSE;
    int new_alloc, rotation, locked=FALSE, transformed=FALSE, invisible=FALSE;
+   char *discard;
 
    *ObjPtr = NULL;
 
@@ -768,7 +769,8 @@
       char inbuf[MAXSTRING+1];
       struct XfrmMtrxRec *ctm;
 
-      (void)fgets(inbuf, MAXSTRING, FP);
+      discard=fgets(inbuf, MAXSTRING, FP);
+      UNUSED ((void) discard);
       scanLineNum++;
       InitScan(inbuf, "\t\n, ");
 
--- button.c.original	2011-06-28 04:04:56.000000000 +0200
+++ button.c	2020-11-04 19:58:12.810160741 +0100
@@ -139,6 +139,7 @@
    button_h = BBox->rby - BBox->lty;
 
    btn_font_style = GetButtonFontStyle(pButtonFontInfo);
+   top +=0;
    switch (btn_font_style) {
    case BTN_DEFAULT_FONT:
       text_w = defaultFontWidth * Len;
--- choice.c.original	2011-06-28 04:04:57.000000000 +0200
+++ choice.c	2020-11-01 22:39:00.827102124 +0100
@@ -306,8 +306,10 @@
             if (new_y >= abc_height) new_y = abc_height-1;
             if (XGetPixel(abcImage, new_x, new_y) == 1) {
                XPutPixel(image, c, r, 1);
-               if (c < ltx) ltx = c; if (r < lty) lty = r;
-               if (c > rbx) rbx = c; if (r > rby) rby = r;
+               if (c < ltx) ltx = c;
+               if (r < lty) lty = r;
+               if (c > rbx) rbx = c;
+               if (r > rby) rby = r;
             }
          }
       }
--- choose.c.original	2011-06-28 04:04:57.000000000 +0200
+++ choose.c	2020-11-04 20:02:15.249500292 +0100
@@ -389,6 +389,7 @@
    } else {
       block_h = (int)(pni->scroll_area_h * frac);
    }
+   block_h += 0;
    TgDrawScrollBar(mainDisplay, pni->scroll_win, VERT_SCROLLBAR,
          0, 0, scrollBarW, pni->scroll_area_h, start_frac, ITEM_DSPED,
          pni->num_entries);
@@ -454,6 +455,7 @@
    } else {
       end = pni->first_index + ITEM_DSPED;
    }
+   end += 0;
    if (pni->p_check_array != NULL && pni->p_check_array->num_cols > 0) {
       checkbox_cols = pni->p_check_array->num_cols;
       text_left = checkbox_cols*ROW_HEIGHT;
@@ -1460,7 +1462,7 @@
    static Time last_click_time;
    static int last_name_marked;
    Time click_time;
-   int checkbox_cols=0, box_offset=0, clicked_col=INVALID, check_updated=FALSE;
+   int checkbox_cols=0, clicked_col=INVALID, check_updated=FALSE;
 
    if (enableMouseWheel &&
          (button_ev->button == Button4 || button_ev->button == Button5)) {
@@ -1486,7 +1488,6 @@
    }
    if (pni->p_check_array != NULL && pni->p_check_array->num_cols > 0) {
       checkbox_cols = pni->p_check_array->num_cols;
-      box_offset = 1;
       if (button_ev->x < checkbox_cols*ROW_HEIGHT) {
          clicked_col = (int)(button_ev->x / ROW_HEIGHT);
       }
--- color.c.original	2011-06-28 04:04:57.000000000 +0200
+++ color.c	2020-11-04 20:08:18.906527980 +0100
@@ -1380,14 +1380,14 @@
 
 void RedrawColorWindow()
 {
-   int i, x=(windowPadding>>1), y=0, y_start;
+   int i, x=(windowPadding>>1), y=0;
 
    needToRedrawColorWindow = FALSE;
    if (!colorLayers || colorWindow == None) return;
 
    XClearWindow(mainDisplay, colorWindow);
 
-   y_start = y = (upend_height*MAX_VERTICAL_BTNS)+(windowPadding>>1);
+   y = (upend_height*MAX_VERTICAL_BTNS)+(windowPadding>>1);
    for (i=0; i < maxColors; i++) {
       if (i >= colorWindowFirstIndex) {
          int h=0;
@@ -1699,12 +1699,12 @@
       dont_do_obj = TRUE;
    }
    if (topSel == NULL || stickyMenuSelection) {
-      int text_obj_created=FALSE, text_cursor_shown=FALSE;
+      int text_obj_created=FALSE;
 
       if (!dont_check_text) {
          if (!(curChoice == DRAWTEXT && textCursorShown)) {
-            text_cursor_shown = textCursorShown;
             text_obj_created = TieLooseEnds();
+            text_obj_created += 0;
          }
       }
       colorIndex = ColorIndex;
@@ -1722,7 +1722,6 @@
       }
       if (!dont_check_text) {
          if (curChoice == DRAWTEXT && textCursorShown) {
-            text_cursor_shown = TRUE;
             if (ChangeEditTextProperty(PROP_MASK_COLOR, colorIndex)) {
                curTextModified = TRUE;
                RedrawCurText();
--- cutpaste.c.original	2011-06-28 04:04:57.000000000 +0200
+++ cutpaste.c	2020-11-04 21:22:39.289138410 +0100
@@ -182,7 +182,7 @@
     * otherwise, it's an object
     */
 {
-   int copy_failed=FALSE, setselowner_failed=FALSE;
+   int copy_failed=FALSE;
 
    ClearSelection();
    SetCutBuffer(buf, bytes_to_write, buf_is_simple_string, buf_is_utf8_string);
@@ -199,7 +199,6 @@
    XSetSelectionOwner(mainDisplay, XA_PRIMARY, mainWindow,
          lastKeyOrBtnEvInfo.time);
    if (XGetSelectionOwner(mainDisplay, XA_PRIMARY) != mainWindow) {
-      setselowner_failed = TRUE;
       sprintf(gszMsgBox, TgLoadString(STID_CANT_ACQUIRE_X_SELECTION));
       MsgBox(gszMsgBox, TOOL_NAME, INFO_MB);
    } else {
@@ -525,6 +524,7 @@
             }
          }
          *dest_c_ptr = '\0';
+         pMiniLine += 0;
          pMiniLine = CreateMiniLineFromString(s, &pFirstMiniLine,
                &pLastMiniLine);
       } else {
@@ -3384,7 +3384,7 @@
    int nPrompt;
 {
    struct PropertiesRec properties;
-   long lMask=0L, lSkip=0L;
+   long lMask=0L;
    struct CheckArrayRec check_array;
    int len=0, from_selection=FALSE;
    char *cut_buffer=NULL;
@@ -3417,8 +3417,6 @@
          &properties)) {
       return;
    }
-   lSkip = (~lMask);
-
    if (nPrompt) {
       SelectProperties(TgLoadString(STID_UNCHECK_PROP_FOR_PASTE_DOTS),
             PASTE_PROP, &check_array, &properties);
@@ -3526,7 +3524,7 @@
 void RestoreProperties()
 {
    struct PropertiesRec properties;
-   long lMask=0L, lSkip=0L;
+   long lMask=0L;
    struct CheckArrayRec check_array;
    char szPropSet[MAXSTRING], szPropSetSec[MAXSTRING];
 
@@ -3543,8 +3541,6 @@
          &properties)) {
       return;
    }
-   lSkip = (~lMask);
-
    SelectProperties(TgLoadString(STID_UNCHECK_PROP_FOR_RESTORE_DOTS),
          RESTORE_PROP, &check_array, &properties);
    CleanUpCheckArray(&check_array);
--- dialog.c.original	2011-06-28 04:04:57.000000000 +0200
+++ dialog.c	2020-11-04 21:25:33.435598857 +0100
@@ -278,10 +278,11 @@
    int font_height, format_box_w, *pn_num_lines, *pn_max_w, *pn_max_h;
 {
    char *dest_ptr=NULL, *c_ptr=NULL, *msg_copy=NULL;
-   int len=strlen(buf), max_len=0, max_w=0, max_h=0, total=0;
+   int len=strlen(buf), max_w=0, max_h=0, total=0;
    int num_lines=1, spacing=SPACING, sz=((((len+10)<<1)+1)*sizeof(char));
 
    total = BoldMsgTextWidth(xfs, buf, len);
+   total += 0;
 
    msg_copy = (char*)malloc(sz);
    if (msg_copy == NULL) FailAllocMessage();
@@ -384,7 +385,6 @@
                }
             }
          } else {
-            max_len = full_str_len;
             max_w = full_str_total;
             sprintf(dest_ptr, "%s\n", c_ptr);
             dest_ptr = &dest_ptr[strlen(dest_ptr)];
--- drawing.c.original	2011-06-28 04:04:57.000000000 +0200
+++ drawing.c	2020-11-04 21:27:29.793241652 +0100
@@ -1335,8 +1335,10 @@
       }
    }
    if (*AlreadyFound) {
-      if (ltx < *LtX) *LtX = ltx; if (lty < *LtY) *LtY = lty;
-      if (rbx > *RbX) *RbX = rbx; if (rby > *RbY) *RbY = rby;
+      if (ltx < *LtX) *LtX = ltx;
+      if (lty < *LtY) *LtY = lty;
+      if (rbx > *RbX) *RbX = rbx; 
+      if (rby > *RbY) *RbY = rby;
    } else {
       *LtX = ltx; *LtY = lty; *RbX = rbx; *RbY = rby;
    }
@@ -2910,6 +2912,7 @@
 
    key_ev = (&(input->xkey));
    have_ch = XLookupString(key_ev, buf, sizeof(buf), &key_sym, &c_stat);
+   have_ch += 0;
    TranslateKeys(buf, &key_sym);
 
    *args = '\0';
@@ -4056,6 +4059,7 @@
 
    obj_ptr = FindAnObj(mouse_x, mouse_y, &owner_obj, &obj_under_cursor,
          port_name);
+   obj_ptr += 0;
    if (drawPolyHighlightedNode != NULL) {
       if (obj_under_cursor != drawPolyHighlightedNode) {
          /* un-highlight */
--- edit.c.original	2011-06-28 04:04:57.000000000 +0200
+++ edit.c	2020-12-29 20:36:06.762536048 +0100
@@ -22,6 +22,7 @@
 
 #include "tgifdefs.h"
 #include "cmdids.h"
+#define SMOOTHSZ 5
 
 #include "align.e"
 #include "arc.e"
@@ -1754,7 +1755,7 @@
    int index; /* index into ssvlist */
    int start_mouse_x, start_mouse_y, n, ssn, already_moved, before;
    IntPoint *vlist, *ssvlist, vs[5], vs2[5];
-   char smooth[5], smooth2[5];
+   char smooth[SMOOTHSZ], smooth2[SMOOTHSZ];
    int num_vs, num_vs2, sn, sn2, saved_sn, saved_sn2;
    int dx_off, dy_off, extra_smooth, extra_smooth2;
    XPoint *sv, *sv2, dashed_vs[2];
@@ -1838,8 +1839,9 @@
    smooth = paspi->smooth;
    vs2 = paspi->vs2;
    smooth2 = paspi->smooth2;
-   memset(smooth, 0, sizeof(5*sizeof(char)));
-   memset(smooth2, 0, sizeof(5*sizeof(char)));
+
+   memset(smooth, 0, SMOOTHSZ*sizeof(char));
+   memset(smooth2, 0, SMOOTHSZ*sizeof(char));
 
    paspi->x = paspi->tx = ssvlist[paspi->index].x;
    paspi->y = paspi->ty = ssvlist[paspi->index].y;
@@ -2046,8 +2048,8 @@
       IntPoint *vs=paspi->vs, *vs2=paspi->vs2;
       char *smooth=paspi->smooth, *smooth2=paspi->smooth2;
 
-      memset(smooth, 0, sizeof(5*sizeof(char)));
-      memset(smooth2, 0, sizeof(5*sizeof(char)));
+      memset(smooth, 0, SMOOTHSZ*sizeof(char));
+      memset(smooth2, 0, SMOOTHSZ*sizeof(char));
 
       if (paspi->before) {
          /* Add a point between the current and the previous point */
@@ -2208,8 +2210,8 @@
       IntPoint *vs=paspi->vs, *vs2=paspi->vs2;
       char *smooth=paspi->smooth, *smooth2=paspi->smooth2;
 
-      memset(smooth, 0, sizeof(5*sizeof(char)));
-      memset(smooth2, 0, sizeof(5*sizeof(char)));
+      memset(smooth, 0, SMOOTHSZ*sizeof(char));
+      memset(smooth2, 0, SMOOTHSZ*sizeof(char));
 
       if (!paspi->sssi.prev_valid) {
          /* first point of poly */
@@ -2801,7 +2803,7 @@
    int prev_x, prev_y, prev_tx, prev_ty, x, y, tx, ty, tmp_x, tmp_y;
    int next_x, next_y, next_tx, next_ty;
    int orig_x, orig_y, grid_x, grid_y, new_mouse_x, new_mouse_y;
-   int sel_ltx, sel_lty, sel_rbx, sel_rby, num=0, i, intn=0;
+   int sel_ltx, sel_lty, sel_rbx, sel_rby, i, intn=0;
    char *smooth=PolyPtr->smooth, *tmp_smooth=NULL;
    double prev_angle, next_angle, prev_dist, next_dist, dx, dy;
 
@@ -2958,11 +2960,9 @@
             if (before) {
                /* Add a point between the current and the previous point */
                if (Index == 0) {
-                  num = 2;
                   v[0].x = OFFSET_X(tx); v[0].y = OFFSET_Y(ty);
                   v[1].x = OFFSET_X(tx); v[1].y = OFFSET_Y(ty);
                } else {
-                  num = 3;
                   v[0].x = OFFSET_X(prev_tx); v[0].y = OFFSET_Y(prev_ty);
                   v[1].x = OFFSET_X(tx);      v[1].y = OFFSET_Y(ty);
                   v[2].x = OFFSET_X(tx);      v[2].y = OFFSET_Y(ty);
@@ -2970,11 +2970,9 @@
             } else {
                /* Add a point between the current and the next point */
                if (Index == n-1) {
-                  num = 2;
                   v[0].x = OFFSET_X(tx);      v[0].y = OFFSET_Y(ty);
                   v[1].x = OFFSET_X(tx);      v[1].y = OFFSET_Y(ty);
                } else {
-                  num = 3;
                   v[0].x = OFFSET_X(tx);      v[0].y = OFFSET_Y(ty);
                   v[1].x = OFFSET_X(tx);      v[1].y = OFFSET_Y(ty);
                   v[2].x = OFFSET_X(next_tx); v[2].y = OFFSET_Y(next_ty);
@@ -3189,6 +3187,10 @@
 #endif /* _TGIF_DBG */
    sel_ltx = selLtX; sel_lty = selLtY;
    sel_rbx = selRbX; sel_rby = selRbY;
+   v[1].x=0;
+   v[1].y=0;
+   v[1].x=0;
+   v[1].y=0;
 
    x = tx = vs[Index].x;
    y = ty = vs[Index].y;
--- exec.c.original	2011-06-28 04:04:57.000000000 +0200
+++ exec.c	2020-12-29 20:36:06.762536048 +0100
@@ -517,6 +517,7 @@
 
 int AppendToTmpStr2(psz1, psz2, tg2)
    char *psz1, *psz2;
+   int tg2;
 {
    int len1=strlen(psz1), len2=strlen(psz2), rc=0;
    char *psz=(char*)malloc((len1+len2+1)*sizeof(char));
@@ -1129,6 +1130,7 @@
    char *cmd;
 {
    int len=strlen(cmd);
+   int discard;
 
    while (len > 0 && (cmd[len-1] == ' ')) cmd[--len] = '\0';
    if (cmd[0] != '\0' && FindProgramInPath(cmd, NULL, FALSE)) {
@@ -1142,7 +1144,8 @@
             fprintf(stderr, TgLoadCachedString(CSTID_BACKGROUNDING_CMD), cmd);
             fprintf(stderr, "\n");
             strcat(cmd, " &");
-            (void)system(cmd);
+            discard=system(cmd);
+            UNUSED ((void) discard);
 #else /* ~_BACKGROUND_DONT_FORK */
             int pid;
 
@@ -1569,6 +1572,7 @@
          next_str = str_ptr->next;
          pMiniLine = CreateMiniLineFromString(str_ptr->dyn_str.s,
                &pFirstMiniLine, &pLastMiniLine);
+         pMiniLine += 0;
          FreeStr(str_ptr);
       }
       attr_ptr->obj->detail.t->minilines.first = pFirstMiniLine;
@@ -3202,7 +3206,7 @@
    struct ObjRec *dest_attr_owner_obj=NULL;
    MiniLineInfo *pMiniLine=NULL;
    char *buf=NULL, *c_ptr, *attr_names_buf=NULL;
-   int buf_sz=0, buf_len=0, tmp_sz=0, num_attrs=0;
+   int buf_sz=0, tmp_sz=0, num_attrs=0;
    int found_name=FALSE, seen_first_attr=FALSE, null_url=FALSE;
 
    UtilRemoveQuotes(dest_attr_name);
@@ -3218,7 +3222,6 @@
    if (buf == NULL) return FailAllocMessage();
 
    sprintf(buf, "%s", url_name);
-   buf_len = buf_sz;
 
    sprintf(execDummyStr, "%s=", dest_attr_name);
    dest_attr = FindAttrWithName(obj_ptr, execDummyStr, &dest_attr_owner_obj);
@@ -4476,6 +4479,7 @@
    UtilRemoveQuotes(the_str);
 
    len = strlen(the_str);
+   len+=0;
    if (!WriteBufToCutBuffer(the_str, strlen(the_str), TRUE, FALSE, NULL)) {
       sprintf(gszMsgBox, TgLoadString(STID_WRITE_CUT_BUF_WHILE_EXEC_CMD),
             orig_cmd);
@@ -9659,7 +9663,6 @@
 {
    char *attr_name=argv[0], *tmp_buf=NULL, **word_array=NULL;
    int i=0, count=0, index=0, need_to_free_tmp_buf=FALSE;
-   MiniLinesInfo *minilines=NULL;
    MiniLineInfo *pMiniLine=NULL;
    struct AttrRec *attr_ptr=NULL;
    struct ObjRec *attr_owner_obj=NULL;
@@ -9711,7 +9714,6 @@
 
    need_to_free_tmp_buf = FALSE;
    tmp_buf = NULL;
-   minilines = (&attr_ptr->obj->detail.t->minilines);
    tmp_buf = ConvertAttrNameFirstMiniLineToString(attr_ptr,
          &need_to_free_tmp_buf);
    if (!AppendToTmpStr(tmp_buf)) FailAllocMessage();
--- expr.c.original	2011-06-28 04:04:57.000000000 +0200
+++ expr.c	2020-11-06 20:48:05.220264477 +0100
@@ -443,15 +443,10 @@
    char *op_str;
    struct VRec *v, *result_ptr;
 {
-   int left_ival, right_ival;
-   double left_dval, right_dval;
-
    if (!((v[1].vtype == INT_VAL || v[1].vtype == DBL_VAL) &&
          (v[0].vtype == INT_VAL || v[0].vtype == DBL_VAL))) {
       return BadOperandType(op_str);
    }
-   left_ival = right_ival = 0;
-   left_dval = right_dval = (double)0.0;
    switch (v[1].vtype) {
    case INT_VAL:
       switch (v[0].vtype) {
--- file.c.original	2011-06-28 04:04:57.000000000 +0200
+++ file.c	2020-12-28 22:31:10.431863968 +0100
@@ -2241,6 +2241,7 @@
    UtilTrimBlanks(new_file_name);
    if (*new_file_name == '\0') return;
    len = strlen(new_file_name);
+   len += 0;
 
    saved_cur_page = curPage;
    for (page_num=0, curPage=firstPage; curPage != NULL;
@@ -4721,9 +4722,9 @@
 
 int LoadFile(FullName, ObjFile, GzippedObjFile)
    char *FullName;
-   int ObjFile; /* equals TRUE if the file is an OBJ file */
-                /* equals FALSE if the file is a SYM or PIN file */
-                /* equals -1 if the file is an temporary OBJ file */
+   int ObjFile, GzippedObjFile; /* equals TRUE if the file is an OBJ file */
+                                /* equals FALSE if the file is a SYM or PIN file */
+                                /* equals -1 if the file is an temporary OBJ file */
 {
    struct ObjRec *obj_ptr=NULL;
    char tmp_filename[MAXPATHLENGTH+1], tmp_filefullpath[MAXPATHLENGTH+1];
@@ -6604,6 +6605,7 @@
    }
    if (whereToPrint >= MAXDEFWHERETOPRINT) {
       export_cap = GetExportFilterCapability(whereToPrint);
+      export_cap += 0;
    }
    if (whereToPrint == XBM_FILE || whereToPrint == GIF_FILE ||
          whereToPrint == HTML_FILE || whereToPrint == PNG_FILE ||
--- font.c.original	2011-06-28 04:04:57.000000000 +0200
+++ font.c	2020-11-06 20:51:08.146782743 +0100
@@ -1247,16 +1247,14 @@
    int nRotate;
    /* Caller must not delete the returned pixmap! */
 {
-   int w=0, lbearing=0, rextra=0, image_w=0, image_h=0;
+   int lbearing=0, image_w=0, image_h=0;
    int r=0, dest_cols=0, dest_rows=0;
    int saved_db_vert=canvasFontDoubleByteVertical;
    XImage *src_image=NULL;
    XGCValues values;
 
    SetTextExtentsInfo(pTextExtents);
-   w = pTextExtents->w;
    lbearing = pTextExtents->lbearing;
-   rextra = pTextExtents->rextra;
    image_w = pTextExtents->bbox_w;
    image_h = pTextExtents->bbox_h;
 
@@ -3535,6 +3533,7 @@
       int n=0;
 
       n = XFontsOfFontSet(*pFontSet, &xfset_list, &font_name_list);
+      n += 0;
       /* do not translate -- the string is used to measure things */
       *pnFontWidth = XmbTextEscapement(*pFontSet, "x", 1);
       *pnFontAsc = (*xfset_list)->max_bounds.ascent;
--- ftp.c.original	2011-06-28 04:04:57.000000000 +0200
+++ ftp.c	2020-12-29 23:14:06.123536815 +0100
@@ -394,7 +394,7 @@
 {
    struct sockaddr_in soc_address;
    struct sockaddr_in *sin=(&soc_address);
-   char port_cmd[20];
+   char port_cmd[40];
 
    *pn_data_socket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
    if (*pn_data_socket < 0) {
@@ -661,6 +661,7 @@
    if (is_dir) {
       /* a directory */
       status = FtpDoRead(accepted_socket, ppsz_buf, pn_buf_sz);
+      status += 0;
    } else {
       /* a file */
       status = FtpDoRead(accepted_socket, ppsz_buf, pn_buf_sz);
--- http.c.original	2011-06-28 04:04:57.000000000 +0200
+++ http.c	2020-12-29 20:36:06.766536104 +0100
@@ -734,7 +734,7 @@
    int n_socket, us_port;
    char *psz_path, *psz_host;
 {
-   int status=0, total_sz=0;
+   int status=0, total_sz=0, discard;
    FILE *fp=NULL;
    char *buf=(char*)malloc((strlen(psz_path)+5+2+31)*sizeof(char)), msg[40];
 
@@ -830,12 +830,14 @@
       fprintf(stderr, "************************\n");
       fprintf(stderr, "* Begin Request Header *\n");
       fprintf(stderr, "************************\n");
-      (void)fwrite(buf, sizeof(char), strlen(buf), stderr);
+      discard=fwrite(buf, sizeof(char), strlen(buf), stderr);
+      UNUSED ((void) discard);
       fprintf(stderr, "************************\n");
       fprintf(stderr, "*  End Request Header  *\n");
       fprintf(stderr, "************************\n");
    }
    status = TcpDoWrite(n_socket, buf, (int)strlen(buf));
+   status += 0;
    free(buf);
 
    if (status != TG_REMOTE_STATUS_OK) {
@@ -1333,7 +1335,7 @@
    char **ppsz_buf;
 {
    int buf_sz=0x400, len=0, end_of_file=FALSE;
-   int status=TG_REMOTE_STATUS_OK, content_len=(-1), header_len=0;
+   int status=TG_REMOTE_STATUS_OK, content_len=(-1), header_len=0, discard;
    char *buf=(char*)malloc(buf_sz*sizeof(char)), msg[MAXSTRING];
 
    if (pn_buf_sz != NULL) *pn_buf_sz = 0;
@@ -1444,7 +1446,8 @@
          /* debug, do not translate */
          if (!cmdLineDumpURL) {
             fprintf(stderr, "\n==========>>>\n");
-            (void)fwrite(buf, sizeof(char), len, stderr);
+            discard=fwrite(buf, sizeof(char), len, stderr);
+            UNUSED ((void) discard);
             fprintf(stderr, "\n<<<==========\n");
          }
       }
--- imgproc.c.original	2011-06-28 04:04:57.000000000 +0200
+++ imgproc.c	2020-12-29 20:36:06.766536104 +0100
@@ -291,6 +291,7 @@
       if (pxc_pixel->red > 255) pxc_pixel->red = 255;
       if (pxc_pixel->green > 255) pxc_pixel->green = 255;
       if (pxc_pixel->blue > 255) xcolor.blue = 255;
+      xcolor.blue += 0;
    } else {
       int i=0, global_color_index=(-1);
 
@@ -4242,9 +4243,12 @@
             red = (int)(r) + this_r_err[col+1];
             green = (int)(g) + this_g_err[col+1];
             blue = (int)(b) + this_b_err[col+1];
-            if (red < 0) red = 0; if (red > 65535) red = 65535;
-            if (green < 0) green = 0; if (green > 65535) green = 65535;
-            if (blue < 0) blue = 0; if (blue > 65535) blue = 65535;
+            if (red < 0) red = 0; 
+            if (red > 65535) red = 65535;
+            if (green < 0) green = 0;
+            if (green > 65535) green = 65535;
+            if (blue < 0) blue = 0;
+            if (blue > 65535) blue = 65535;
 
             min_index = GetClosestColorIndex(gDefErrorDiffuseLevel.red,
                   gDefErrorDiffuseLevel.green, gDefErrorDiffuseLevel.blue,
@@ -4255,9 +4259,12 @@
             red = (int)(tgifColors[index].red) + this_r_err[col+1];
             green = (int)(tgifColors[index].green) + this_g_err[col+1];
             blue = (int)(tgifColors[index].blue) + this_b_err[col+1];
-            if (red < 0) red = 0; if (red > 65535) red = 65535;
-            if (green < 0) green = 0; if (green > 65535) green = 65535;
-            if (blue < 0) blue = 0; if (blue > 65535) blue = 65535;
+            if (red < 0) red = 0; 
+            if (red > 65535) red = 65535;
+            if (green < 0) green = 0; 
+            if (green > 65535) green = 65535;
+            if (blue < 0) blue = 0; 
+            if (blue > 65535) blue = 65535;
 
             min_index = GetClosestColorIndex(red_bits, green_bits, blue_bits,
                   red, green, blue, target_ncolors);
@@ -4797,6 +4804,7 @@
    }
    xpm_ptr = topSel->obj->detail.xpm;
    image_h = xpm_ptr->image_h;
+   image_h += 0;
 
    if (DoPpm6(xpm_ptr)) {
       gnObjectColorsToTargetColorMapping = NULL;
@@ -6945,6 +6953,8 @@
 {
    int ok=TRUE;
    IntPoint from_pt, to_pt;
+   to_pt.x=0;
+   to_pt.y=0;
 
    if (!CheckSelectionForImageProc(CMDID_VECTORWARP)) {
       return;
@@ -9026,12 +9036,12 @@
          unsigned int g_maxval=((ptci->g_mask)>>ptci->g_shift);
          unsigned int b_maxval=((ptci->b_mask)>>ptci->b_shift);
 
-         memset(has_r, 0, sizeof(256*sizeof(unsigned char)));
-         memset(has_g, 0, sizeof(256*sizeof(unsigned char)));
-         memset(has_b, 0, sizeof(256*sizeof(unsigned char)));
-         memset(can_have_r, 0, sizeof(256*sizeof(unsigned char)));
-         memset(can_have_g, 0, sizeof(256*sizeof(unsigned char)));
-         memset(can_have_b, 0, sizeof(256*sizeof(unsigned char)));
+         memset(has_r, 0, 256*sizeof(unsigned char));
+         memset(has_g, 0, 256*sizeof(unsigned char));
+         memset(has_b, 0, 256*sizeof(unsigned char));
+         memset(can_have_r, 0, 256*sizeof(unsigned char));
+         memset(can_have_g, 0, 256*sizeof(unsigned char));
+         memset(can_have_b, 0, 256*sizeof(unsigned char));
          for (i=0; i < r_maxval; i++) {
             double dval=((double)i)/ptci->dr_maxval_div255;
             unsigned int uval=round(dval);
--- import.c.original	2011-06-28 04:04:57.000000000 +0200
+++ import.c	2020-12-28 22:46:34.890033357 +0100
@@ -1372,7 +1372,7 @@
 static
 int FinishImport(remote_file, remote_tmp_fname, local_fname, which, pn_image_w,
       pn_image_h)
-   int remote_file, *pn_image_w, *pn_image_h;
+   int remote_file, *pn_image_w, *pn_image_h, which;
    char *remote_tmp_fname, *local_fname;
 {
    char xpm_fname[MAXPATHLENGTH+1], *rest=NULL, *psz_format=NULL;
@@ -3164,7 +3164,6 @@
    struct BBRec saved_draw_win_bbox;
    int bbox_w=(imported_obj->bbox.rbx-imported_obj->bbox.ltx);
    int bbox_h=(imported_obj->bbox.rby-imported_obj->bbox.lty);
-   int final_w=0, final_h=0;
 
    curPage->top = curPage->bot = topObj = botObj = NULL;
 
@@ -3177,18 +3176,12 @@
 
    if (bbox_w <= thumbnailW && bbox_h <= thumbnailH) {
       /* do not scale */
-      final_w = thumbnailW;
-      final_h = thumbnailH;
    } else {
       double scale=(double)0;
 
       if (orig_aspect_ratio > aspect_ratio) {
-         final_w = thumbnailW;
-         final_h = round(((double)thumbnailW) / orig_aspect_ratio);
          scale = ((double)bbox_w) / ((double)thumbnailW);
       } else {
-         final_h = thumbnailH;
-         final_w = round(((double)thumbnailH) * orig_aspect_ratio);
          scale = ((double)bbox_h) / ((double)thumbnailH);
       }
       ScaleObjLikeScaleEverything(imported_obj, scale, FALSE);
@@ -3512,6 +3505,7 @@
    sprintf(buf, "%s;%s;%s;%s", stszObjFileExt, stszGzObjFileExt,
          stszSymFileExt, stszPinFileExt);
    len = strlen(buf);
+   len += 0;
    if (strcmp(OBJ_FILE_EXT,"obj") != 0) {
       strcat(buf, ";.obj");
    }
--- mainloop.c.original	2011-06-28 04:04:58.000000000 +0200
+++ mainloop.c	2020-12-29 20:36:06.766536104 +0100
@@ -235,13 +235,15 @@
 void ExecWithFile(CmdName, FileName)
    char *CmdName, *FileName;
 {
+   int discard;
    char s[255];
 
 #ifdef _BACKGROUND_DONT_FORK
    /* do not translate -- program constants */
    sprintf(s, "xterm -bd red -e %s %s", CmdName, FileName);
    strcat(s, " &");
-   (void)system(s);
+   discard=system(s);
+   UNUSED ((void) discard);
 #else /* ~_BACKGROUND_DONT_FORK */
    int pid;
 
@@ -1237,6 +1239,7 @@
 
    if (gstWBInfo.do_whiteboard) {
       static int initialized=FALSE;
+      initialized += 0;
 
 #ifdef _TGIF_DBG /* debug, do not translate */
       TgAssert(!initialized,
--- move.c.original	2011-06-28 04:04:58.000000000 +0200
+++ move.c	2020-11-06 21:06:39.999622314 +0100
@@ -1064,7 +1064,7 @@
    RubberInfo *pRubberInfo;
    int dx, dy;
 {
-   int i=0, n=0;
+   int i=0;
    IntPoint *vs=NULL;
    struct PolyRec *poly_ptr=NULL;
    struct PolygonRec *polygon_ptr=NULL;
@@ -1092,10 +1092,8 @@
       case OBJ_POLY:
          poly_ptr = pInnerObj->detail.p;
          if (poly_ptr->curved == LT_STRUCT_SPLINE) {
-            n = poly_ptr->ssn;
             vs = poly_ptr->ssvlist;
          } else {
-            n = poly_ptr->n;
             vs = poly_ptr->vlist;
          }
          if (pInnerObj->ctm == NULL) {
@@ -1127,10 +1125,8 @@
       case OBJ_POLYGON:
          polygon_ptr = pInnerObj->detail.g;
          if (polygon_ptr->curved == LT_STRUCT_SPLINE) {
-            n = polygon_ptr->ssn;
             vs = polygon_ptr->ssvlist;
          } else {
-            n = polygon_ptr->n;
             vs = polygon_ptr->vlist;
          }
          if (pInnerObj->ctm == NULL) {
--- names.c.original	2011-06-28 04:04:58.000000000 +0200
+++ names.c	2020-11-06 21:09:37.690078658 +0100
@@ -393,6 +393,7 @@
 
    while ((d=readdir(dirp)) != NULL) {
       len = strlen(d->d_name);
+      len += 0;
       if (ext_len == 0) {
 #ifdef VMS
          if (len > 4 && (strcmp(".dir", &d->d_name[len-4]) == 0)) {
--- obj.c.original	2011-06-28 04:04:58.000000000 +0200
+++ obj.c	2020-11-06 21:20:32.947136827 +0100
@@ -359,14 +359,11 @@
 void InvalidateObjCache(ObjPtr)
    struct ObjRec *ObjPtr;
 {
-   int w=0, h=0, num_rows=0, num_cols=0;
    struct TextRec *text_ptr=NULL;
    struct XBmRec *xbm_ptr=NULL;
    struct XPmRec *xpm_ptr=NULL;
    struct ObjRec *obj_ptr=NULL;
 
-   w = ObjPtr->obbox.rbx - ObjPtr->obbox.ltx;
-   h = ObjPtr->obbox.rby - ObjPtr->obbox.lty;
    switch (ObjPtr->type) {
    case OBJ_POLY:
       if (NeedsToCachePolyObj(ObjPtr)) {
@@ -444,8 +441,6 @@
       break;
    case OBJ_XBM:
       xbm_ptr = ObjPtr->detail.xbm;
-      num_cols = (zoomedIn) ? (w<<zoomScale) : (w>>zoomScale);
-      num_rows = (zoomedIn) ? (h<<zoomScale) : (h>>zoomScale);
       if (NeedsToCacheXBmObj(ObjPtr)) {
          if (xbm_ptr->cached_bitmap != None) {
             XFreePixmap(mainDisplay, xbm_ptr->cached_bitmap);
@@ -458,8 +453,6 @@
       break;
    case OBJ_XPM:
       xpm_ptr = ObjPtr->detail.xpm;
-      num_cols = (zoomedIn) ? (w<<zoomScale) : (w>>zoomScale);
-      num_rows = (zoomedIn) ? (h<<zoomScale) : (h>>zoomScale);
       if (NeedsToCacheXPmObj(ObjPtr)) {
          if (xpm_ptr->cached_pixmap != None) {
             XFreePixmap(mainDisplay, xpm_ptr->cached_pixmap);
--- oval.c.original	2011-06-28 04:04:58.000000000 +0200
+++ oval.c	2020-12-29 20:36:06.770536158 +0100
@@ -769,7 +769,7 @@
    struct ObjRec **ObjPtr;
 {
    struct OvalRec *oval_ptr;
-   char color_str[40], bg_color_str[40], *s, width_spec[40];
+   char color_str[40], bg_color_str[40], *s, width_spec[40], *discard;
    int ltx, lty, rbx, rby, trans_pat=FALSE, fill, width, pen, dash, w, id=0;
    int new_alloc, rotation, locked=FALSE, transformed=FALSE, invisible=FALSE;
 
@@ -966,7 +966,8 @@
       char inbuf[MAXSTRING+1];
       struct XfrmMtrxRec *ctm;
 
-      (void)fgets(inbuf, MAXSTRING, FP);
+      discard=fgets(inbuf, MAXSTRING, FP);
+      UNUSED ((void) discard);
       scanLineNum++;
       InitScan(inbuf, "\t\n, ");
 
--- page.c.original	2020-12-29 08:12:48.536872369 +0100
+++ page.c	2020-11-06 21:13:38.733410703 +0100
@@ -80,7 +80,7 @@
 {
    char s[20];
    XPoint v[5];
-   int w=0, num_digits=0, x_offset, y_offset;
+   int w=0, num_digits=0, x_offset;
    int bg_pixel=(threeDLook ? myLtGryPixel : myBgPixel);
 
    if (gnPageNumOnTab) {
@@ -113,7 +113,6 @@
    } else {
       XDrawLines(mainDisplay, pageWindow, defaultGC, v, 5, CoordModeOrigin);
    }
-   y_offset = ((rulerFontHeight-7)>>1)+1;
    x_offset = (rulerFontWidth>>1)+rulerFontWidth;
    XDrawString(mainDisplay, pageWindow, defaultGC, x+x_offset,
          y+1+rulerFontAsc, s, num_digits);
@@ -1885,9 +1884,8 @@
    register struct ObjRec *obj_ptr, *prev_obj;
    int *dx=NULL, *dy=NULL, index;
    struct PageRec **page_handle=NULL;
-   struct ObjRec *saved_top_obj, *saved_bot_obj;
+   struct ObjRec *saved_bot_obj;
 
-   saved_top_obj=curPage->top;
    saved_bot_obj=curPage->bot;
    curPage->top = curPage->bot = NULL;
    DelAllPages();
--- pin.c.original	2011-06-28 04:04:58.000000000 +0200
+++ pin.c	2020-11-06 21:14:31.494140067 +0100
@@ -293,7 +293,7 @@
 void HandlePinHighlights(MouseX, MouseY)
    int MouseX, MouseY;
 {
-   int need_to_highlight=FALSE, something_changed=FALSE;
+   int need_to_highlight=FALSE;
    struct ObjRec *obj_under_cursor=NULL;
 
    obj_under_cursor = FindPinObj(ABS_X(MouseX), ABS_Y(MouseY));
@@ -311,14 +311,12 @@
          if (drawPolyHighlightedNode != NULL) {
             need_to_highlight = TRUE;
          }
-         something_changed = TRUE;
       }
    } else {
       if (obj_under_cursor != NULL) {
          drawPolyHighlightedNode = obj_under_cursor;
          /* may need to call something like SetWiringNodeInfo()!? */
          need_to_highlight = TRUE;
-         something_changed = TRUE;
       }
    }
    if (need_to_highlight) {
--- poly.c.original	2011-06-28 04:04:58.000000000 +0200
+++ poly.c	2020-12-29 20:36:06.770536158 +0100
@@ -208,8 +208,10 @@
          x = tmp_x+ObjPtr->x;
          y = tmp_y+ObjPtr->y;
       }
-      if (x < ltx) ltx = x; if (y < lty) lty = y;
-      if (x > rbx) rbx = x; if (y > rby) rby = y;
+      if (x < ltx) ltx = x;
+      if (y < lty) lty = y;
+      if (x > rbx) rbx = x;
+      if (y > rby) rby = y;
 
       x = round(v[0].x + w*cos + h*sin);
       y = round(v[0].y + w*sin - h*cos);
@@ -219,8 +221,10 @@
          x = tmp_x+ObjPtr->x;
          y = tmp_y+ObjPtr->y;
       }
-      if (x < ltx) ltx = x; if (y < lty) lty = y;
-      if (x > rbx) rbx = x; if (y > rby) rby = y;
+      if (x < ltx) ltx = x; 
+      if (y < lty) lty = y;
+      if (x > rbx) rbx = x; 
+      if (y > rby) rby = y;
    }
    dx = v[num_pts-1].x - v[num_pts-2].x;
    dy = v[num_pts-1].y - v[num_pts-2].y;
@@ -240,8 +244,10 @@
          x = tmp_x+ObjPtr->x;
          y = tmp_y+ObjPtr->y;
       }
-      if (x < ltx) ltx = x; if (y < lty) lty = y;
-      if (x > rbx) rbx = x; if (y > rby) rby = y;
+      if (x < ltx) ltx = x; 
+      if (y < lty) lty = y;
+      if (x > rbx) rbx = x; 
+      if (y > rby) rby = y;
 
       x = round(v[num_pts-1].x - w*cos - h*sin);
       y = round(v[num_pts-1].y - w*sin + h*cos);
@@ -251,16 +257,20 @@
          x = tmp_x+ObjPtr->x;
          y = tmp_y+ObjPtr->y;
       }
-      if (x < ltx) ltx = x; if (y < lty) lty = y;
-      if (x > rbx) rbx = x; if (y > rby) rby = y;
+      if (x < ltx) ltx = x;
+      if (y < lty) lty = y;
+      if (x > rbx) rbx = x;
+      if (y > rby) rby = y;
    }
    if (retracted_arrow) {
       int i;
 
       for (i=1; i < num_pts; i++) {
          x = v[i].x; y = v[i].y;
-         if (x-ah < ltx) ltx = x-ah; if (y-ah < lty) lty = y-ah;
-         if (x+ah > rbx) rbx = x+ah; if (y+ah > rby) rby = y+ah;
+         if (x-ah < ltx) ltx = x-ah;
+         if (y-ah < lty) lty = y-ah;
+         if (x+ah > rbx) rbx = x+ah;
+         if (y+ah > rby) rby = y+ah;
       }
    }
    ObjPtr->bbox.ltx = min(ltx, ObjPtr->obbox.ltx-(width>>1));
@@ -281,8 +291,10 @@
    lty = rby = V[0].y;
 
    for (i = 1; i < NumPts; i++) {
-      if (V[i].x < ltx) ltx = V[i].x; if (V[i].y < lty) lty = V[i].y;
-      if (V[i].x > rbx) rbx = V[i].x; if (V[i].y > rby) rby = V[i].y;
+      if (V[i].x < ltx) ltx = V[i].x;
+      if (V[i].y < lty) lty = V[i].y;
+      if (V[i].x > rbx) rbx = V[i].x;
+      if (V[i].y > rby) rby = V[i].y;
    }
    if (ObjPtr->ctm == NULL) {
       ObjPtr->x = ltx;
@@ -1391,6 +1403,7 @@
 
                obj_ptr = FindAnObj(end_x, end_y, &owner_obj, &obj_under_cursor,
                      port_name);
+               obj_ptr += 0;
                if (drawPolyHighlightedNode != NULL) {
                   if (obj_under_cursor != drawPolyHighlightedNode) {
                      /* un-highlight */
@@ -4154,7 +4167,7 @@
 {
    IntPoint *intv=NULL, *v=NULL;
    int num_pts, trans_pat, fill, pen, width, curved, dash, color_index;
-   int style, aw, ah, rotation, intn, retracted_arrow;
+   int style, aw, ah, intn, retracted_arrow;
    char *smooth=NULL, *width_spec=NULL, *aw_spec=NULL, *ah_spec=NULL;
 
    trans_pat = ObjPtr->trans_pat;
@@ -4169,7 +4182,6 @@
    style = ObjPtr->detail.p->style;
    curved = ObjPtr->detail.p->curved;
    dash = ObjPtr->detail.p->dash;
-   rotation = ObjPtr->rotation;
    if (curved == LT_STRUCT_SPLINE) {
       v = ObjPtr->detail.p->ssvlist;
       num_pts = ObjPtr->detail.p->ssn;
@@ -4744,7 +4756,7 @@
    struct PolyRec *poly_ptr=ObjPtr->detail.p;
    XPoint *v, tmp_v[4];
    XPoint v0, v1, vnminus2, vnminus1;
-   int trans_pat, pen, width, pixel, fill, n, dash, real_x_off, real_y_off;
+   int trans_pat, pen, width, pixel, fill, dash, real_x_off, real_y_off;
    int style, aw, ah, num_pts, left_dx, left_dy, right_dx, right_dy;
    int retracted_arrow=FALSE;
    short tmps;
@@ -4752,7 +4764,6 @@
    XGCValues values;
 
    trans_pat = ObjPtr->trans_pat;
-   n = poly_ptr->n;
    fill = poly_ptr->fill;
    width = poly_ptr->width;
    aw = poly_ptr->aw;
@@ -5046,10 +5057,11 @@
    char *Smooth;
 {
    int num_nibbles=NumPts>>2, nibble_count=0, bit_count=0, j, k;
-   char *c_ptr, inbuf[MAXSTRING+1];
+   char *c_ptr, inbuf[MAXSTRING+1], *discard;
 
    if ((NumPts & 0x3) != 0) num_nibbles++;
-   (void)fgets(inbuf, MAXSTRING, FP);
+   discard=fgets(inbuf, MAXSTRING, FP);
+   UNUSED ((void) discard);
    scanLineNum++;
    if (Curved == LT_INTSPLINE || Smooth == NULL) return TRUE;
    if ((c_ptr=strchr(inbuf, '"')) == NULL) {
@@ -5067,7 +5079,7 @@
       int data=0;
 
       if (nibble_count++ == 64) {
-         (void)fgets(inbuf, MAXSTRING, FP);
+         discard=fgets(inbuf, MAXSTRING, FP);
          scanLineNum++;
          for (c_ptr=inbuf; *c_ptr == ' '; c_ptr++) ;
          nibble_count = 1;
@@ -5105,7 +5117,7 @@
    int initialized, rotation, count, new_alloc, line_cap=LCAP_BUTT;
    int style, width=0, pen, curved, fill, dash, locked=FALSE, trans_pat=FALSE;
    int aw=origArrowHeadW[6], ah=origArrowHeadH[6], arrow_style=ASTY_COMPAT;
-   char *smooth=NULL;
+   char *smooth=NULL, *discard;
    int real_x=0, real_y=0, transformed=FALSE, invisible=FALSE;
    struct XfrmMtrxRec *ctm=NULL;
    struct BBRec orig_obbox;
@@ -5174,12 +5186,15 @@
             initialized = TRUE;
             ltx = rbx = x; lty = rby = y;
          } else {
-            if (x < ltx) ltx = x; if (y < lty) lty = y;
-            if (x > rbx) rbx = x; if (y > rby) rby = y;
+            if (x < ltx) ltx = x;
+            if (y < lty) lty = y;
+            if (x > rbx) rbx = x;
+            if (y > rby) rby = y;
          }
       }
    } else {
-      (void)fgets(inbuf, MAXSTRING, FP);
+      discard=fgets(inbuf, MAXSTRING, FP);
+      UNUSED ((void) discard);
       scanLineNum++;
       s = inbuf;
       InitScan(s, "\t\n, []");
@@ -5195,14 +5210,17 @@
          v[i].x = x; v[i].y = y;
          if (!initialized) {
             initialized = TRUE;
-            ltx = rbx = x; lty = rby = y;
+            ltx = rbx = x;
+            lty = rby = y;
          } else {
-            if (x < ltx) ltx = x; if (y < lty) lty = y;
-            if (x > rbx) rbx = x; if (y > rby) rby = y;
+            if (x < ltx) ltx = x;
+            if (y < lty) lty = y;
+            if (x > rbx) rbx = x;
+            if (y > rby) rby = y;
          }
          if (++count == 8 && i != num_pts-1) {
             count = 0;
-            (void)fgets(inbuf, MAXSTRING, FP);
+            discard=fgets(inbuf, MAXSTRING, FP);
             scanLineNum++;
             s = inbuf;
             InitScan(s, "\t\n, []");
@@ -5517,7 +5535,7 @@
       int aindent=0;
       char aindent_spec[40];
 
-      (void)fgets(inbuf, MAXSTRING, FP);
+      discard=fgets(inbuf, MAXSTRING, FP);
       scanLineNum++;
       InitScan(inbuf, "\t\n, []");
 
@@ -5547,7 +5565,7 @@
       UtilRemoveQuotes(aindent_spec);
    }
    if (fileVersion >= 33 && transformed) {
-      (void)fgets(inbuf, MAXSTRING, FP);
+      discard=fgets(inbuf, MAXSTRING, FP);
       scanLineNum++;
       InitScan(inbuf, "\t\n, ");
 
--- polygon.c.original	2011-06-28 04:04:58.000000000 +0200
+++ polygon.c	2020-12-29 20:36:06.770536158 +0100
@@ -1007,7 +1007,7 @@
 static
 void EraseStructSplineLinesForContAndUpdateSvs(OrigX, OrigY, grid_x, grid_y,
       pev, num_pts, psv, sn, psv2, sn2, pipt_prev, pipt_first)
-   int OrigX, OrigY, grid_x, grid_y, sn, sn2;
+   int OrigX, OrigY, grid_x, grid_y, num_pts, sn, sn2;
    XEvent *pev;
    XPoint **psv, **psv2;
    IntPointTriplet *pipt_prev, *pipt_first;
@@ -2089,7 +2089,7 @@
    register int i;
    struct PolygonRec *polygon_ptr;
    IntPoint *v;
-   char color_str[40], bg_color_str[40], *s, inbuf[MAXSTRING];
+   char color_str[40], bg_color_str[40], *s, inbuf[MAXSTRING], *discard;
    int num_pts, ltx=0, lty=0, rbx=0, rby=0, x, y, id=0;
    int trans_pat=FALSE, fill, width, pen, w, new_alloc, locked=FALSE;
    int curved, dash, initialized, rotation, count;
@@ -2158,12 +2158,15 @@
             initialized = TRUE;
             ltx = rbx = x; lty = rby = y;
          } else {
-            if (x < ltx) ltx = x; if (y < lty) lty = y;
-            if (x > rbx) rbx = x; if (y > rby) rby = y;
+            if (x < ltx) ltx = x;
+            if (y < lty) lty = y;
+            if (x > rbx) rbx = x;
+            if (y > rby) rby = y;
          }
       }
    } else {
-      (void)fgets(inbuf, MAXSTRING, FP);
+      discard=fgets(inbuf, MAXSTRING, FP);
+      UNUSED ((void) discard);
       scanLineNum++;
       s = inbuf;
       InitScan(s, "\t\n, []");
@@ -2181,12 +2184,14 @@
             initialized = TRUE;
             ltx = rbx = x; lty = rby = y;
          } else {
-            if (x < ltx) ltx = x; if (y < lty) lty = y;
-            if (x > rbx) rbx = x; if (y > rby) rby = y;
+            if (x < ltx) ltx = x;
+            if (y < lty) lty = y;
+            if (x > rbx) rbx = x;
+            if (y > rby) rby = y;
          }
          if (++count == 8 && i != num_pts-1) {
             count = 0;
-            (void)fgets(inbuf, MAXSTRING, FP);
+            discard=fgets(inbuf, MAXSTRING, FP);
             scanLineNum++;
             s = inbuf;
             InitScan(s, "\t\n, []");
@@ -2411,7 +2416,7 @@
       return;
    }
    if (fileVersion >= 33 && transformed) {
-      (void)fgets(inbuf, MAXSTRING, FP);
+      discard=fgets(inbuf, MAXSTRING, FP);
       scanLineNum++;
       InitScan(inbuf, "\t\n, ");
 
--- rcbox.c.original	2011-06-28 04:04:58.000000000 +0200
+++ rcbox.c	2020-12-29 20:36:06.770536158 +0100
@@ -760,7 +760,7 @@
    struct ObjRec **ObjPtr;
 {
    struct RCBoxRec *rcbox_ptr;
-   char color_str[40], bg_color_str[40], *s, msg[MAXSTRING], width_spec[40];
+   char color_str[40], bg_color_str[40], *s, msg[MAXSTRING], width_spec[40], *discard;
    int ltx, lty, rbx, rby, trans_pat=FALSE, fill, width, pen, dash, radius;
    int rotation, new_alloc, id=0, w, locked=FALSE;
    int transformed=FALSE, invisible=FALSE;
@@ -933,7 +933,8 @@
       char inbuf[MAXSTRING+1];
       struct XfrmMtrxRec *ctm;
 
-      (void)fgets(inbuf, MAXSTRING, FP);
+      discard=fgets(inbuf, MAXSTRING, FP);
+      UNUSED ((void) discard);
       scanLineNum++;
       InitScan(inbuf, "\t\n, ");
 
--- rect.c.original	2011-06-28 04:04:58.000000000 +0200
+++ rect.c	2020-12-28 22:54:38.777421705 +0100
@@ -37,7 +37,7 @@
 
 void DumpRectPath(FP, LtX, LtY, RbX, RbY, Indent, LastLF)
    FILE *FP;
-   int LtX, LtY, RbX, RbY, Indent;
+   int LtX, LtY, RbX, RbY, Indent, LastLF;
 {
    register int i;
 
--- remote.c.original	2011-06-28 04:04:58.000000000 +0200
+++ remote.c	2020-12-29 20:36:06.770536158 +0100
@@ -747,7 +747,7 @@
    char *url, *host, *path, **ppsz_buf, **ppsz_content_type;
    int port, *pn_buf_sz, *pn_html, *pn_http_extracted_text;
 {
-   int status=TG_REMOTE_STATUS_OK, n_socket=0, proxy_port=0;
+   int status=TG_REMOTE_STATUS_OK, n_socket=0, proxy_port=0, discard;
    char *proxy_host=NULL, port_str[20];
 
    if (pn_http_extracted_text != NULL) *pn_http_extracted_text=FALSE;
@@ -815,8 +815,9 @@
                    * no matter what kind of file it is!
                    */
                   if (cmdLineDumpURL) {
-                     (void)fwrite(*ppsz_buf, sizeof(char), (*pn_buf_sz),
+                     discard=fwrite(*ppsz_buf, sizeof(char), (*pn_buf_sz),
                            stdout);
+                     UNUSED ((void) discard);
                   }
                }
             }
@@ -867,7 +868,7 @@
    char *url, *host, *path, **ppsz_buf, **ppsz_content_type;
    int port, *pn_buf_sz, *pn_html;
 {
-   int status=TG_REMOTE_STATUS_OK, n_socket=0, proxy_port=0;
+   int status=TG_REMOTE_STATUS_OK, n_socket=0, proxy_port=0, discard;
    char *proxy_host=NULL, port_str[20];
 
    if (port == 0) port = 21;
@@ -928,7 +929,8 @@
              * no matter what kind of file it is!
              */
             if (cmdLineDumpURL) {
-               (void)fwrite(*ppsz_buf, sizeof(char), (*pn_buf_sz), stdout);
+               discard=fwrite(*ppsz_buf, sizeof(char), (*pn_buf_sz), stdout);
+               UNUSED ((void) discard);
             }
          }
          sprintf(gszMsgBox, TgLoadCachedString(CSTID_DATA_RECEIVED), "FTP");
@@ -1266,6 +1268,7 @@
    int launch_remote_file;
    char *psz_viewer, *psz_url, *psz_new_fname;
 {
+   int discard;
    if (strcmp(psz_viewer, "NONE") != 0) {
 #ifndef _BACKGROUND_DONT_FORK
       int pid=0;
@@ -1283,7 +1286,8 @@
 
 #ifdef _BACKGROUND_DONT_FORK
       strcat(cmd, " &");
-      (void)system(cmd);
+      discard=system(cmd);
+      UNUSED ((void) discard);
 #else /* ~_BACKGROUND_DONT_FORK */
       pid = fork();
       if (pid == 0) {
--- ruler.c.original	2011-06-28 04:04:58.000000000 +0200
+++ ruler.c	2020-12-28 22:56:22.875004412 +0100
@@ -510,6 +510,7 @@
 
 static
 void DrawVRuleTick(YOff)
+   int YOff;
 {
    XDrawLine(mainDisplay, vRuleWindow, revDefaultGC, 0, YOff, rulerLen, YOff);
 }
@@ -756,7 +757,7 @@
    int OrigX, OrigY; /* these are mouse coordinates */
 {
    int moving=TRUE, dx=0, grid_x=0, grid_y=0, h=ZOOMED_SIZE(drawWinH);
-   int prev_x=0, orig_grid_x=0, orig_grid_y=0, orig_right_margin=0;
+   int prev_x=0, orig_grid_x=0, orig_right_margin=0;
    char buf[80], buf2[80];
    double dval=(double)0;
    XPoint orig_vs[6], vs[6];
@@ -771,7 +772,6 @@
    }
    GridXY(OrigX, OrigY, &grid_x, &grid_y);
    orig_grid_x = grid_x;
-   orig_grid_y = grid_y;
    orig_right_margin = OFFSET_X(paperWidth-(rightMargin>>TIK_PER_PIXEL_SHIFTS));
    prev_x = orig_right_margin+0;
    GetRightMarginMarkVs(orig_vs);
--- scroll.c.original	2011-06-28 04:04:58.000000000 +0200
+++ scroll.c	2020-12-28 22:58:59.265382204 +0100
@@ -152,7 +152,7 @@
 
 int TgGetScrollHit(x, y, orientation, scroll_area_w, scroll_area_h,
       start_frac, length, total, pn_btn_offset)
-   int x, y, scroll_area_w, scroll_area_h, length, total, *pn_btn_offset;
+   int x, y, orientation, scroll_area_w, scroll_area_h, length, total, *pn_btn_offset;
    double start_frac;
 {
    int block_start=0, block_size=0, min_block_size=1+(windowPadding<<1);
@@ -210,7 +210,7 @@
       scroll_area_h, start_frac, length, total)
    Display *dpy;
    Window win;
-   int x_off, y_off, scroll_area_w, scroll_area_h, length, total;
+   int x_off, y_off, orientation, scroll_area_w, scroll_area_h, length, total;
    double start_frac;
 {
    int block_start=0, block_size=0, min_block_size=1+(windowPadding<<1);
--- select.c.original	2011-06-28 04:04:58.000000000 +0200
+++ select.c	2020-11-06 21:32:10.380848460 +0100
@@ -533,6 +533,7 @@
             owner_obj = obj_ptr;
             returned_obj = attr_ptr->obj;
             found_attr = TRUE;
+            found_attr += 0;
             break;
          }
       }
@@ -1152,23 +1153,32 @@
             YOff <= OFFSET_Y(obj_ptr->bbox.rby)+3) {
          switch (obj_ptr->type) {
          case OBJ_TEXT:
-            if (FindGoodText(XOff,YOff,obj_ptr)) return obj_ptr; break;
+            if (FindGoodText(XOff,YOff,obj_ptr)) return obj_ptr;
+            break;
          case OBJ_XBM:
-            if (FindGoodXBm(XOff,YOff,obj_ptr)) return obj_ptr; break;
+            if (FindGoodXBm(XOff,YOff,obj_ptr)) return obj_ptr;
+            break;
          case OBJ_XPM:
-            if (FindGoodXPm(XOff,YOff,obj_ptr)) return obj_ptr; break;
+            if (FindGoodXPm(XOff,YOff,obj_ptr)) return obj_ptr;
+            break;
          case OBJ_BOX:
-            if (FindGoodBox(XOff,YOff,obj_ptr)) return obj_ptr; break;
+            if (FindGoodBox(XOff,YOff,obj_ptr)) return obj_ptr;
+            break;
          case OBJ_OVAL:
-            if (FindGoodOval(XOff,YOff,obj_ptr)) return obj_ptr; break;
+            if (FindGoodOval(XOff,YOff,obj_ptr)) return obj_ptr;
+            break;
          case OBJ_POLY:
-            if (FindGoodPoly(XOff,YOff,obj_ptr)) return obj_ptr; break;
+            if (FindGoodPoly(XOff,YOff,obj_ptr)) return obj_ptr;
+            break;
          case OBJ_POLYGON:
-            if (FindGoodPolygon(XOff,YOff,obj_ptr)) return obj_ptr; break;
+            if (FindGoodPolygon(XOff,YOff,obj_ptr)) return obj_ptr;
+            break;
          case OBJ_ARC:
-            if (FindGoodArc(XOff,YOff,obj_ptr)) return obj_ptr; break;
+            if (FindGoodArc(XOff,YOff,obj_ptr)) return obj_ptr;
+            break;
          case OBJ_RCBOX:
-            if (FindGoodRCBox(XOff,YOff,obj_ptr)) return obj_ptr; break;
+            if (FindGoodRCBox(XOff,YOff,obj_ptr)) return obj_ptr;
+            break;
 
          case OBJ_GROUP:
          case OBJ_SYM:
@@ -1214,23 +1224,32 @@
             YOff <= OFFSET_Y(obj_ptr->bbox.rby)+3) {
          switch (obj_ptr->type) {
          case OBJ_TEXT:
-            if (FindGoodText(XOff,YOff,obj_ptr)) return obj_ptr; break;
+            if (FindGoodText(XOff,YOff,obj_ptr)) return obj_ptr;
+            break;
          case OBJ_XBM:
-            if (FindGoodXBm(XOff,YOff,obj_ptr)) return obj_ptr; break;
+            if (FindGoodXBm(XOff,YOff,obj_ptr)) return obj_ptr;
+            break;
          case OBJ_XPM:
-            if (FindGoodXPm(XOff,YOff,obj_ptr)) return obj_ptr; break;
+            if (FindGoodXPm(XOff,YOff,obj_ptr)) return obj_ptr;
+            break;
          case OBJ_BOX:
-            if (FindGoodBox(XOff,YOff,obj_ptr)) return obj_ptr; break;
+            if (FindGoodBox(XOff,YOff,obj_ptr)) return obj_ptr;
+            break;
          case OBJ_OVAL:
-            if (FindGoodOval(XOff,YOff,obj_ptr)) return obj_ptr; break;
+            if (FindGoodOval(XOff,YOff,obj_ptr)) return obj_ptr;
+            break;
          case OBJ_POLY:
-            if (FindGoodPoly(XOff,YOff,obj_ptr)) return obj_ptr; break;
+            if (FindGoodPoly(XOff,YOff,obj_ptr)) return obj_ptr;
+            break;
          case OBJ_POLYGON:
-            if (FindGoodPolygon(XOff,YOff,obj_ptr)) return obj_ptr; break;
+            if (FindGoodPolygon(XOff,YOff,obj_ptr)) return obj_ptr;
+            break;
          case OBJ_ARC:
-            if (FindGoodArc(XOff,YOff,obj_ptr)) return obj_ptr; break;
+            if (FindGoodArc(XOff,YOff,obj_ptr)) return obj_ptr;
+            break;
          case OBJ_RCBOX:
-            if (FindGoodRCBox(XOff,YOff,obj_ptr)) return obj_ptr; break;
+            if (FindGoodRCBox(XOff,YOff,obj_ptr)) return obj_ptr;
+            break;
 
          case OBJ_GROUP:
          case OBJ_ICON:
@@ -2547,9 +2566,8 @@
    if (curChoice == VERTEXMODE) {
       StartCompositeCmd();
       for (vsel_ptr=botVSel; vsel_ptr!=NULL; vsel_ptr=vsel_ptr->prev) {
-         int delete_it=FALSE, extra_vertex=FALSE, curved=(-1), ssn=0;
-         char *smooth=NULL, *ssmooth=NULL;
-         IntPoint *ssvlist=NULL;
+         int delete_it=FALSE, extra_vertex=FALSE, curved=(-1);
+         char *smooth=NULL;
 
          obj_ptr = vsel_ptr->obj;
 
@@ -2557,11 +2575,7 @@
          case OBJ_POLY:
             poly_ptr = obj_ptr->detail.p;
             curved = poly_ptr->curved;
-            if (curved == LT_STRUCT_SPLINE) {
-               ssvlist = poly_ptr->ssvlist;
-               ssn = poly_ptr->ssn;
-               ssmooth = poly_ptr->ssmooth;
-            } else {
+            if (!(curved == LT_STRUCT_SPLINE)) {
                vlist = poly_ptr->vlist;
                n = poly_ptr->n;
                smooth = poly_ptr->smooth;
@@ -2572,9 +2586,6 @@
             polygon_ptr = obj_ptr->detail.g;
             curved = polygon_ptr->curved;
             if (curved == LT_STRUCT_SPLINE) {
-               ssvlist = polygon_ptr->ssvlist;
-               ssn = polygon_ptr->ssn;
-               ssmooth = polygon_ptr->ssmooth;
             } else {
                vlist = polygon_ptr->vlist;
                n = polygon_ptr->n;
--- setup.c.original	2020-12-29 08:12:48.536872369 +0100
+++ setup.c	2020-11-07 18:32:58.410181976 +0100
@@ -685,6 +685,7 @@
    Time time;
 
    win = input->xselectionclear.window;
+   win += 0;
    selection = input->xselectionclear.selection;
    time = input->xselectionclear.time;
 
@@ -749,6 +750,7 @@
    target = input->xselectionrequest.target;
    property = input->xselectionrequest.property;
    time = input->xselectionrequest.time;
+   time += 0;
 
    /* do not translate -- program constants */
    DebugSelectRequest(property, target, 1, "function entry point");
--- shape.c.original	2011-06-28 04:04:58.000000000 +0200
+++ shape.c	2020-11-07 18:35:34.152266739 +0100
@@ -675,7 +675,7 @@
       }
    }
    if (*pn_need_to_draw) {
-      int w, h, diam_y, radius_y, side_h;
+      int w, h, diam_y, radius_y;
 
       switch (curShape) {
       case SHAPE_OVAL:
@@ -689,7 +689,6 @@
          h = gShapeBBox.rby-gShapeBBox.lty;
          radius_y = (int)(h/6);
          diam_y = (radius_y<<1);
-         side_h = h-diam_y;
          XDrawArc(mainDisplay, drawWindow, revDefaultGC,
                gShapeBBox.ltx, gShapeBBox.lty, w, diam_y, 0, 360<<6);
          XDrawArc(mainDisplay, drawWindow, revDefaultGC,
@@ -864,7 +863,7 @@
 struct AttrRec *GenerateShape()
 {
    struct ObjRec *saved_top_obj, *saved_bot_obj, *tmp_top_obj, *tmp_bot_obj;
-   int w, h, diam_y, radius_y, side_h, saved_cur_spline, saved_line_style;
+   int w, h, diam_y, radius_y, saved_cur_spline, saved_line_style;
    struct AttrRec *label_attr=NULL;
    struct BBRec bbox;
 
@@ -886,7 +885,6 @@
       h = gShapeBBox.rby-gShapeBBox.lty;
       radius_y = (int)(h/6);
       diam_y = (radius_y<<1);
-      side_h = h-diam_y;
       if (penPat != NONEPAT) {
          int saved_pen=penPat;
 
--- special.c.original	2011-06-28 04:04:58.000000000 +0200
+++ special.c	2020-11-07 18:38:55.462961493 +0100
@@ -1797,7 +1797,7 @@
    char icon_full_name[MAXPATHLENGTH], *rest=NULL, *psz=NULL;
    char sym_ext_str[MAXSTRING];
    FILE *fp=NULL;
-   int len, short_name, sym_ext_len, ltx, lty, rbx, rby, no_name=FALSE;
+   int short_name, ltx, lty, rbx, rby, no_name=FALSE;
 
    if (topSel == NULL || topSel != botSel) {
       MsgBox(TgLoadString(STID_SEL_ONLY_ONE_FOR_MAKEICONIC), TOOL_NAME,
@@ -1807,7 +1807,6 @@
    if (sym_path == NULL) {
       *icon_name = '\0';
       Dialog(TgLoadString(STID_ENTER_NAME_FOR_THE_ICON), NULL, icon_name);
-      len = strlen(icon_name);
       if (*icon_name == '\0') {
          Msg(TgLoadString(STID_NAME_NOT_SPEC_ICON_NOT_CREATE));
          return FALSE;
@@ -1815,10 +1814,8 @@
    } else {
       strncpy(icon_name, sym_path, sizeof(icon_name)-1);
       icon_name[sizeof(icon_name)-1] = '\0';
-      len = strlen(icon_name);
    }
    sprintf(sym_ext_str, ".%s", SYM_FILE_EXT);
-   sym_ext_len = strlen(sym_ext_str);
 
    if (FileNameHasExtension(icon_name, OBJ_FILE_TYPE, NULL, NULL)) {
       MsgBox(TgLoadString(STID_CANT_SAVE_OBJ_ICON_NOT_CREATE), TOOL_NAME,
--- spline.c.original	2011-06-28 04:04:58.000000000 +0200
+++ spline.c	2020-12-28 23:03:10.697204997 +0100
@@ -67,11 +67,10 @@
 void CalcAutoRetractedArrowAttrBend(Style, X0, Y0, X2, Y2, X1, Y1)
    int Style, X0, Y0, X2, Y2, *X1, *Y1;
 {
-   double dx, dy, len, new_x, new_y;
+   double dx, dy, new_x, new_y;
 
    dx = (double)(X2 - X0);
    dy = (double)(Y2 - Y0);
-   len = (double)(sqrt(((double)dx)*((double)dx)+((double)dy)*((double)dy)));
    if (Style == LS_RIGHT) {
       new_x = ((double)((X0+X2)>>1)) + dy/((double)8.0);
       new_y = ((double)((Y0+Y2)>>1)) - dx/((double)8.0);
@@ -795,7 +794,7 @@
 } *MultiSplineRecPtr;
 
 XPoint *MakeMultiSplinePolyVertex(Curved, N, Smooth, XOff, YOff, NumVs, Vs)
-   int *N, XOff, YOff, NumVs;
+   int Curved, *N, XOff, YOff, NumVs;
    char *Smooth;
    IntPoint *Vs;
 {
--- stk.c.original	2011-06-28 04:04:58.000000000 +0200
+++ stk.c	2020-12-29 23:17:08.750454246 +0100
@@ -367,7 +367,7 @@
 void RestoreFileInfo(StkPtr)
    struct StkRec *StkPtr;
 {
-   char fname[MAXPATHLENGTH], *rest;
+   char fname[MAXPATHLENGTH+16], *rest;
 
    fileModified = StkPtr->file_mod;
    objId = StkPtr->id;
--- stretch.c.original	2011-06-28 04:04:59.000000000 +0200
+++ stretch.c	2020-12-28 23:05:04.406933828 +0100
@@ -1799,7 +1799,7 @@
    char smooth[5], smooth2[5];
    XEvent input, ev;
    XPoint *sv=NULL, *sv2=NULL, *saved_sv=NULL, *saved_sv2=NULL;
-   IntPoint vs[5], vs2[5], start_v, *vlist=NULL, *pvs=NULL;
+   IntPoint vs[5], vs2[5], start_v={0,0}, *vlist=NULL, *pvs=NULL;
    StretchStructuredSplineInfo sssi;
 
    if (ObjPtr->locked) {
@@ -2951,8 +2951,10 @@
          ltx = rbx = x;
          lty = rby = y;
       } else {
-         if (x < ltx) ltx = x; if (y < lty) lty = y;
-         if (x > rbx) rbx = x; if (y > rby) rby = y;
+         if (x < ltx) ltx = x;
+         if (y < lty) lty = y;
+         if (x > rbx) rbx = x;
+         if (y > rby) rby = y;
       }
    }
    ObjPtr->obbox.ltx = ObjPtr->x = ltx;
@@ -2983,8 +2985,10 @@
          ltx = rbx = x;
          lty = rby = y;
       } else {
-         if (x < ltx) ltx = x; if (y < lty) lty = y;
-         if (x > rbx) rbx = x; if (y > rby) rby = y;
+         if (x < ltx) ltx = x;
+         if (y < lty) lty = y;
+         if (x > rbx) rbx = x;
+         if (y > rby) rby = y;
       }
    }
    ObjPtr->obbox.ltx = ObjPtr->x = ltx;
@@ -3932,7 +3936,7 @@
 void PreciseScaleEverything()
 {
    int corner=CORNER_RB, saved_h_align=horiAlign, saved_v_align=vertAlign;
-   int saved_cur_page_num=curPageNum, prev_page_num=curPageNum;
+   int saved_cur_page_num=curPageNum;
    int saved_stretchable_text=stretchableText;
    char spec[MAXSTRING], buf[MAXSTRING];
    struct BBRec obbox;
@@ -4008,7 +4012,6 @@
       ShowPage();
       XSync(mainDisplay, False);
       /* RecordCmd(CMD_GOTO_PAGE, NULL, NULL, NULL, curPageNum); */
-      prev_page_num = curPageNum;
       sprintf(gszMsgBox, TgLoadCachedString(CSTID_SCALING_EVERYTHING_PAGE),
             curPageNum, lastPageNum);
       SetStringStatus(gszMsgBox);
@@ -4247,7 +4250,7 @@
 
 static
 void DoSizeAllSelToGivenWidthHeight(abs_w, abs_h, do_width, do_height)
-   int abs_h, do_width, do_height;
+   int abs_w, abs_h, do_width, do_height;
 {
    struct SelRec *saved_top_sel=topSel, *saved_bot_sel=botSel, *sel_ptr=NULL;
    int saved_h_align=horiAlign, saved_v_align=vertAlign, num_to_resize=0;
@@ -6317,7 +6320,7 @@
    XPoint all_bbox_vs[5], obj_obbox_vs[5];
    int grid_x=XGridOff, grid_y=YGridOff, dx, dy;
    int saved_x=XGridOff, saved_y=YGridOff;
-   int shearing=TRUE, shear_hori=FALSE;
+   int shearing=TRUE;
    double dx_scale=(double)1000, dy_scale=(double)1000;
    double dx_shear=(double)0, dy_shear=(double)0;
    char buf[80];
@@ -6365,11 +6368,9 @@
       return;
    }
    if (Corner == CORNER_TOP || Corner == CORNER_BOTTOM) {
-      shear_hori = TRUE;
       multX = 0.0;
       multY = (Corner == CORNER_BOTTOM ? 1.0 : (-1.0));
    } else {
-      shear_hori = FALSE;
       multX = (Corner == CORNER_RIGHT ? 1.0 : (-1.0));
       multY = 0.0;
    }
@@ -7125,7 +7126,8 @@
 void AutoRotatePivotSubMenu(index)
    int index;
 {
-   if (!autoRotatePivot == index) return;
+   if ((!autoRotatePivot) == index)
+      return;
 
    ToggleAutoRotatePivot();
 }
--- tangram2.c.original	2020-12-29 23:39:58.383604128 +0100
+++ tangram2.c	2020-12-29 23:18:49.040082623 +0100
@@ -574,7 +574,7 @@
     char line_format[ MAXFORMATSIZE ];
     char var_value[ MAXSTRING + 1 ];
     char last_object_name[ MAXOBJECTNAME ];
-    char name_string[ MAXSYMBOLNAME+MAXFORMATSIZE ];
+    char name_string[ MAXSYMBOLNAME+MAXFORMATSIZE+16 ];
     char value_string[ MAXVALUESIZE ];
     char att_name[ 15 ];
     struct ObjRec *owner_obj=NULL, *named_obj;
@@ -788,6 +788,7 @@
 {
     int i;
     char * pt;
+    double discard;
 
     /* Syntax for requests: symname([i(:f)])(<symformat>)=(symvalue) */
 
@@ -911,7 +912,8 @@
         }
         else
         {
-            strtod( buffer, &pt );
+            discard=strtod( buffer, &pt );
+            UNUSED ((void) discard);
 
             if( pt != buffer )
             {
@@ -931,12 +933,14 @@
 {
     static char value[MAXVALUESIZE];
     char * buffer;
+    double discard;
 
     buffer = values;
 
     SKIP_WHITESPACE(buffer);
     
-    strtod( buffer, endpt );
+    discard=strtod( buffer, endpt );
+    UNUSED ((void) discard);
     if( *endpt == buffer )
         return(NULL);
 
--- tdgtbtn.c.original	2011-06-28 04:04:59.000000000 +0200
+++ tdgtbtn.c	2020-12-28 23:32:24.527596428 +0100
@@ -491,7 +491,7 @@
       v_pad, btn_type, btn_style, state, font_style, str, pmosi)
    Window parent_win;
    TidgetInfo *parent_tidgetinfo;
-   int ctl_id, x, y, w, h, h_pad, v_pad, state, font_style;
+   int ctl_id, x, y, w, h, h_pad, v_pad, btn_type, btn_style, state, font_style;
    char *str;
    MouseOverStatusInfo *pmosi;
 {
--- tdgtlist.c.original	2011-06-28 04:04:59.000000000 +0200
+++ tdgtlist.c	2020-12-28 23:36:08.406917198 +0100
@@ -80,18 +80,13 @@
    ListItemInfo *pListItemInfo;
 {
    ListInfo *pListInfo=(&pTdgtList->list_info);
-   int len=0, top=0, end=0, checkbox_cols=0, text_left=0, box_offset=0, box_w=0;
+   int len=0, top=0, checkbox_cols=0, text_left=0, box_offset=0, box_w=0;
    int selected=(index==pListInfo->marked_index);
-   int length=ListLength(&pListInfo->list);
    XGCValues values;
 
    if (!pTdgtList->can_select) selected = FALSE;
    top = gnListFontAsc+1;
-   if (pListInfo->first_index+pListInfo->num_visible_lines > length) {
-      end = length;
-   } else {
-      end = pListInfo->first_index + pListInfo->num_visible_lines;
-   }
+
    if (pListInfo->p_check_array != NULL &&
          pListInfo->p_check_array->num_cols > 0) {
       checkbox_cols = pListInfo->p_check_array->num_cols;
@@ -224,25 +219,12 @@
    TdgtList *pTdgtList;
 {
    ListInfo *pListInfo=(&pTdgtList->list_info);
-   double frac=(double)0, start_frac=(double)0;
-   int block_h=0, block_start=0;
+   double start_frac=(double)0;
    int length=ListLength(&pListInfo->list);
 
    start_frac = (length > 0) ?  (double)((double)(pListInfo->first_index) /
          (double)length) : ((double)0.0);
-   /* starting pixel */
-   block_start = (int)(pTdgtList->scr_area_h * start_frac);
 
-   if (length > pListInfo->num_visible_lines) {
-      frac = (double)((double)pListInfo->num_visible_lines / (double)(length));
-   } else {
-      frac = 1.0;
-   }
-   if (pListInfo->first_index+pListInfo->num_visible_lines >= length) {
-      block_h = pTdgtList->scr_area_h - block_start;
-   } else {
-      block_h = (int)(pTdgtList->scr_area_h * frac);
-   }
    TgDrawScrollBar(mainDisplay, pTdgtList->scr_win, VERT_SCROLLBAR,
          0, 0, scrollBarW, pTdgtList->scr_area_h, start_frac,
          pListInfo->num_visible_lines, length);
@@ -1039,7 +1021,7 @@
       v_pad, num_visible_lines, can_select, multicolor, auto_scroll_on_insert)
    Window parent_win;
    TidgetInfo *parent_tidgetinfo;
-   int ctl_id, x, y, w, h_pad, v_pad, num_visible_lines, auto_scroll_on_insert;
+   int ctl_id, x, y, w, h_pad, v_pad, num_visible_lines, can_select, multicolor, auto_scroll_on_insert;
 {
    int bg_pixel=(threeDLook ? myLtGryPixel : myBgPixel), h=0, content_h=0;
    TdgtList *pTdgtList=NULL;
--- tdgtbmpl.c.original	2011-06-28 04:04:59.000000000 +0200
+++ tdgtbmpl.c	2020-11-07 19:12:17.438011908 +0100
@@ -157,27 +157,14 @@
 void RedrawTdgtBmpListScrollWindow(pTdgtBmpList)
    TdgtBmpList *pTdgtBmpList;
 {
-   double frac=(double)0, start_frac=(double)0;
-   int block_h=0, block_start=0, scr_area_h=pTdgtBmpList->scr_win_info.h;
+   double start_frac=(double)0;
+   int scr_area_h=pTdgtBmpList->scr_win_info.h;
    int num_rows=TdgtBmpListGetNumRows(pTdgtBmpList);
    int first_visible_row=(pTdgtBmpList->first_index/pTdgtBmpList->num_cols);
 
    start_frac = (num_rows > 0) ?  (double)(((double)first_visible_row) /
          ((double)num_rows)) : (((double)0));
-   /* starting pixel */
-   block_start = (int)(scr_area_h * start_frac);
 
-   if (num_rows > pTdgtBmpList->num_visible_lines) {
-      frac = (double)(((double)pTdgtBmpList->num_visible_lines) /
-            ((double)num_rows));
-   } else {
-      frac = (double)1;
-   }
-   if (pTdgtBmpList->first_index+pTdgtBmpList->num_visible_lines >= num_rows) {
-      block_h = scr_area_h - block_start;
-   } else {
-      block_h = (int)(scr_area_h * frac);
-   }
    TgDrawScrollBar(mainDisplay, pTdgtBmpList->scr_win, VERT_SCROLLBAR, 0, 0,
          scrollBarW, scr_area_h, start_frac, pTdgtBmpList->num_visible_lines,
          num_rows);
@@ -203,14 +190,12 @@
    x = y = gap;
    for ( ; pElem != NULL; pElem=pNextElem, i++) {
       BmpListItemInfo *pblii=(BmpListItemInfo*)(pElem->obj);
-      BmpListItemInfo *pblii_next=NULL;
 
       RedrawTdgtBmpListItem(pTdgtBmpList, i, x, y, pblii);
 
       x += pTdgtBmpList->one_bmp_w + gap;
       pNextElem = ListNext(&pTdgtBmpList->list, pElem);
       if (pNextElem != NULL) {
-         pblii_next = (BmpListItemInfo*)(pNextElem->obj);
          if (x+pTdgtBmpList->one_bmp_w > pTdgtBmpList->dsp_win_info.w) {
             x = gap;
             y += pTdgtBmpList->one_bmp_h+gap;
--- tdgtsedt.c.original	2011-06-28 04:04:59.000000000 +0200
+++ tdgtsedt.c	2020-12-29 20:37:55.908038094 +0100
@@ -72,7 +72,7 @@
     * When &caption[too_long-1] is too long and &caption[too_long] is not
     *         long enough, return &caption[too_long].
     */
-   int prev_too_long=INVALID, too_long=0, too_short=len, found=FALSE;
+   int too_long=0, too_short=len, found=FALSE;
    
    while (!found) {
       int w=0;
@@ -86,7 +86,6 @@
       if (too_short-too_long <= 4) {
          w = (pf_text_width_func)(font_ptr, &caption[too_long], len-too_long);
          if (w > max_w) {
-            prev_too_long = too_long;
             too_long++;
          } else {
             return (&caption[too_long]);
@@ -504,7 +503,7 @@
 
 int TdgtSmplEditSetColorIndex(pTdgtSmplEdit, color_index)
    TdgtSmplEdit *pTdgtSmplEdit;
-   int color_index;
+   long int color_index;
 {
    int prev_color_index=pTdgtSmplEdit->color_index;
 
--- tdgtsedt.e.original	2011-06-28 04:04:59.000000000 +0200
+++ tdgtsedt.e	2020-12-29 20:37:55.892037874 +0100
@@ -61,7 +61,7 @@
 extern char	*TdgtSmplEditGetText ARGS_DECL((TdgtSmplEdit*));
 extern void	TdgtSmplEditGetTextFormatInfo ARGS_DECL((TdgtSmplEdit*,
 				TextFormatInfo*));
-extern int	TdgtSmplEditSetColorIndex ARGS_DECL((TdgtSmplEdit*, int));
+extern int	TdgtSmplEditSetColorIndex ARGS_DECL((TdgtSmplEdit*, long int));
 extern int	TdgtSmplEditGetColorIndex ARGS_DECL((TdgtSmplEdit*));
 extern int	TdgtSmplEditSetFontStyle ARGS_DECL((TdgtSmplEdit*, int));
 extern int	TdgtSmplEditGetFontStyle ARGS_DECL((TdgtSmplEdit*));
--- text.c.original	2020-12-29 21:39:15.608319075 +0100
+++ text.c	2020-12-29 21:40:53.777686979 +0100
@@ -980,7 +980,7 @@
    struct TextRec *text_ptr=NULL;
    struct AttrRec *attr_ptr=NULL;
    MiniLinesInfo *minilines=NULL;
-   int num_lines=0, ltx=0, lty=0, rbx=0, rby=0, scr_ltx=0, scr_lty=0;
+   int num_lines=0, ltx=0, lty=0, rbx=0, rby=0, scr_ltx=0;
    int saved_font=curFont, saved_style=curStyle, saved_sz_unit=curSzUnit;
    int saved_just=textJust, saved_color=colorIndex;
    int saved_underline_on=curUnderlineOn;
@@ -1094,6 +1094,7 @@
    switch (textJust) {
    case JUST_L:
       scr_ltx = OFFSET_X(textAbsX-2);
+      scr_ltx += 0;
       if (zoomedIn) {
          ltx = textAbsX-2-GRID_ABS_SIZE(2);
          rbx = textAbsX+textW+2+GRID_ABS_SIZE(2);
@@ -1123,7 +1124,6 @@
       }
       break;
    }
-   scr_lty = OFFSET_Y(textAbsY);
    if (zoomedIn) {
       lty = textAbsY-2-GRID_ABS_SIZE(2);
       rby = textAbsY+textH+2+GRID_ABS_SIZE(2);
@@ -2062,7 +2062,7 @@
       pressed_in_same_text, obj_ptr, double_clicked, saved_text_highlight,
       skip_post_processing, click_time)
    int drag, from_cursor_keys, x_off, y_off, pressed_in_same_text;
-   int double_clicked, saved_text_highlight;
+   int double_clicked, saved_text_highlight, skip_post_processing;
    struct ObjRec *obj_ptr;
    Time click_time;
 {
@@ -2425,7 +2425,6 @@
    KeySym key_sym;
    int *pn_has_char;
 {
-   struct AttrRec *attr_ptr=NULL;
    int merged_lines=FALSE;
    int nDeleteNextChar=(deleteNextCharWithDelKey &&
          CharIsDEL(key_ev, buf, key_sym, pn_has_char)) ||
@@ -2440,7 +2439,6 @@
       EndChangeCurText(FALSE);
       return;
    }
-   attr_ptr = curTextObj->detail.t->attr;
    if (nDeleteNextChar) {
       if (CanAdvanceRight(curStrBlock, textCurIndex)) {
          AdvanceRight(TRUE);
@@ -4075,7 +4073,7 @@
    struct ObjRec *ObjPtr;
 {
    struct TextRec *text_ptr=ObjPtr->detail.t;
-   int x, y, xinc=0, yinc=0, trans_pat=0, fill=0, pen=0;
+   int x, trans_pat=0, fill=0, pen=0;
    int use_cache=FALSE;
    XGCValues values;
 
@@ -4102,10 +4100,6 @@
       use_cache = TRUE;
    }
    x = ObjPtr->x - XOff;
-   y = ObjPtr->y - YOff;
-
-   xinc = 0;
-   yinc = textCursorH+textVSpace;
 
    trans_pat = ObjPtr->trans_pat;
    fill = text_ptr->fill;
@@ -4763,7 +4757,7 @@
    char *color_str;
    int num_lines, has_ps_bitmap, cur_sb_font, cur_db_font;
    int double_byte, db_mod_bytes, db_vertical, direction;
-   int x, baseline_y, *pn_max_len, *pn_max_h;
+   int x, baseline_y, text_w, *pn_max_len, *pn_max_h;
    /*
     * (Note: text_w is only used for fileVersion <= 36)
     */
@@ -5044,7 +5038,7 @@
 {
    int max_len=0, max_h=0, len;
    struct TextRec *text_ptr;
-   char color_str[40], bg_color_str[40], *s, *c_ptr, font_str[MAXSTRING];
+   char color_str[40], bg_color_str[40], *s, *c_ptr, *discard, font_str[MAXSTRING];
    char sb_font_str[MAXSTRING], inbuf[MAXSTRING+1];
    char cust_font_name[MAXSTRING+1]; /* this is not really used any more */
    int has_ps_bitmap=FALSE;
@@ -5485,7 +5479,8 @@
       int do_adjust=FALSE, dx=0, t[2];
       double dreal_x, dreal_y, m[4];
 
-      (void)fgets(inbuf, MAXSTRING, FP);
+      discard=fgets(inbuf, MAXSTRING, FP);
+      UNUSED ((void) discard);
       scanLineNum++;
       InitScan(inbuf, "\t\n, ");
 
--- tgcwheel.c.original	2011-06-28 04:04:59.000000000 +0200
+++ tgcwheel.c	2020-11-07 18:55:26.708271173 +0100
@@ -116,6 +116,7 @@
    KeySym key_sym=(KeySym)0;
 
    has_ch = XLookupString(key_ev, s, sizeof(s), &key_sym, &c_stat);
+   has_ch += 0;
    TranslateKeys(s, &key_sym);
 
    return FALSE;
--- tgcwdl.c.original	2011-06-28 04:04:59.000000000 +0200
+++ tgcwdl.c	2020-11-07 19:09:03.839362879 +0100
@@ -1562,8 +1562,8 @@
    TdgtBase *pTdgtBase;
 {
    ColorWheelDlgInfo *pcwdi=(ColorWheelDlgInfo*)(pTdgtBase->pti->userdata);
-   int max_w=0, bottom=0, h_pad=pTdgtBase->pti->tci.h_pad, cur_x=0, cur_y=0;
-   int v_pad=pTdgtBase->pti->tci.v_pad, end_y=0;
+   int max_w=0, bottom=0, h_pad=pTdgtBase->pti->tci.h_pad;
+   int v_pad=pTdgtBase->pti->tci.v_pad;
    SimpleWinInfo *pswi=NULL;
 
    /* hue edit */
@@ -1573,12 +1573,8 @@
    bottom = pcwdi->btn_row_ctl->pti->tci.win_info.y +
          pcwdi->btn_row_ctl->pti->tci.win_info.h;
 
-   cur_x = windowPadding + h_pad;
-   cur_y = windowPadding + v_pad;
-
    /* hs_pixmap */
    pswi = (&(pcwdi->hs_pixmap_ctl->pti->tci.win_info));
-   end_y = pswi->y+pswi->h;
 
    /* button row */
    pswi = (&(pcwdi->btn_row_ctl->pti->tci.win_info));
@@ -1719,8 +1715,8 @@
    Display *dpy;
    Window parent_win; /* should be the rootWindow */
 {
-   int cur_x=0, cur_y=0, v_gap=20, h_pad=0, v_pad=0;
-   int w=0, h=0, vh_padding=0, h_gap=14, end_y=0, rgbhsv_width=0;
+   int cur_x=0, cur_y=0, v_gap=20, end_y=0;
+   int w=0, h=0, vh_padding=0, h_gap=14, rgbhsv_width=0;
    TdgtBase *pTdgtBase=NULL;
    ColorWheelDlgInfo *pcwdi=NULL;
    char caption[MAXSTRING];
@@ -1749,8 +1745,6 @@
    } else {
        rgbhsv_width = defaultFontWidth * 4;
    }
-   h_pad = TDGTBASE_DEF_H_PAD;
-   v_pad = TDGTBASE_DEF_V_PAD;
    if (msgFontSet != NULL || msgFontPtr != NULL) {
       vh_padding = (msgFontWidth<<1);
    } else {
--- tginssym.c.original	2011-06-28 04:04:59.000000000 +0200
+++ tginssym.c	2020-11-07 19:00:16.272165622 +0100
@@ -142,6 +142,7 @@
    KeySym key_sym=(KeySym)0;
 
    has_ch = XLookupString(key_ev, s, sizeof(s), &key_sym, &c_stat);
+   has_ch += 0;
    TranslateKeys(s, &key_sym);
 
    return FALSE;
--- tgisdl.c.original	2020-12-29 08:12:48.540872423 +0100
+++ tgisdl.c	2020-11-07 19:05:04.656090087 +0100
@@ -196,6 +196,7 @@
 
    if (pTdgtDraw == NULL) return FALSE;
    pTdgtBase = (TdgtBase*)(pTdgtDraw->pti->tci.parent_tidgetinfo->tidget);
+   pTdgtBase += 0;
 
    XCopyArea(mainDisplay, gInsertSymbolInfo.sym_pixmap, pTdgtDraw->pti->tci.win,
          gTidgetManager.gc, 0, 0, pTdgtDraw->client_area.w,
@@ -648,8 +649,8 @@
    TdgtBase *pTdgtBase;
 {
    InsertSymbolDlgInfo *pisdi=(InsertSymbolDlgInfo*)(pTdgtBase->pti->userdata);
-   int max_w=0, bottom=0, h_pad=pTdgtBase->pti->tci.h_pad, cur_x=0, cur_y=0;
-   int v_pad=pTdgtBase->pti->tci.v_pad, end_y=0;
+   int max_w=0, bottom=0, h_pad=pTdgtBase->pti->tci.h_pad;
+   int v_pad=pTdgtBase->pti->tci.v_pad;
    SimpleWinInfo *pswi=NULL;
 
    /* hue edit */
@@ -659,12 +660,8 @@
    bottom = pisdi->btn_row_ctl->pti->tci.win_info.y +
          pisdi->btn_row_ctl->pti->tci.win_info.h;
 
-   cur_x = windowPadding + h_pad;
-   cur_y = windowPadding + v_pad;
-
    /* sym_pixmap */
    pswi = (&(pisdi->sym_pixmap_ctl->pti->tci.win_info));
-   end_y = pswi->y+pswi->h;
 
    /* button row */
    pswi = (&(pisdi->btn_row_ctl->pti->tci.win_info));
@@ -800,7 +797,7 @@
    Display *dpy;
    Window parent_win; /* should be the rootWindow */
 {
-   int cur_x=0, cur_y=0, v_gap=20, h_pad=0, v_pad=0;
+   int cur_x=0, cur_y=0, v_gap=20;
    int vh_padding=0, h_gap=14, end_y=0, rgbhsv_width=0;
    TdgtBase *pTdgtBase=NULL;
    InsertSymbolDlgInfo *pisdi=NULL;
@@ -824,13 +821,12 @@
    }
    if (boldMsgFontSet != NULL || boldMsgFontPtr != NULL) {
        rgbhsv_width = BoldMsgTextWidth(boldMsgFontPtr, "9999", 4);
+       rgbhsv_width += 0;
    } else if (msgFontSet != NULL || msgFontPtr != NULL) {
        rgbhsv_width = MsgTextWidth(msgFontPtr, "9999", 4);
    } else {
        rgbhsv_width = defaultFontWidth * 4;
    }
-   h_pad = TDGTBASE_DEF_H_PAD;
-   v_pad = TDGTBASE_DEF_V_PAD;
    if (msgFontSet != NULL || msgFontPtr != NULL) {
       vh_padding = (msgFontWidth<<1);
    } else {
--- tgtwb5.c.original	2011-06-28 04:04:59.000000000 +0200
+++ tgtwb5.c	2020-11-07 19:13:43.055183433 +0100
@@ -152,6 +152,7 @@
    KeySym key_sym=(KeySym)0;
 
    has_ch = XLookupString(key_ev, s, sizeof(s), &key_sym, &c_stat);
+   has_ch += 0;
    TranslateKeys(s, &key_sym);
 
    return FALSE;
--- tgtwb5dl.c.original	2011-06-28 04:04:59.000000000 +0200
+++ tgtwb5dl.c	2020-11-07 19:14:52.588134861 +0100
@@ -399,6 +399,7 @@
       return FALSE;
    }
    len = strlen(psz_found);
+   len += 0;
 #ifdef _TGIF_DBG /* debug, do not translate */
    if (len > MAX_PINYIN_ET_BIG5_STR) {
       sprintf(gszMsgBox, "Fetched hexstring in LoadChars() is too long: %1d (limit is %1d).\n",
@@ -450,6 +451,7 @@
          buf[0] = buf[0]-'a'+'A';
       }
       ok = LoadChars(pTdgtBase, buf);
+      ok += 0;
       if (saved_ch != '\0') buf[0] = saved_ch;
    }
    pzdi->just_fetched = TRUE;
--- wb.e.original	2011-06-28 04:04:59.000000000 +0200
+++ wb.e	2020-12-29 23:31:17.267695261 +0100
@@ -27,7 +27,7 @@
    int	do_whiteboard;
 
    char	send_fname[MAXPATHLENGTH];
-   char	gz_send_fname[MAXPATHLENGTH]; /* zlib, not gzip */
+   char	gz_send_fname[MAXPATHLENGTH+16]; /* zlib, not gzip */
    FILE *send_fp;
    FILE *gz_send_fp; /* zlib, not gzip */
    int	send_socket;
@@ -35,7 +35,7 @@
    int	listening;
 
    char	listen_fname[MAXPATHLENGTH];
-   char	gz_listen_fname[MAXPATHLENGTH]; /* zlib, not gzip */
+   char	gz_listen_fname[MAXPATHLENGTH+16]; /* zlib, not gzip */
    FILE	*listen_fp;
    FILE	*gz_listen_fp; /* zlib, not gzip */
    int	listen_socket;
--- xbitmap.c.original	2020-12-29 21:39:15.608319075 +0100
+++ xbitmap.c	2020-12-29 21:40:53.781687036 +0100
@@ -1998,8 +1998,10 @@
       *SrcX = (int)round((((float)SrcW)*((float)DestX))/((float)DestW));
       *SrcY = (int)round((((float)SrcH)*((float)DestY))/((float)DestH));
    }
-   if (*SrcX >= SrcW) *SrcX = SrcW-1; if (*SrcX < 0) *SrcX = 0;
-   if (*SrcY >= SrcH) *SrcY = SrcH-1; if (*SrcY < 0) *SrcY = 0;
+   if (*SrcX >= SrcW) *SrcX = SrcW-1;
+   if (*SrcX < 0) *SrcX = 0;
+   if (*SrcY >= SrcH) *SrcY = SrcH-1;
+   if (*SrcY < 0) *SrcY = 0;
 }
 
 void GenPreviewBitmap(FP, llxPage, llyPage, urxPage, uryPage)
@@ -5758,13 +5760,15 @@
    struct XBmRec *xbm_ptr;
    int transformed, rotate, flip;
 {
+   char *discard;
    if (fileVersion >= 33 && transformed) {
       char inbuf[MAXSTRING];
       struct XfrmMtrxRec *ctm=NULL;
       int real_x=0, real_y=0;
       struct BBRec orig_obbox;
 
-      (void)fgets(inbuf, MAXSTRING, FP);
+      discard=fgets(inbuf, MAXSTRING, FP);
+      UNUSED ((void) discard);
       scanLineNum++;
       InitScan(inbuf, "\t\n, ");
 
@@ -5905,7 +5909,7 @@
    struct ObjRec **ObjPtr;
 {
    struct XBmRec *xbm_ptr=NULL;
-   char color_str[40], bg_color_str[40], *s, inbuf[MAXSTRING], *c_ptr;
+   char color_str[40], bg_color_str[40], *s, inbuf[MAXSTRING], *c_ptr, *discard;
    int ltx, lty, rbx, rby, i, j, k, data=0, color_index;
    int nibble_count, bit_count, num_nibbles, fill, trans_pat=FALSE;
    int rotation=0, new_alloc, id=0, image_w=0, image_h=0;
@@ -6102,7 +6106,8 @@
    if (fileVersion >= 24) {
       char *tmp_str, *s, *s1;
 
-      (void)fgets(inbuf, MAXSTRING, FP);
+      discard=fgets(inbuf, MAXSTRING, FP);
+      UNUSED ((void) discard);
       scanLineNum++;
 
       tmp_str = FindChar((int)'"', inbuf);
@@ -6344,7 +6349,7 @@
       num_nibbles = ((image_w % 4) == 0) ? (int)(image_w>>2) :
             (int)(image_w>>2)+1;
 
-      (void)fgets(inbuf, MAXSTRING, FP);
+      discard=fgets(inbuf, MAXSTRING, FP);
       scanLineNum++;
       c_ptr = &inbuf[5];
       nibble_count = 0;
@@ -6355,7 +6360,7 @@
          for (i = 0; i < image_h; i++) {
             for (j = 0; j < num_nibbles; j++) {
                if (nibble_count++ == 64) {
-                  (void)fgets(inbuf, MAXSTRING, FP);
+                  discard=fgets(inbuf, MAXSTRING, FP);
                   scanLineNum++;
                   c_ptr = &inbuf[5];
                   nibble_count = 1;
@@ -6373,7 +6378,7 @@
             bit_count = 0;
             for (j = 0; j < num_nibbles; j++) {
                if (nibble_count++ == 64) {
-                  (void)fgets(inbuf, MAXSTRING, FP);
+                  discard=fgets(inbuf, MAXSTRING, FP);
                   scanLineNum++;
                   c_ptr = &inbuf[5];
                   nibble_count = 1;
--- xpixmap.c.original	2011-06-28 04:05:00.000000000 +0200
+++ xpixmap.c	2020-12-29 20:36:06.778536268 +0100
@@ -1032,11 +1032,10 @@
 {
    int row=0, i=0, index=0, col=0, j=0, num_nibbles=0, nibble_count=0;
    int ltx=0, lty=0, rbx=0, rby=0, w=0, h=0, image_w=0, image_h=0;
-   int ncolors=0, *pixels=NULL, flip=0, orig_x=0, orig_y=0;
+   int orig_x=0, orig_y=0;
    int chars_per_pixel=0, x=0, y=0;
    int h_blocks=0, v_blocks=0, block_w=0, block_h=0, bit_count=0, data=0;
    char *xpm_data=NULL, bg_char[2];
-   Pixmap pixmap, bitmap=(Pixmap)0;
    struct XPmRec *xpm_ptr=NULL;
 
    bg_char[0] = bg_char[1] = '\0';
@@ -1048,11 +1047,6 @@
 
    xpm_ptr = ObjPtr->detail.xpm;
 
-   pixmap = xpm_ptr->pixmap;
-   bitmap = xpm_ptr->bitmap;
-   pixels = xpm_ptr->pixels;
-   ncolors = xpm_ptr->ncolors;
-   flip = xpm_ptr->flip;
    image_w = xpm_ptr->image_w;
    image_h = xpm_ptr->image_h;
 
@@ -1642,7 +1636,7 @@
    int row=0, image_w=xpm_ptr->image_w, image_h=xpm_ptr->image_h;
    int chars_per_pixel=0, pixel_index=0;
    int ncolors=0;
-   char *xpm_data=NULL, *color_char=NULL;
+   char *xpm_data=NULL;
    Pixmap pixmap=(Pixmap)0, bitmap=(Pixmap)0;
    XImage *image=NULL, *bitmap_image=NULL;
  
@@ -1690,13 +1684,11 @@
 
    xpm_data = xpm_ptr->data;
    chars_per_pixel = xpm_ptr->chars_per_pixel;
-   color_char = xpm_ptr->color_char;
 
    for (row=0; row < image_h; row++) {
       int col=0;
 
       for (col=0; col < image_w; col++) {
-         int transparent_pixel=INVALID;
 #ifdef NOT_DEFINED
          float gray=(float)0;
          int value=0;
@@ -1753,7 +1745,6 @@
                } else {
                   /* transparent pixel */
                   pixel_index = XPmLookUp((-1), INVALID, NULL, NULL);
-                  transparent_pixel = pixel_index;
                }
                if (pxtii->has_transparent_pixel &&
                        pxtii->found_transparent_pixel &&
@@ -1949,7 +1940,7 @@
 {
    int row=0, i=0, index=0, col=0, too_many_colors=FALSE;
    int ltx=0, lty=0, rbx=0, rby=0, w=0, h=0, image_w=0, image_h=0;
-   int ncolors=0, *pixels=NULL, flip=0, orig_x=0, orig_y=0;
+   int ncolors=0, *pixels=NULL, flip=0;
    int cur_pixel=0, chars_per_pixel=0, x=0, y=0, found_index=0, pixel_index=0;
    int has_transparent_pixel=FALSE, is_linked_jpeg=IsLinkedJpegObj(ObjPtr);
    unsigned int trans_color_pixel_r=0, trans_color_pixel_g=0, trans_color_pixel_b=0;
@@ -2007,9 +1998,6 @@
 
    CalcTransform(&mtrx);
 
-   orig_x = (mtrx.transformed_w >= 0.0) ? ltx : ltx+w;
-   orig_y = (mtrx.transformed_h >= 0.0) ? lty : lty+h;
-
    fprintf(FP, "%% XPM\n");
 
    xpm_data = xpm_ptr->data;
@@ -3977,7 +3965,7 @@
    struct ObjRec **ObjPtr;
 {
    struct XPmRec *xpm_ptr;
-   char color_s[40], trans_color_s[40], *s, inbuf[MAXSTRING], *c_ptr, *line;
+   char color_s[40], trans_color_s[40], *s, inbuf[MAXSTRING], *c_ptr, *line, *discard;
    int ltx, lty, rbx, rby, i, j, k, image_w, image_h;
    int ncolors, * pixels, len, index, fill, color_index;
    int *red=NULL, *green=NULL, *blue=NULL;
@@ -4122,7 +4110,8 @@
       flip = 0;
    }
    if (fileVersion >= 33 && transformed) {
-      (void)fgets(inbuf, MAXSTRING, FP);
+      discard=fgets(inbuf, MAXSTRING, FP);
+      UNUSED ((void) discard);
       scanLineNum++;
       InitScan(inbuf, "\t\n, ");
 
@@ -4219,7 +4208,7 @@
 
    bg_pixel = GetDrawingBgPixel(INVALID, INVALID);
    for (i=0; i < ncolors; i++) {
-      (void)fgets(inbuf, MAXSTRING, FP);
+      discard=fgets(inbuf, MAXSTRING, FP);
       scanLineNum++;
       c_ptr = FindChar((int)'"', inbuf);
       for (j = 0; j < chars_per_pixel; j++) {
@@ -4292,7 +4281,7 @@
       line = (char*)malloc((image_w*chars_per_pixel+20)*sizeof(char));
       if (line == NULL) FailAllocMessage();
       for (i=0; i < image_h; i++, xpm_data += image_w*chars_per_pixel) {
-         (void)fgets(line, image_w*chars_per_pixel+20, FP);
+         discard=fgets(line, image_w*chars_per_pixel+20, FP);
          scanLineNum++;
          c_ptr = &line[4];
          strncpy(xpm_data, c_ptr, image_w*chars_per_pixel);
@@ -4335,7 +4324,7 @@
       line = (char*)malloc((image_w*chars_per_pixel+20)*sizeof(char));
       if (line == NULL) FailAllocMessage();
       for (i=0; i < image_h; i++) {
-         (void)fgets(line, image_w*chars_per_pixel+20, FP);
+         discard=fgets(line, image_w*chars_per_pixel+20, FP);
          scanLineNum++;
          c_ptr = &line[4];
          if (xpm_data != NULL) {
@@ -4580,11 +4569,11 @@
 {
    struct XPmRec *xpm_ptr=NULL;
    char color_s[40], trans_color_s[40], *s=NULL, inbuf[MAXSTRING];
-   char *jpeg_filename=NULL;
+   char *jpeg_filename=NULL, *discard;
    int ltx, lty, rbx, rby, image_w=0, image_h=0;
    int ncolors, fill, color_index;
    int rotation, chars_per_pixel;
-   int first_pixel_is_bg, first_pixel_maybe_bg, new_alloc;
+   int first_pixel_is_bg, new_alloc;
    int id=0, rotate=ROTATE0, flip=NO_FLIP, locked=FALSE;
    int compressed=FALSE, real_x=0, real_y=0, real_type=0, linked_jpeg=FALSE;
    int transformed=FALSE, invisible=FALSE;
@@ -4603,7 +4592,6 @@
 
    rotation = 0;
    chars_per_pixel = 1;
-   first_pixel_maybe_bg = TRUE;
    first_pixel_is_bg = TRUE;
    if (fileVersion < 37) {
       sprintf(gszMsgBox,
@@ -4639,12 +4627,12 @@
          return;
       }
       if (id >= objId) objId = id+1;
-      first_pixel_maybe_bg = FALSE;
    }
    if (real_type == XPM_JPEG && linked_jpeg) {
       char *tmp_str=NULL;
 
-      (void)fgets(inbuf, MAXSTRING, FP);
+      discard=fgets(inbuf, MAXSTRING, FP);
+      UNUSED ((void) discard);
       scanLineNum++;
 
       tmp_str = FindChar((int)'"', inbuf);
@@ -4662,7 +4650,7 @@
       return;
    }
    if (transformed) {
-      (void)fgets(inbuf, MAXSTRING, FP);
+      discard=fgets(inbuf, MAXSTRING, FP);
       scanLineNum++;
       InitScan(inbuf, "\t\n, ");
 
@@ -5165,7 +5153,7 @@
    struct ObjRec **ObjPtr;
 {
    struct XPmRec *xpm_ptr=NULL;
-   char *s=NULL, inbuf[MAXSTRING], *ppm_data=NULL, *ppm_mask_data=NULL;
+   char *s=NULL, inbuf[MAXSTRING], *ppm_data=NULL, *ppm_mask_data=NULL, *discard;
    char color_s[40], trans_color_s[40], tmp_fname[MAXPATHLENGTH];
    int ltx=0, lty=0, rbx=0, rby=0, image_w=0, image_h=0, color_index=(-1);
    int rotation=0, new_alloc=FALSE, id=0, rotate=ROTATE0, flip=NO_FLIP;
@@ -5242,7 +5230,8 @@
       return;
    }
    if (transformed) {
-      (void)fgets(inbuf, MAXSTRING, FP);
+      discard=fgets(inbuf, MAXSTRING, FP);
+      UNUSED ((void) discard);
       scanLineNum++;
       InitScan(inbuf, "\t\n, ");
 
@@ -5265,6 +5254,7 @@
    }
    ppm_data = ReadPpmTrueData(FP, ppm_data_size);
    ppm_mask_data = ReadPpmTrueMask(FP, ppm_mask_size);
+   ppm_mask_data += 0;
    if (ppm_data == NULL) return;
 
    *tmp_fname = '\0';
--- z_intrf.c.original	2011-06-28 04:05:00.000000000 +0200
+++ z_intrf.c	2020-12-29 20:36:00.998456732 +0100
@@ -299,7 +299,7 @@
          have = block_sz - strm.avail_out;
 
          if (use_byte_stuffing) {
-            unsigned int have2=0;
+            int have2=0;
             unsigned char out2[0x8000];
 
             have2 = 0;
--- http.c.original	2021-01-06 19:32:06.000000000 +0100
+++ http.c	2021-01-06 19:34:49.366105644 +0100
@@ -79,7 +79,7 @@
 
 static struct TgifHttpHeaderInfo tgifHttpHeaderInfo;
 
-static char SZ_HTTP_VERSION[]="HTTP/1.0";
+static char SZ_HTTP_VERSION[]="HTTP/1.1";
 static char SZ_USER_AGENT[128];
 static char SZ_USER_NAME[128];
 
openSUSE Build Service is sponsored by