summaryrefslogtreecommitdiff
path: root/frontends/amiga
diff options
context:
space:
mode:
Diffstat (limited to 'frontends/amiga')
-rw-r--r--frontends/amiga/Makefile2
-rw-r--r--frontends/amiga/bitmap.c11
-rw-r--r--frontends/amiga/corewindow.c20
-rw-r--r--frontends/amiga/font_bullet.c4
-rw-r--r--frontends/amiga/gui.c1
-rw-r--r--frontends/amiga/history_local.h4
6 files changed, 25 insertions, 17 deletions
diff --git a/frontends/amiga/Makefile b/frontends/amiga/Makefile
index 421be0ece..77d2b45f4 100644
--- a/frontends/amiga/Makefile
+++ b/frontends/amiga/Makefile
@@ -31,6 +31,8 @@ ifeq ($(SUBTARGET),os3)
LDFLAGS += -lamiga -lm
endif
+COMMON_WARNFLAGS += -Wno-cast-align
+
EXETARGET := NetSurf
# The filter and target for split messages
diff --git a/frontends/amiga/bitmap.c b/frontends/amiga/bitmap.c
index 32b9b1290..8341d41c8 100644
--- a/frontends/amiga/bitmap.c
+++ b/frontends/amiga/bitmap.c
@@ -531,10 +531,13 @@ static inline struct BitMap *ami_bitmap_get_generic(struct bitmap *bitmap,
}
ami_bitmap_rgba_to_argb(bitmap);
- if(bitmap->drawhandle = ObtainDrawHandle(NULL,
- &rp, scrn->ViewPort.ColorMap,
- GGFX_DitherMode, dithermode,
- TAG_DONE)) {
+ bitmap->drawhandle = ObtainDrawHandle(
+ NULL,
+ &rp,
+ scrn->ViewPort.ColorMap,
+ GGFX_DitherMode, dithermode,
+ TAG_DONE);
+ if(bitmap->drawhandle) {
APTR ddh = CreateDirectDrawHandle(bitmap->drawhandle,
bitmap->width, bitmap->height,
width, height, NULL);
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,
diff --git a/frontends/amiga/font_bullet.c b/frontends/amiga/font_bullet.c
index 0b414c24e..6283a1fbd 100644
--- a/frontends/amiga/font_bullet.c
+++ b/frontends/amiga/font_bullet.c
@@ -169,7 +169,9 @@ static nserror amiga_nsfont_width(const plot_font_style_t *fstyle,
{
*width = ami_font_unicode_width(string, length, fstyle, 0, 0, false);
- if(*width <= 0) *width == length; // fudge
+ if(*width <= 0) {
+ *width = length; /* fudge */
+ }
return NSERROR_OK;
}
diff --git a/frontends/amiga/gui.c b/frontends/amiga/gui.c
index 2c84d4d7a..eabf8bbcd 100644
--- a/frontends/amiga/gui.c
+++ b/frontends/amiga/gui.c
@@ -783,7 +783,6 @@ static void ami_amiupdate(void)
static nsurl *gui_get_resource_url(const char *path)
{
char buf[1024];
- char path2[1024];
nsurl *url = NULL;
if(ami_locate_resource(buf, path) == false)
diff --git a/frontends/amiga/history_local.h b/frontends/amiga/history_local.h
index 72ba7fa8b..0a265d821 100644
--- a/frontends/amiga/history_local.h
+++ b/frontends/amiga/history_local.h
@@ -16,8 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef AMIGA_HISTORY_GLOBAL_H
-#define AMIGA_HISTORY_GLOBAL_H
+#ifndef AMIGA_HISTORY_LOCAL_H
+#define AMIGA_HISTORY_LOCAL_H
struct gui_window;
struct ami_history_local_window;