diff options
author | Thomas E. Dickey <dickey@invisible-island.net> | 2019-07-03 09:57:05 -0400 |
---|---|---|
committer | Thomas E. Dickey <dickey@invisible-island.net> | 2019-07-04 13:08:33 -0400 |
commit | eeea8a6b2b84ef2a3f50387d1ae99037b692a3f4 (patch) | |
tree | 356627fef4c35b88e170f5a591f782a3b57888ca | |
parent | 729e6f0b05664952f04865f2c0143524d4ac01d3 (diff) | |
download | xorg-lib-libXaw-eeea8a6b2b84ef2a3f50387d1ae99037b692a3f4.tar.gz |
add casts to quiet gcc conversion-warnings, no object change
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
-rw-r--r-- | src/DisplayList.c | 232 |
1 files changed, 116 insertions, 116 deletions
diff --git a/src/DisplayList.c b/src/DisplayList.c index 0581bf7..7c90916 100644 --- a/src/DisplayList.c +++ b/src/DisplayList.c @@ -177,7 +177,7 @@ read_token(char *src, char *dst, Cardinal size, int *status) { if (esc) { - dst[i++] = ch; + dst[i++] = (char)ch; esc = False; continue; } @@ -216,7 +216,7 @@ read_token(char *src, char *dst, Cardinal size, int *status) } else esc = False; - dst[i++] = ch; + dst[i++] = (char)ch; } *status = DLERR; @@ -287,7 +287,7 @@ _XawDisplayList *XawCreateDisplayList(String string, Screen *screen, } if (fp) { - snprintf(cname, fp - fname + 1, "%s", fname); + snprintf(cname, (size_t)(fp - fname + 1), "%s", fname); memmove(fname, fp + 1, strlen(fp)); lc = cname[0] ? XawGetDisplayListClass(cname) : xlibc; if (!lc) @@ -337,8 +337,8 @@ _XawDisplayList *XawCreateDisplayList(String string, Screen *screen, { ++dlist->num_procs; dlist->procs = (XawDLProc**) - XtRealloc((char *)dlist->procs, sizeof(XawDLProc*) * - dlist->num_procs); + XtRealloc((char *)dlist->procs, (Cardinal)(sizeof(XawDLProc*) * + dlist->num_procs)); } dlist->procs[dlist->num_procs - 1] = proc; @@ -368,8 +368,8 @@ _XawDisplayList *XawCreateDisplayList(String string, Screen *screen, { ++proc->num_params; proc->params = (String *)XtRealloc((char *)proc->params, - sizeof(String) * - proc->num_params); + (Cardinal)(sizeof(String) * + proc->num_params)); } proc->params[proc->num_params - 1] = XtNewString(aname); } @@ -401,8 +401,8 @@ _XawDisplayList *XawCreateDisplayList(String string, Screen *screen, { ++dlist->num_data; dlist->data = (XawDLData **) - XtRealloc((char *)dlist->data, sizeof(XawDLData*) * - dlist->num_data); + XtRealloc((char *)dlist->data, (Cardinal)(sizeof(XawDLData*) * + dlist->num_data)); } dlist->data[dlist->num_data - 1] = data; } @@ -478,7 +478,7 @@ XawDestroyDisplayList(_XawDisplayList *dlist) } for (j = 0; j < proc->num_params; j++) - XtFree(proc->params[j]); + XtFree((char *)proc->params[j]); if (proc->num_params) XtFree((char *)proc->params); XtFree((char *)proc); @@ -544,12 +544,12 @@ typedef struct _XawDLImageArgs { int depth; } XawDLImageArgs; -#define X_ARG(x) (Position)(((x).denom != 0) ? \ +#define X_ARG(x) ((Position)(((x).denom != 0) ? \ ((float)XtWidth(w) * ((float)(x).pos / (float)(x).denom)) : \ - ((x).high ? XtWidth(w) - (x).pos : (x).pos)) -#define Y_ARG(x) (Position)(((x).denom != 0) ? \ + (float)((x).high ? XtWidth(w) - (x).pos : (x).pos))) +#define Y_ARG(x) ((Position)(((x).denom != 0) ? \ ((float)XtHeight(w) * ((float)(x).pos / (float)(x).denom)): \ - ((x).high ? XtHeight(w) - (x).pos : (x).pos)) + (float)((x).high ? XtHeight(w) - (x).pos : (x).pos))) #define DRECT 0 #define FRECT 1 #define LINE 2 @@ -600,17 +600,17 @@ Dl1Point(Widget w, XtPointer args, XtPointer data, int id) Window window; Position x, y; - x = X_ARG(pos[0]); - y = Y_ARG(pos[1]); + x = (Position)(X_ARG(pos[0])); + y = (Position)(Y_ARG(pos[1])); if (!XtIsWidget(w)) { Position xpad, ypad; - xpad = XtX(w) + XtBorderWidth(w); - ypad = XtY(w) + XtBorderWidth(w); - x += xpad; - y += ypad; + xpad = (Position)(XtX(w) + XtBorderWidth(w)); + ypad = (Position)(XtY(w) + XtBorderWidth(w)); + x = (Position)(x + xpad); + y = (Position)(y + ypad); display = XtDisplayOfObject(w); window = XtWindowOfObject(w); } @@ -656,10 +656,10 @@ Dl2Points(Widget w, XtPointer args, XtPointer data, int id) { Position xpad, ypad; - xpad = XtX(w) + XtBorderWidth(w); - ypad = XtY(w) + XtBorderWidth(w); - x1 += xpad; y1 += ypad; - x2 += xpad; y2 += ypad; + xpad = (Position)(XtX(w) + XtBorderWidth(w)); + ypad = (Position)(XtY(w) + XtBorderWidth(w)); + x1 = (Position)(x1 + xpad); y1 = (Position)(y1 + ypad); + x2 = (Position)(x2 + xpad); y2 = (Position)(y2 + ypad); display = XtDisplayOfObject(w); window = XtWindowOfObject(w); } @@ -670,9 +670,9 @@ Dl2Points(Widget w, XtPointer args, XtPointer data, int id) } if (id == DRECT) - XDrawRectangle(display, window, xdata->gc, x1, y1, x2 - x1, y2 - y1); + XDrawRectangle(display, window, xdata->gc, x1, y1, (unsigned)(x2 - x1), (unsigned)(y2 - y1)); else if (id == FRECT) - XFillRectangle(display, window, xdata->gc, x1, y1, x2 - x1, y2 - y1); + XFillRectangle(display, window, xdata->gc, x1, y1, (unsigned)(x2 - x1), (unsigned)(y2 - y1)); else if (id == LINE) XDrawLine(display, window, xdata->gc, x1, y1, x2, y2); } @@ -726,20 +726,20 @@ DlXPoints(Widget w, XtPointer args, XtPointer data, int id) { Position xpad, ypad; - xpad = XtX(w) + XtBorderWidth(w); - ypad = XtY(w) + XtBorderWidth(w); + xpad = (Position)(XtX(w) + XtBorderWidth(w)); + ypad = (Position)(XtY(w) + XtBorderWidth(w)); if (xdata->mode != CoordModePrevious) { for (i = 0; i < num_points; i++) { - points[i].x += xpad; - points[i].y += ypad; + points[i].x = (short)(points[i].x + xpad); + points[i].y = (short)(points[i].y + ypad); } } else { - points[0].x += xpad; - points[0].y += ypad; + points[0].x = (short)(points[0].x + xpad); + points[0].y = (short)(points[0].y + ypad); } display = XtDisplayOfObject(w); window = XtWindowOfObject(w); @@ -751,12 +751,12 @@ DlXPoints(Widget w, XtPointer args, XtPointer data, int id) } if (id == FPOLY) - XFillPolygon(display, window, xdata->gc, points, num_points, + XFillPolygon(display, window, xdata->gc, points, (int)num_points, xdata->shape, xdata->mode); else if (id == DLINES) - XDrawLines(display, window, xdata->gc, points, num_points, xdata->mode); + XDrawLines(display, window, xdata->gc, points, (int)num_points, xdata->mode); else if (id == POINTS) - XDrawPoints(display, window, xdata->gc, points, num_points, xdata->mode); + XDrawPoints(display, window, xdata->gc, points, (int)num_points, xdata->mode); XawStackFree(points, points_buf); } @@ -835,12 +835,12 @@ DlArc(Widget w, XtPointer args, XtPointer data, Bool fill) { Position xpad, ypad; - xpad = XtX(w) + XtBorderWidth(w); - ypad = XtY(w) + XtBorderWidth(w); - x1 += xpad; - y1 += ypad; - x2 += xpad; - y2 += ypad; + xpad = (Position)(XtX(w) + XtBorderWidth(w)); + ypad = (Position)(XtY(w) + XtBorderWidth(w)); + x1 = (Position)(x1 + xpad); + y1 = (Position)(y1 + ypad); + x2 = (Position)(x2 + xpad); + y2 = (Position)(y2 + ypad); display = XtDisplayOfObject(w); window = XtWindowOfObject(w); } @@ -851,10 +851,10 @@ DlArc(Widget w, XtPointer args, XtPointer data, Bool fill) } if (fill) - XFillArc(display, window, xdata->gc, x1, y1, x2 - x1, y2 - y1, + XFillArc(display, window, xdata->gc, x1, y1, (unsigned)(x2 - x1), (unsigned)(y2 - y1), arc->angle1, arc->angle2); else - XDrawArc(display, window, xdata->gc, x1, y1, x2 - x1, y2 - y1, + XDrawArc(display, window, xdata->gc, x1, y1, (unsigned)(x2 - x1), (unsigned)(y2 - y1), arc->angle1, arc->angle2); } @@ -888,10 +888,10 @@ DlMask(Widget w, XtPointer args, XtPointer data, { XRectangle rect; - rect.x = event->xexpose.x; - rect.y = event->xexpose.y; - rect.width = event->xexpose.width; - rect.height = event->xexpose.height; + rect.x = (short)event->xexpose.x; + rect.y = (short)event->xexpose.y; + rect.width = (unsigned short)event->xexpose.width; + rect.height = (unsigned short)event->xexpose.height; XSetClipRectangles(display, xdata->gc, 0, 0, &rect, 1, Unsorted); } } @@ -912,12 +912,12 @@ DlLineWidth(Widget w, XtPointer args, XtPointer data, XEvent *event, Region region) { XawXlibData *xdata = (XawXlibData *)data; - unsigned line_width = (unsigned long)args; + unsigned line_width = (unsigned)(unsigned long)args; if (xdata->values.line_width != line_width) { xdata->mask |= GCLineWidth; - xdata->values.line_width = line_width; + xdata->values.line_width = (int)line_width; XChangeGC(XtDisplayOfObject(w), xdata->gc, GCLineWidth, &xdata->values); } } @@ -959,14 +959,14 @@ DlDrawSegments(Widget w, XtPointer args, XtPointer data, { Position xpad, ypad; - xpad = XtX(w) + XtBorderWidth(w); - ypad = XtY(w) + XtBorderWidth(w); + xpad = (Position)(XtX(w) + XtBorderWidth(w)); + ypad = (Position)(XtY(w) + XtBorderWidth(w)); for (i = 0; i < num_segments; i++) { - segments[i].x1 += xpad; - segments[i].y1 += ypad; - segments[i].x2 += xpad; - segments[i].y2 += ypad; + segments[i].x1 = (short)(segments[i].x1 + xpad); + segments[i].y1 = (short)(segments[i].y1 + ypad); + segments[i].x2 = (short)(segments[i].x2 + xpad); + segments[i].y2 = (short)(segments[i].y2 + ypad); } display = XtDisplayOfObject(w); window = XtWindowOfObject(w); @@ -977,7 +977,7 @@ DlDrawSegments(Widget w, XtPointer args, XtPointer data, window = XtWindow(w); } - XDrawSegments(display, window, xdata->gc, segments, num_segments); + XDrawSegments(display, window, xdata->gc, segments, (int)num_segments); XawStackFree(segments, segments_buf); } @@ -988,7 +988,7 @@ DlArcMode(Widget w, XtPointer args, XtPointer data, XEvent *event, Region region) { XawXlibData *xdata = (XawXlibData *)data; - int arc_mode = (long)args; + int arc_mode = (int)(long)args; if (xdata->values.arc_mode != arc_mode) { @@ -1004,7 +1004,7 @@ DlCoordMode(Widget w, XtPointer args, XtPointer data, XEvent *event, Region region) { XawXlibData *xdata = (XawXlibData *)data; - int mode = (long)args; + int mode = (int)(long)args; xdata->mode = mode; } @@ -1015,7 +1015,7 @@ DlShapeMode(Widget w, XtPointer args, XtPointer data, XEvent *event, Region region) { XawXlibData *xdata = (XawXlibData *)data; - int shape = (long)args; + int shape = (int)(long)args; xdata->shape = shape; } @@ -1026,7 +1026,7 @@ DlLineStyle(Widget w, XtPointer args, XtPointer data, XEvent *event, Region region) { XawXlibData *xdata = (XawXlibData *)data; - int line_style = (long)args; + int line_style = (int)(long)args; if (xdata->values.line_style != line_style) { @@ -1042,7 +1042,7 @@ DlCapStyle(Widget w, XtPointer args, XtPointer data, XEvent *event, Region region) { XawXlibData *xdata = (XawXlibData *)data; - int cap_style = (long)args; + int cap_style = (int)(long)args; if (xdata->values.cap_style != cap_style) { @@ -1058,7 +1058,7 @@ DlJoinStyle(Widget w, XtPointer args, XtPointer data, XEvent *event, Region region) { XawXlibData *xdata = (XawXlibData *)data; - int join_style = (long)args; + int join_style = (int)(long)args; if (xdata->values.join_style != join_style) { @@ -1074,7 +1074,7 @@ DlFillStyle(Widget w, XtPointer args, XtPointer data, XEvent *event, Region region) { XawXlibData *xdata = (XawXlibData *)data; - int fill_style = (long)args; + int fill_style = (int)(long)args; if (xdata->values.fill_style != fill_style) { @@ -1090,7 +1090,7 @@ DlFillRule(Widget w, XtPointer args, XtPointer data, XEvent *event, Region region) { XawXlibData *xdata = (XawXlibData *)data; - int fill_rule = (long)args; + int fill_rule = (int)(long)args; if (xdata->values.fill_rule != fill_rule) { @@ -1145,7 +1145,7 @@ DlFunction(Widget w, XtPointer args, XtPointer data, XEvent *event, Region region) { XawXlibData *xdata = (XawXlibData *)data; - int function = (long)args; + int function = (int)(long)args; if (function != xdata->values.function) { @@ -1180,17 +1180,17 @@ DlString(Widget w, XtPointer args, XtPointer data, Bool image) Window window; Position x, y; - x = X_ARG(string->pos[0]); - y = Y_ARG(string->pos[1]); + x = (Position)(X_ARG(string->pos[0])); + y = (Position)(Y_ARG(string->pos[1])); if (!XtIsWidget(w)) { Position xpad, ypad; - xpad = XtX(w) + XtBorderWidth(w); - ypad = XtY(w) + XtBorderWidth(w); - x += xpad; - y += ypad; + xpad = (Position)(XtX(w) + XtBorderWidth(w)); + ypad = (Position)(XtY(w) + XtBorderWidth(w)); + x = (Position)(x + xpad); + y = (Position)(y + ypad); display = XtDisplayOfObject(w); window = XtWindowOfObject(w); } @@ -1260,7 +1260,7 @@ DlSubwindowMode(Widget w, XtPointer args, XtPointer data, XEvent *event, Region region) { XawXlibData *xdata = (XawXlibData *)data; - int subwindow_mode = (long)args; + int subwindow_mode = (int)(long)args; if (xdata->values.subwindow_mode != subwindow_mode) { @@ -1339,24 +1339,24 @@ DlClipRectangles(Widget w, XtPointer args, XtPointer data, y2 = Y_ARG(pos[3]); rects[i].x = XawMin(x1, x2); rects[i].y = XawMin(y1, y2); - rects[i].width = XawMax(x1, x2) - rects[i].x; - rects[i].height = XawMax(y1, y2) - rects[i].y; + rects[i].width = (unsigned short)(XawMax(x1, x2) - rects[i].x); + rects[i].height = (unsigned short)(XawMax(y1, y2) - rects[i].y); } if (!XtIsWidget(w)) { Position xpad, ypad; - xpad = XtX(w) + XtBorderWidth(w); - ypad = XtY(w) + XtBorderWidth(w); + xpad = (Position)(XtX(w) + XtBorderWidth(w)); + ypad = (Position)(XtY(w) + XtBorderWidth(w)); for (i = 0; i < num_rects; i++) { - rects[i].x += xpad; - rects[i].y += ypad; + rects[i].x = (short)(rects[i].x + xpad); + rects[i].y = (short)(rects[i].y + ypad); } } - XSetClipRectangles(XtDisplayOfObject(w), xdata->gc, 0, 0, rects, num_rects, Unsorted); + XSetClipRectangles(XtDisplayOfObject(w), xdata->gc, 0, 0, rects, (int)num_rects, Unsorted); XawStackFree(rects, rects_buf); } @@ -1406,8 +1406,8 @@ DlCopy(Widget w, XtPointer args, XtPointer data, Bool plane) { Position xpad, ypad; - xpad = XtX(w) + XtBorderWidth(w); - ypad = XtY(w) + XtBorderWidth(w); + xpad = (Position)(XtX(w) + XtBorderWidth(w)); + ypad = (Position)(XtY(w) + XtBorderWidth(w)); src_x += xpad; src_y += ypad; dst_x += xpad; @@ -1417,12 +1417,12 @@ DlCopy(Widget w, XtPointer args, XtPointer data, Bool plane) if (plane) XCopyPlane(XtDisplayOfObject(w), XtWindowOfObject(w), copy->pixmap ? copy->pixmap->pixmap : XtWindowOfObject(w), - xdata->gc, src_x, src_y, width, height, dst_x, dst_y, - copy->plane ? copy->plane : 1); + xdata->gc, src_x, src_y, (unsigned)width, (unsigned)height, dst_x, dst_y, + (unsigned long)(copy->plane ? copy->plane : 1)); else XCopyArea(XtDisplayOfObject(w), copy->pixmap ? copy->pixmap->pixmap : XtWindowOfObject(w), - XtWindowOfObject(w), xdata->gc, src_x, src_y, width, height, dst_x, dst_y); + XtWindowOfObject(w), xdata->gc, src_x, src_y, (unsigned)width, (unsigned)height, dst_x, dst_y); } /* ARGSUSED */ @@ -1473,8 +1473,8 @@ DlImage(Widget w, XtPointer args, XtPointer data, XEvent *event, Region region) { Position xpad, ypad; - xpad = XtX(w) + XtBorderWidth(w); - ypad = XtY(w) + XtBorderWidth(w); + xpad = (Position)(XtX(w) + XtBorderWidth(w)); + ypad = (Position)(XtY(w) + XtBorderWidth(w)); xe += xpad; ye += ypad; xe += xpad; @@ -1496,11 +1496,11 @@ DlImage(Widget w, XtPointer args, XtPointer data, XEvent *event, Region region) XSetClipMask(display, xdata->gc, image->pixmap->mask); if (image->depth == 1) XCopyPlane(display, image->pixmap->pixmap, window, xdata->gc, - 0, 0, XawMin(width, xe - x), XawMin(height, ye - y), + 0, 0, (unsigned)XawMin(width, xe - x), (unsigned)XawMin(height, ye - y), x, y, 1L); else XCopyArea(display, image->pixmap->pixmap, window, xdata->gc, 0, 0, - XawMin(width, xe - x), XawMin(height, ye - y), x, y); + (unsigned)XawMin(width, xe - x), (unsigned)XawMin(height, ye - y), x, y); } XSetClipMask(display, xdata->gc, None); @@ -1631,14 +1631,14 @@ read_position(char *arg, XawDLPosition *pos) ++str; if (ch == '-') pos->high = True; - pos->pos = read_int(str, NULL); + pos->pos = (Position)read_int(str, NULL); } else if (isdigit(ch)) { - pos->pos = read_int(str, &str); + pos->pos = (Position)read_int(str, &str); ch = *str++; if (ch == '/') - pos->denom = read_int(str, NULL); + pos->denom = (Position)read_int(str, NULL); } } @@ -1668,7 +1668,7 @@ _Xaw_Xlib_ArgsInitProc(String proc_name, String *params, Cardinal *num_params, XawDLPosition *pos = (XawDLPosition *)XtCalloc(1, sizeof(XawDLPosition) * 4); for (i = 0; i < 4; i++) - read_position(params[i], &pos[i]); + read_position((char *)params[i], &pos[i]); retval = (void *)pos; } break; @@ -1679,8 +1679,8 @@ _Xaw_Xlib_ArgsInitProc(String proc_name, String *params, Cardinal *num_params, { XawDLPosition *pos = (XawDLPosition *)XtCalloc(1, sizeof(XawDLPosition) * 2); - read_position(params[0], &pos[0]); - read_position(params[1], &pos[1]); + read_position((char *)params[0], &pos[0]); + read_position((char *)params[1], &pos[1]); retval = (void *)pos; } break; @@ -1691,11 +1691,11 @@ _Xaw_Xlib_ArgsInitProc(String proc_name, String *params, Cardinal *num_params, { XawDLPositionPtr *pos = XtNew(XawDLPositionPtr); - pos->pos = (XawDLPosition *)XtCalloc(1, sizeof(XawDLPosition) * - *num_params); + pos->pos = (XawDLPosition *)XtCalloc(1, (Cardinal)(sizeof(XawDLPosition) * + (size_t)*num_params)); pos->num_pos = *num_params; for (i = 0; i < *num_params; i++) - read_position(params[i], &pos->pos[i]); + read_position((char *)params[i], &pos->pos[i]); retval = (void *)pos; } break; @@ -1705,11 +1705,11 @@ _Xaw_Xlib_ArgsInitProc(String proc_name, String *params, Cardinal *num_params, { XawDLPositionPtr *pos = XtNew(XawDLPositionPtr); - pos->pos = (XawDLPosition *)XtCalloc(1, sizeof(XawDLPosition) * - *num_params); + pos->pos = (XawDLPosition *)XtCalloc(1, (Cardinal)(sizeof(XawDLPosition) * + (size_t)*num_params)); pos->num_pos = *num_params; for (i = 0; i < *num_params; i++) - read_position(params[i], &pos->pos[i]); + read_position((char *)params[i], &pos->pos[i]); retval = (void *)pos; } break; @@ -1722,11 +1722,11 @@ _Xaw_Xlib_ArgsInitProc(String proc_name, String *params, Cardinal *num_params, args->angle1 = 0; args->angle2 = 360; for (i = 0; i < 4; i++) - read_position(params[i], &args->pos[i]); + read_position((char *)params[i], &args->pos[i]); if (*num_params > 4) - args->angle1 = read_int(params[4], NULL); + args->angle1 = (int)read_int((char *)params[4], NULL); if (*num_params > 5) - args->angle2 = read_int(params[5], NULL); + args->angle2 = (int)read_int((char *)params[5], NULL); args->angle1 *= 64; args->angle2 *= 64; retval = (void *)args; @@ -1749,7 +1749,7 @@ _Xaw_Xlib_ArgsInitProc(String proc_name, String *params, Cardinal *num_params, break; case LWIDTH: if (*num_params == 1) - retval = (void *)read_int(params[0], NULL); + retval = (void *)read_int((char *)params[0], NULL); break; case ARCMODE: if (*num_params == 1) @@ -1894,7 +1894,7 @@ _Xaw_Xlib_ArgsInitProc(String proc_name, String *params, Cardinal *num_params, break; case PLANEMASK: if (*num_params == 1) - retval = (void *)read_int(params[0], NULL); + retval = (void *)read_int((char *)params[0], NULL); break; case DSTRING: case PSTRING: @@ -1903,10 +1903,10 @@ _Xaw_Xlib_ArgsInitProc(String proc_name, String *params, Cardinal *num_params, XawDLStringArgs *string = (XawDLStringArgs *) XtCalloc(1, sizeof(XawDLStringArgs)); - read_position(params[0], &string->pos[0]); - read_position(params[1], &string->pos[1]); + read_position((char *)params[0], &string->pos[0]); + read_position((char *)params[1], &string->pos[1]); string->string = XtNewString(params[2]); - string->length = strlen(string->string); + string->length = (int)strlen(string->string); retval = string; } break; @@ -1922,8 +1922,8 @@ _Xaw_Xlib_ArgsInitProc(String proc_name, String *params, Cardinal *num_params, dashes = XtMalloc(*num_params + 1); for (i = 0; i < *num_params; i++) - dashes[i + 1] = read_int(params[i], NULL); - *dashes = *num_params; + dashes[i + 1] = (char)read_int((char *)params[i], NULL); + *dashes = (char)*num_params; retval = dashes; } break; @@ -1940,7 +1940,7 @@ _Xaw_Xlib_ArgsInitProc(String proc_name, String *params, Cardinal *num_params, if (*num_params == 1) { if (isdigit(params[0][0]) || params[0][0] == '+' || params[0][0] == '-') - retval = (void *)read_int(params[0], NULL); + retval = (void *)read_int((char *)params[0], NULL); else if (XmuCompareISOLatin1(params[0], "true") == 0 || XmuCompareISOLatin1(params[0], "on") == 0) retval = (void *)True; @@ -1983,9 +1983,9 @@ _Xaw_Xlib_ArgsInitProc(String proc_name, String *params, Cardinal *num_params, if (retval != XAWDL_CONVERT_ERROR) { for (i = 1; i < *num_params && i < 7; i++) - read_position(params[i], &args->pos[i - 1]); + read_position((char *)params[i], &args->pos[i - 1]); if (*num_params > 7) - args->plane = read_int(params[7], NULL); + args->plane = (int)read_int((char *)params[7], NULL); } } break; @@ -2008,7 +2008,7 @@ _Xaw_Xlib_ArgsInitProc(String proc_name, String *params, Cardinal *num_params, { args->depth = depth; for (i = 1; i < *num_params && i < 5; i++) - read_position(params[i], &args->pos[i - 1]); + read_position((char *)params[i], &args->pos[i - 1]); } } break; @@ -2144,7 +2144,7 @@ Bool XawDeclareDisplayListProc(XawDLClass *lc, String name, { ++lc->num_infos; lc->infos = (XawDLInfo **) - XtRealloc((char *)lc->infos, sizeof(XawDLInfo*) * lc->num_infos); + XtRealloc((char *)lc->infos, (Cardinal)(sizeof(XawDLInfo*) * (size_t)lc->num_infos)); } lc->infos[lc->num_infos - 1] = info; @@ -2218,7 +2218,7 @@ XawCreateDisplayListClass(String name, { ++num_classes; classes = (XawDLClass **)XtRealloc((char *)classes, - sizeof(XawDLClass) * num_classes); + (Cardinal)(sizeof(XawDLClass) * (size_t)num_classes)); } classes[num_classes - 1] = lc; |