Gitweb links:
...log
http://git.netsurf-browser.org/netsurf.git/shortlog/dd96a69573e7a45b5ac4a2b172319d900c89f53b
...commit
http://git.netsurf-browser.org/netsurf.git/commit/dd96a69573e7a45b5ac4a2b172319d900c89f53b
...tree
http://git.netsurf-browser.org/netsurf.git/tree/dd96a69573e7a45b5ac4a2b172319d900c89f53b
The branch, master has been updated
via dd96a69573e7a45b5ac4a2b172319d900c89f53b (commit)
from 10930fcbaf985bdc414e9a7951dc8a0e3e9d53f6 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff
http://git.netsurf-browser.org/netsurf.git/commit/?id=dd96a69573e7a45b5ac4a2b172319d900c89f53b
commit dd96a69573e7a45b5ac4a2b172319d900c89f53b
Author: Vincent Sanders <[email protected]>
Commit: Vincent Sanders <[email protected]>
fix several amiga frontend warnings
diff --git a/frontends/amiga/Makefile b/frontends/amiga/Makefile
index 421be0e..77d2b45 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 32b9b12..8341d41 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 42ee866..627d328 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 0b414c2..6283a1f 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 2c84d4d..eabf8bb 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 72ba7fa..0a265d8 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;
-----------------------------------------------------------------------
Summary of changes:
frontends/amiga/Makefile | 2 ++
frontends/amiga/bitmap.c | 11 +++++++----
frontends/amiga/corewindow.c | 20 +++++++++++---------
frontends/amiga/font_bullet.c | 4 +++-
frontends/amiga/gui.c | 1 -
frontends/amiga/history_local.h | 4 ++--
6 files changed, 25 insertions(+), 17 deletions(-)
diff --git a/frontends/amiga/Makefile b/frontends/amiga/Makefile
index 421be0e..77d2b45 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 32b9b12..8341d41 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 42ee866..627d328 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 0b414c2..6283a1f 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 2c84d4d..eabf8bb 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 72ba7fa..0a265d8 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;
--
NetSurf Browser
_______________________________________________
netsurf-commits mailing list
[email protected]
http://listmaster.pepperfish.net/cgi-bin/mailman/listinfo/netsurf-commits-netsurf-browser.org