diff options
author | Vincent Sanders <vince@kyllikki.org> | 2019-05-06 10:31:51 +0100 |
---|---|---|
committer | Vincent Sanders <vince@kyllikki.org> | 2019-05-06 10:32:16 +0100 |
commit | dd96a69573e7a45b5ac4a2b172319d900c89f53b (patch) | |
tree | f69ac6b3bc4fb4499ee11de261adb0be24c29a03 /frontends/amiga/corewindow.c | |
parent | 10930fcbaf985bdc414e9a7951dc8a0e3e9d53f6 (diff) | |
download | netsurf-dd96a69573e7a45b5ac4a2b172319d900c89f53b.tar.gz netsurf-dd96a69573e7a45b5ac4a2b172319d900c89f53b.tar.bz2 |
fix several amiga frontend warnings
Diffstat (limited to 'frontends/amiga/corewindow.c')
-rw-r--r-- | frontends/amiga/corewindow.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/frontends/amiga/corewindow.c b/frontends/amiga/corewindow.c index 42ee866ea..627d3286e 100644 --- a/frontends/amiga/corewindow.c +++ b/frontends/amiga/corewindow.c @@ -68,17 +68,19 @@ #include "amiga/utf8.h" static void -ami_cw_scroller_top(struct ami_corewindow *ami_cw, ULONG *restrict x, ULONG *restrict y) +ami_cw_scroller_top(struct ami_corewindow *ami_cw, + ULONG *restrict x, + ULONG *restrict y) { ULONG xs = 0; ULONG ys = 0; if(ami_cw->scroll_x_visible == true) { - GetAttr(SCROLLER_Top, ami_cw->objects[GID_CW_HSCROLL], (ULONG *)&xs); + GetAttr(SCROLLER_Top, ami_cw->objects[GID_CW_HSCROLL], &xs); } if(ami_cw->scroll_y_visible == true) { - GetAttr(SCROLLER_Top, ami_cw->objects[GID_CW_VSCROLL], (ULONG *)&ys); + GetAttr(SCROLLER_Top, ami_cw->objects[GID_CW_VSCROLL], &ys); } *x = xs; @@ -243,15 +245,15 @@ ami_cw_redraw_rect(struct ami_corewindow *ami_cw, struct rect *r) ami_cw_scroller_top(ami_cw, &pos_x, &pos_y); - if(x - pos_x + width > bbox->Width) width = bbox->Width - (x - pos_x); - if(y - pos_y + height > bbox->Height) height = bbox->Height - (y - pos_y); + if(x - (LONG)pos_x + width > bbox->Width) width = bbox->Width - (x - pos_x); + if(y - (LONG)pos_y + height > bbox->Height) height = bbox->Height - (y - pos_y); - if(x < pos_x) { + if(x < (LONG)pos_x) { width -= pos_x - x; x = pos_x; } - if(y < pos_y) { + if(y < (LONG)pos_y) { height -= pos_y - y; y = pos_y; } @@ -880,9 +882,9 @@ ami_cw_scroll_visible(struct core_window *cw, const struct rect *r) win_y1 = win_y0 + win_h; if(r->y1 > win_y1) scrollsety = r->y1 - win_h; - if(r->y0 < win_y0) scrollsety = r->y0; + if(r->y0 < (LONG)win_y0) scrollsety = r->y0; if(r->x1 > win_x1) scrollsetx = r->x1 - win_w; - if(r->x0 < win_x0) scrollsetx = r->x0; + if(r->x0 < (LONG)win_x0) scrollsetx = r->x0; if(ami_cw->scroll_y_visible == true) { RefreshSetGadgetAttrs((APTR)ami_cw->objects[GID_CW_VSCROLL], ami_cw->win, NULL, |