Gitweb links:
...log
http://git.netsurf-browser.org/netsurf.git/shortlog/ba5bae389b9bfed07e94f...
...commit
http://git.netsurf-browser.org/netsurf.git/commit/ba5bae389b9bfed07e94fc8...
...tree
http://git.netsurf-browser.org/netsurf.git/tree/ba5bae389b9bfed07e94fc8ec...
The branch, master has been updated
via ba5bae389b9bfed07e94fc8ec3191f4dcfa714f0 (commit)
via 65adc1712123f81847a85ce0374acc5a741368ec (commit)
via 975a1d3c5db0dc11a4f5ada68d5d424850858161 (commit)
via c1a32d7c6e87f3d81fa095e7e7fe11fa8d88fe5f (commit)
via b301a111405f0f5e5df7b6204e6c2bf4bee2fce5 (commit)
via 0f6859864911270c65caea459637d35cf1bba14a (commit)
via c2f9a399664faa1248eb5a043e697a7d94558c0c (commit)
via f991abc53cb5eeb874542cf8a40f4dbecef32296 (commit)
via 268cda0f560ffdacf6186b923f5540ed5da52ef9 (commit)
via d907ec9b0614e5c178720429dee7a8ef96df6aad (commit)
via 412df342987f754958a9756817ccacaebe07f764 (commit)
from 99c47eb99be4309e996f4cb038916260fd2bcb44 (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=ba5bae389b9bfed07e9...
commit ba5bae389b9bfed07e94fc8ec3191f4dcfa714f0
Author: Chris Young <chris(a)unsatisfactorysoftware.co.uk>
Commit: Chris Young <chris(a)unsatisfactorysoftware.co.uk>
Fix some cppcheck variableHidingTypedef warnings
diff --git a/amiga/dt_anim.c b/amiga/dt_anim.c
index d6e5c10..4722d2d 100644
--- a/amiga/dt_anim.c
+++ b/amiga/dt_anim.c
@@ -337,20 +337,20 @@ APTR ami_colormap_to_clut(struct ColorMap *cmap)
{
int i;
UBYTE *clut = AllocVecTags(256 * 4, AVT_ClearWithValue, 0, TAG_DONE); /* NB: Was not
MEMF_PRIVATE */
- ULONG colour[256 * 4];
+ ULONG colr[256 * 4];
if(!clut) return NULL;
/* Get the palette from the ColorMap */
- GetRGB32(cmap, 0, 256, (ULONG *)&colour);
+ GetRGB32(cmap, 0, 256, (ULONG *)&colr);
/* convert it to a table of ARGB values */
for(i = 0; i < 1024; i += 4)
{
clut[i] = (0xff << 24) |
- ((colour[i] & 0xff000000) >> 8) |
- ((colour[i + 1] & 0xff000000) >> 16) |
- ((colour[i + 2] & 0xff000000) >> 24);
+ ((colr[i] & 0xff000000) >> 8) |
+ ((colr[i + 1] & 0xff000000) >> 16) |
+ ((colr[i + 2] & 0xff000000) >> 24);
}
return clut;
diff --git a/amiga/iff_dr2d.c b/amiga/iff_dr2d.c
index 6cced5b..5709d41 100644
--- a/amiga/iff_dr2d.c
+++ b/amiga/iff_dr2d.c
@@ -31,7 +31,7 @@ ULONG numcols;
ULONG findcolour(ULONG newcol)
{
ULONG i;
- ULONG colour = 0xFFFFFFFF;
+ ULONG colr = 0xFFFFFFFF;
UBYTE red,grn,blu;
red = svgtiny_RED(newcol);
@@ -41,20 +41,20 @@ ULONG findcolour(ULONG newcol)
for(i=0;i<numcols;i++)
{
if((cm[i].red == red) && (cm[i].green == grn) && (cm[i].blue == blu))
- colour = i;
+ colr = i;
}
- return colour;
+ return colr;
}
void addcolour(ULONG newcol)
{
- ULONG colour;
+ ULONG colr;
UBYTE red,grn,blu;
- colour = findcolour(newcol);
+ colr = findcolour(newcol);
- if(colour == 0xFFFFFFFF)
+ if(colr == 0xFFFFFFFF)
{
cm[numcols].red = svgtiny_RED(newcol);
cm[numcols].green = svgtiny_GREEN(newcol);
diff --git a/amiga/plotters.c b/amiga/plotters.c
index 7b8ad12..0893c55 100755
--- a/amiga/plotters.c
+++ b/amiga/plotters.c
@@ -239,16 +239,16 @@ void ami_clearclipreg(struct gui_globals *gg)
gg->rect.MaxY = scrn->Height-1;
}
-static ULONG ami_plot_obtain_pen(struct MinList *shared_pens, ULONG colour)
+static ULONG ami_plot_obtain_pen(struct MinList *shared_pens, ULONG colr)
{
struct ami_plot_pen *node;
ULONG pen = ObtainBestPenA(scrn->ViewPort.ColorMap,
- (colour & 0x000000ff) << 24,
- (colour & 0x0000ff00) << 16,
- (colour & 0x00ff0000) << 8,
+ (colr & 0x000000ff) << 24,
+ (colr & 0x0000ff00) << 16,
+ (colr & 0x00ff0000) << 8,
NULL);
- if(pen == -1) LOG(("WARNING: Cannot allocate pen for ABGR:%lx", colour));
+ if(pen == -1) LOG(("WARNING: Cannot allocate pen for ABGR:%lx", colr));
if(shared_pens != NULL) {
if(node = (struct ami_plot_pen *)AllocVecTagList(sizeof(struct ami_plot_pen), NULL)) {
@@ -278,26 +278,26 @@ void ami_plot_release_pens(struct MinList *shared_pens)
}while(node = nnode);
}
-static void ami_plot_setapen(ULONG colour)
+static void ami_plot_setapen(ULONG colr)
{
if(palette_mapped == false) {
SetRPAttrs(glob->rp, RPTAG_APenColor,
- ns_color_to_nscss(colour),
+ ns_color_to_nscss(colr),
TAG_DONE);
} else {
- ULONG pen = ami_plot_obtain_pen(glob->shared_pens, colour);
+ ULONG pen = ami_plot_obtain_pen(glob->shared_pens, colr);
if(pen != -1) SetAPen(glob->rp, pen);
}
}
-static void ami_plot_setopen(ULONG colour)
+static void ami_plot_setopen(ULONG colr)
{
if(palette_mapped == false) {
SetRPAttrs(glob->rp, RPTAG_OPenColor,
- ns_color_to_nscss(colour),
+ ns_color_to_nscss(colr),
TAG_DONE);
} else {
- ULONG pen = ami_plot_obtain_pen(glob->shared_pens, colour);
+ ULONG pen = ami_plot_obtain_pen(glob->shared_pens, colr);
if(pen != -1) SetOPen(glob->rp, pen);
}
}
commitdiff
http://git.netsurf-browser.org/netsurf.git/commit/?id=65adc1712123f81847a...
commit 65adc1712123f81847a85ce0374acc5a741368ec
Author: Chris Young <chris(a)unsatisfactorysoftware.co.uk>
Commit: Chris Young <chris(a)unsatisfactorysoftware.co.uk>
Fix a bunch of cppcheck unused/unreadVariable warnings
diff --git a/amiga/clipboard.c b/amiga/clipboard.c
index 6768dde..0f3a33d 100644
--- a/amiga/clipboard.c
+++ b/amiga/clipboard.c
@@ -185,7 +185,6 @@ char *ami_clipboard_cat_collection(struct CollectionItem *ci, LONG
codeset, size
void gui_get_clipboard(char **buffer, size_t *length)
{
- struct ContextNode *cn;
struct CollectionItem *ci = NULL;
struct StoredProperty *sp = NULL;
ULONG rlen=0,error;
diff --git a/amiga/download.c b/amiga/download.c
index 74cb51f..7ce47a3 100644
--- a/amiga/download.c
+++ b/amiga/download.c
@@ -89,7 +89,6 @@ static struct gui_download_window
*gui_download_window_create(download_context *
struct gui_window *gui)
{
const char *url = download_context_get_url(ctx);
- const char *mime_type = download_context_get_mime_type(ctx);
unsigned long total_size = download_context_get_total_length(ctx);
struct gui_download_window *dw;
char *dl_filename = ami_utf8_easy(download_context_get_filename(ctx));
diff --git a/amiga/drag.c b/amiga/drag.c
index f8944d3..09df0d0 100644
--- a/amiga/drag.c
+++ b/amiga/drag.c
@@ -98,9 +98,8 @@ void gui_drag_save_selection(struct gui_window *g, const char
*selection)
void ami_drag_save(struct Window *win)
{
- ULONG which = WBO_NONE,type;
- char path[1025],dpath[1025];
- const char *source_data;
+ ULONG which = WBO_NONE, type;
+ char path[1025], dpath[1025];
ULONG source_size;
ami_drag_icon_close(NULL);
@@ -195,10 +194,8 @@ void ami_drag_save(struct Window *win)
void ami_drag_icon_show(struct Window *win, const char *type)
{
struct DiskObject *dobj = NULL;
- ULONG *icondata1;
ULONG width, height;
- long format = 0;
- int err = 0;
+ int err;
int deftype = WBPROJECT;
drag_in_progress = TRUE;
diff --git a/amiga/dt_anim.c b/amiga/dt_anim.c
index f2b0f76..d6e5c10 100644
--- a/amiga/dt_anim.c
+++ b/amiga/dt_anim.c
@@ -92,7 +92,6 @@ static const content_handler amiga_dt_anim_content_handler = {
nserror amiga_dt_anim_init(void)
{
- char dt_mime[50];
struct DataType *dt, *prevdt = NULL;
lwc_string *type;
lwc_error lerror;
@@ -161,14 +160,11 @@ bool amiga_dt_anim_convert(struct content *c)
amiga_dt_anim_content *plugin = (amiga_dt_anim_content *) c;
union content_msg_data msg_data;
int width, height;
- char title[100];
const uint8 *data;
UBYTE *bm_buffer;
ULONG size;
- Object *dto;
struct BitMapHeader *bmh;
unsigned int bm_flags = BITMAP_NEW | BITMAP_OPAQUE;
- int bm_format = PBPAFMT_RGBA;
struct adtFrame adt_frame;
APTR clut;
diff --git a/amiga/dt_picture.c b/amiga/dt_picture.c
index 211d221..1d30928 100644
--- a/amiga/dt_picture.c
+++ b/amiga/dt_picture.c
@@ -62,7 +62,6 @@ struct amiga_dt_picture_content {
nserror amiga_dt_picture_init(void)
{
- char dt_mime[50];
struct DataType *dt, *prevdt = NULL;
lwc_string *type;
lwc_error lerror;
@@ -214,14 +213,10 @@ bool amiga_dt_picture_convert(struct content *c)
{
LOG(("amiga_dt_picture_convert"));
- union content_msg_data msg_data;
int width, height;
char *title;
- UBYTE *bm_buffer;
Object *dto;
struct BitMapHeader *bmh;
- unsigned int bm_flags = BITMAP_NEW;
- int bm_format = PBPAFMT_RGBA;
char *filetype;
if(dto = amiga_dt_picture_newdtobject((struct amiga_dt_picture_content *)c))
diff --git a/amiga/dt_sound.c b/amiga/dt_sound.c
index 3f82169..a1daf03 100644
--- a/amiga/dt_sound.c
+++ b/amiga/dt_sound.c
@@ -77,7 +77,6 @@ void amiga_dt_sound_play(Object *dto)
nserror amiga_dt_sound_init(void)
{
- char dt_mime[50];
struct DataType *dt, *prevdt = NULL;
lwc_string *type;
lwc_error lerror;
@@ -146,12 +145,9 @@ bool amiga_dt_sound_convert(struct content *c)
LOG(("amiga_dt_sound_convert"));
amiga_dt_sound_content *plugin = (amiga_dt_sound_content *) c;
- union content_msg_data msg_data;
int width = 50, height = 50;
- char title[100];
const uint8 *data;
ULONG size;
- Object *dto;
data = (uint8 *)content__get_source_data(c, &size);
diff --git a/amiga/file.c b/amiga/file.c
index 91d3755..5d16ceb 100644
--- a/amiga/file.c
+++ b/amiga/file.c
@@ -49,8 +49,6 @@ static struct Hook aslhookfunc;
static const ULONG ami_file_asl_mime_hook(struct Hook *mh,
struct FileRequester *fr, struct AnchorPathOld *ap)
{
- BPTR file = 0;
- char buffer[10];
char fname[1024];
BOOL ret = FALSE;
char *mt = NULL;
diff --git a/amiga/filetype.c b/amiga/filetype.c
index 0cb4ac4..bcb6b7e 100644
--- a/amiga/filetype.c
+++ b/amiga/filetype.c
@@ -173,9 +173,7 @@ const char *ami_content_type_to_file_type(content_type type)
nserror ami_mime_init(const char *mimefile)
{
- lwc_string *type;
lwc_error lerror;
- nserror error;
char buffer[256];
BPTR fh = 0;
struct RDArgs *rargs = NULL;
diff --git a/amiga/font.c b/amiga/font.c
index df4a188..148d860 100755
--- a/amiga/font.c
+++ b/amiga/font.c
@@ -204,8 +204,6 @@ bool nsfont_position_in_string(const plot_font_style_t *fstyle,
FIXED kern = 0;
struct OutlineFont *ofont, *ufont = NULL;
uint32 tx=0,i=0;
- size_t len, utf8len = 0;
- uint8 *utf8;
int utf8_pos = 0;
uint32 co = 0;
int utf16charlen;
diff --git a/amiga/history_local.c b/amiga/history_local.c
index 1f710b2..4849c65 100755
--- a/amiga/history_local.c
+++ b/amiga/history_local.c
@@ -74,7 +74,6 @@ static void ami_history_scroller_hook(struct Hook *hook,Object
*object,struct In
void ami_history_open(struct browser_window *bw, struct history *history)
{
int width, height;
- struct IBox *bbox;
assert(history);
@@ -239,7 +238,6 @@ BOOL ami_history_event(struct history_window *hw)
/* return TRUE if window destroyed */
ULONG class,result,relevent = 0;
uint16 code;
- struct MenuItem *item;
const char *url;
struct IBox *bbox;
ULONG xs, ys;
diff --git a/amiga/icon.c b/amiga/icon.c
index c5bc6ae..a6b61a2 100644
--- a/amiga/icon.c
+++ b/amiga/icon.c
@@ -139,7 +139,7 @@ bool amiga_icon_convert(struct content *c)
ULONG size;
int width = 0, height = 0;
long format = 0;
- int err = 0;
+ int err;
uint8 r, g, b, a;
ULONG offset;
const char *url;
@@ -365,7 +365,7 @@ void amiga_icon_superimpose_favicon_internal(struct hlcache_handle
*icon, struct
ULONG *icondata1, *icondata2;
ULONG width, height;
long format = 0;
- int err = 0;
+ int err;
if(dobj == NULL) return;
@@ -420,11 +420,10 @@ void amiga_icon_superimpose_favicon_internal(struct hlcache_handle
*icon, struct
void amiga_icon_superimpose_favicon(char *path, struct hlcache_handle *icon, char *type)
{
struct DiskObject *dobj = NULL;
- struct BitMap *bm = NULL;
ULONG *icondata1, *icondata2;
ULONG width, height;
long format = 0;
- int err = 0;
+ int err;
ULONG trans1, pals1;
ULONG trans2, pals2;
struct ColorRegister *pal1;
diff --git a/amiga/iff_dr2d.c b/amiga/iff_dr2d.c
index 0638b94..6cced5b 100644
--- a/amiga/iff_dr2d.c
+++ b/amiga/iff_dr2d.c
@@ -49,7 +49,6 @@ ULONG findcolour(ULONG newcol)
void addcolour(ULONG newcol)
{
- int i;
ULONG colour;
UBYTE red,grn,blu;
@@ -342,7 +341,6 @@ int main(int argc, char **argv)
{
BPTR fh = 0;
char *buffer;
- size_t n;
struct IFFHandle *iffh = NULL;
int64 size;
LONG rarray[] = {0,0};
diff --git a/amiga/launch.c b/amiga/launch.c
index ebd8229..0d25bcf 100755
--- a/amiga/launch.c
+++ b/amiga/launch.c
@@ -105,8 +105,6 @@ BOOL ami_openurl_check_list(struct MinList *list, const char *url)
void ami_openurl_open(void)
{
- struct ami_protocol *ami_p;
-
if(nsoption_bool(use_openurl_lib)) {
if(OpenURLBase = OpenLibrary("openurl.library",0))
IOpenURL = (struct OpenURLIFace *)GetInterface(OpenURLBase,"main",1,NULL);
diff --git a/amiga/menu.c b/amiga/menu.c
index 13b9c9c..234a958 100644
--- a/amiga/menu.c
+++ b/amiga/menu.c
@@ -456,8 +456,6 @@ static struct gui_window_2 *ami_menu_layout(struct gui_window_2
*gwin)
struct NewMenu *ami_create_menu(struct gui_window_2 *gwin)
{
- int i;
-
gwin->menu = AllocVecTags(sizeof(struct NewMenu) * (AMI_MENU_AREXX_MAX + 1),
AVT_ClearWithValue, 0, TAG_DONE);
ami_init_menulabs(gwin);
@@ -1029,7 +1027,6 @@ static void ami_menu_item_hotlist_show(struct Hook *hook, APTR
window, struct In
static void ami_menu_item_hotlist_entries(struct Hook *hook, APTR window, struct
IntuiMessage *msg)
{
nsurl *url = hook->h_Data;
- nserror error;
struct gui_window_2 *gwin;
GetAttr(WINDOW_UserData, (Object *)window, (ULONG *)&gwin);
diff --git a/amiga/misc.c b/amiga/misc.c
index ac9d245..c25c5d5 100755
--- a/amiga/misc.c
+++ b/amiga/misc.c
@@ -108,7 +108,7 @@ void die(const char *error)
char *url_to_path(const char *url)
{
- char *tmps, *unesc, *slash, *colon, *url2;
+ char *unesc, *slash, *colon, *url2;
if (strncmp(url, "file://", SLEN("file://")) != 0)
return NULL;
diff --git a/amiga/plotters.c b/amiga/plotters.c
index 05db67f..7b8ad12 100755
--- a/amiga/plotters.c
+++ b/amiga/plotters.c
@@ -945,7 +945,6 @@ bool ami_path(const float *p, unsigned int n, colour fill, float
width,
colour c, const float transform[6])
{
unsigned int i;
- struct bez_point *old_p;
struct bez_point start_p, cur_p, p_a, p_b, p_c, p_r;
#ifdef AMI_PLOTTER_DEBUG
diff --git a/amiga/plugin_hack.c b/amiga/plugin_hack.c
index f78a67e..9bfd7a3 100644
--- a/amiga/plugin_hack.c
+++ b/amiga/plugin_hack.c
@@ -132,7 +132,7 @@ void amiga_plugin_hack_destroy(struct content *c)
{
amiga_plugin_hack_content *plugin = (amiga_plugin_hack_content *) c;
- LOG(("amiga_plugin_hack_destroy"));
+ LOG(("amiga_plugin_hack_destroy %p", plugin));
return;
}
diff --git a/amiga/stringview/stringview.c b/amiga/stringview/stringview.c
index 5aea939..9aa110a 100755
--- a/amiga/stringview/stringview.c
+++ b/amiga/stringview/stringview.c
@@ -859,7 +859,6 @@ Class *MakeStringClass( void )
void FreeStringClass(Class *cl)
{
- struct Library *libbase;
URLHistory_Free();
FreeClass(cl);
}
commitdiff
http://git.netsurf-browser.org/netsurf.git/commit/?id=975a1d3c5db0dc11a4f...
commit 975a1d3c5db0dc11a4f5ada68d5d424850858161
Author: Chris Young <chris(a)unsatisfactorysoftware.co.uk>
Commit: Chris Young <chris(a)unsatisfactorysoftware.co.uk>
Fix cppcheck variableScope warnings
diff --git a/amiga/arexx.c b/amiga/arexx.c
index 7fc58ef..3bac0c2 100644
--- a/amiga/arexx.c
+++ b/amiga/arexx.c
@@ -196,11 +196,12 @@ int ami_find_tab_bw(struct gui_window_2 *gwin, struct browser_window
*bw)
struct browser_window *ami_find_tab(int window, int tab)
{
- int windows = 0;
struct nsObject *node, *nnode;
if(!IsMinListEmpty(window_list))
{
+ int windows = 0;
+
node = (struct nsObject *)GetHead((struct List *)window_list);
do
@@ -568,7 +569,6 @@ STATIC VOID rx_windows(struct ARexxCmd *cmd, struct RexxMsg *rxm
__attribute__((
STATIC VOID rx_active(struct ARexxCmd *cmd, struct RexxMsg *rxm __attribute__((unused)))
{
- int windows = 0;
int window = 0, tab = 0;
struct browser_window *bw = curbw;
struct nsObject *node, *nnode;
@@ -578,6 +578,8 @@ STATIC VOID rx_active(struct ARexxCmd *cmd, struct RexxMsg *rxm
__attribute__((u
if(!IsMinListEmpty(window_list))
{
+ int windows = 0;
+
node = (struct nsObject *)GetHead((struct List *)window_list);
do
diff --git a/amiga/download.c b/amiga/download.c
index fb5c109..74cb51f 100644
--- a/amiga/download.c
+++ b/amiga/download.c
@@ -347,7 +347,6 @@ void ami_free_download_list(struct List *dllist)
void
gui_window_save_link(struct gui_window *g, const char *url, const char *title)
{
- BPTR fh = 0;
char fname[1024];
STRPTR openurlstring,linkname;
struct DiskObject *dobj = NULL;
@@ -369,6 +368,8 @@ gui_window_save_link(struct gui_window *g, const char *url, const char
*title)
if(ami_download_check_overwrite(fname, g->shared->win, 0))
{
+ BPTR fh;
+
if(fh = FOpen(fname,MODE_NEWFILE,0))
{
/* TODO: Should be URLOpen on OS4.1 */
@@ -401,8 +402,6 @@ BOOL ami_download_check_overwrite(const char *file, struct Window
*win, ULONG si
/* Return TRUE if file can be (over-)written */
int32 res = 0;
BPTR lock = 0;
- BPTR fh = 0;
- int64 oldsize = 0;
char *overwritetext;
if(nsoption_bool(ask_overwrite) == false) return TRUE;
@@ -412,6 +411,9 @@ BOOL ami_download_check_overwrite(const char *file, struct Window
*win, ULONG si
if(lock)
{
if(size) {
+ BPTR fh;
+ int64 oldsize = 0;
+
if(fh = OpenFromLock(lock)) {
oldsize = GetFileSize(fh);
Close(fh);
commitdiff
http://git.netsurf-browser.org/netsurf.git/commit/?id=c1a32d7c6e87f3d81fa...
commit c1a32d7c6e87f3d81fa095e7e7fe11fa8d88fe5f
Author: Chris Young <chris(a)unsatisfactorysoftware.co.uk>
Commit: Chris Young <chris(a)unsatisfactorysoftware.co.uk>
Fix some cppcheck unused/unreadVariables
diff --git a/amiga/arexx.c b/amiga/arexx.c
index 240aafe..7fc58ef 100644
--- a/amiga/arexx.c
+++ b/amiga/arexx.c
@@ -196,9 +196,8 @@ int ami_find_tab_bw(struct gui_window_2 *gwin, struct browser_window
*bw)
struct browser_window *ami_find_tab(int window, int tab)
{
- int windows = 0, tabs = 0;
+ int windows = 0;
struct nsObject *node, *nnode;
- struct gui_window_2 *gwin;
if(!IsMinListEmpty(window_list))
{
@@ -569,7 +568,7 @@ STATIC VOID rx_windows(struct ARexxCmd *cmd, struct RexxMsg *rxm
__attribute__((
STATIC VOID rx_active(struct ARexxCmd *cmd, struct RexxMsg *rxm __attribute__((unused)))
{
- int windows = 0, tabs = 0;
+ int windows = 0;
int window = 0, tab = 0;
struct browser_window *bw = curbw;
struct nsObject *node, *nnode;
commitdiff
http://git.netsurf-browser.org/netsurf.git/commit/?id=b301a111405f0f5e5df...
commit b301a111405f0f5e5df7b6204e6c2bf4bee2fce5
Author: Chris Young <chris(a)unsatisfactorysoftware.co.uk>
Commit: Chris Young <chris(a)unsatisfactorysoftware.co.uk>
Fix cppcheck arrayIndexOutOfBounds
diff --git a/amiga/gui_options.c b/amiga/gui_options.c
index 400ced8..877ff09 100755
--- a/amiga/gui_options.c
+++ b/amiga/gui_options.c
@@ -198,7 +198,7 @@ enum
#define OPTS_MAX_TABS 10
#define OPTS_MAX_SCREEN 4
#define OPTS_MAX_PROXY 5
-#define OPTS_MAX_NATIVEBM 3
+#define OPTS_MAX_NATIVEBM 4
#define OPTS_MAX_DITHER 4
struct ami_gui_opts_window {
commitdiff
http://git.netsurf-browser.org/netsurf.git/commit/?id=0f6859864911270c65c...
commit 0f6859864911270c65caea459637d35cf1bba14a
Author: Chris Young <chris(a)unsatisfactorysoftware.co.uk>
Commit: Chris Young <chris(a)unsatisfactorysoftware.co.uk>
Fix cppcheck syntaxError
diff --git a/amiga/context_menu.c b/amiga/context_menu.c
index dde283b..cb350de 100644
--- a/amiga/context_menu.c
+++ b/amiga/context_menu.c
@@ -324,7 +324,7 @@ void ami_context_menu_add_submenu(Object *ctxmenuobj, ULONG cmsub,
void *userdat
PMIA_UserData, userdata,
PMIA_Disabled, (content_get_type(userdata) != CONTENT_HTML),
TAG_DONE),
- TAG_DONE),
+ PMEND,
TAG_DONE),
~0);
break;
commitdiff
http://git.netsurf-browser.org/netsurf.git/commit/?id=c2f9a399664faa1248e...
commit c2f9a399664faa1248eb5a043e697a7d94558c0c
Author: Chris Young <chris(a)unsatisfactorysoftware.co.uk>
Commit: Chris Young <chris(a)unsatisfactorysoftware.co.uk>
Fix some cppcheck variableScope warnings
diff --git a/amiga/gui.c b/amiga/gui.c
index c6ab633..ad452a6 100644
--- a/amiga/gui.c
+++ b/amiga/gui.c
@@ -547,7 +547,6 @@ static void ami_set_screen_defaults(struct Screen *screen)
static nserror ami_set_options(struct nsoption_s *defaults)
{
STRPTR tempacceptlangs;
- BPTR lock = 0;
char temp[1024];
/* The following line disables the popupmenu.class select menu
@@ -605,15 +604,16 @@ static nserror ami_set_options(struct nsoption_s *defaults)
if (nsoption_charp(font_unicode) == NULL)
{
+ BPTR lock = 0;
/* Search for some likely candidates */
- if(lock=Lock("FONTS:Code2000.font",ACCESS_READ))
+ if(lock = Lock("FONTS:Code2000.font", ACCESS_READ))
{
UnLock(lock);
nsoption_set_charp(font_unicode,
(char *)strdup("Code2000"));
}
- else if(lock=Lock("FONTS:Bitstream Cyberbit.font",ACCESS_READ))
+ else if(lock = Lock("FONTS:Bitstream Cyberbit.font", ACCESS_READ))
{
UnLock(lock);
nsoption_set_charp(font_unicode,
@@ -637,7 +637,7 @@ void ami_amiupdate(void)
{
/* Create AppPath location for AmiUpdate use */
- BPTR lock = 0, amiupdatefh = 0;
+ BPTR lock = 0;
if(((lock = Lock("ENVARC:AppPaths",SHARED_LOCK)) == 0))
{
@@ -649,6 +649,7 @@ void ami_amiupdate(void)
if(lock = Lock("PROGDIR:", ACCESS_READ))
{
char filename[1024];
+ BPTR amiupdatefh;
DevNameFromLock(lock,(STRPTR)&filename,1024L,DN_FULLPATH);
commitdiff
http://git.netsurf-browser.org/netsurf.git/commit/?id=f991abc53cb5eeb8745...
commit f991abc53cb5eeb874542cf8a40f4dbecef32296
Author: Chris Young <chris(a)unsatisfactorysoftware.co.uk>
Commit: Chris Young <chris(a)unsatisfactorysoftware.co.uk>
Fix a bunch of cppcheck unusedVariable/unreadVariable warnings
diff --git a/amiga/gui.c b/amiga/gui.c
index 3949271..c6ab633 100644
--- a/amiga/gui.c
+++ b/amiga/gui.c
@@ -328,7 +328,6 @@ bool ami_gui_map_filename(char **remapped, const char *path, const
char *file, c
bool ami_gui_check_resource(char *fullpath, const char *file)
{
- bool free_rmap = false;
bool found = false;
char *remapped;
BPTR lock = 0;
@@ -1225,7 +1224,6 @@ bool ami_spacebox_to_ns_coords(struct gui_window_2 *gwin, int *x,
int *y,
bool ami_mouse_to_ns_coords(struct gui_window_2 *gwin, int *x, int *y,
int mouse_x, int mouse_y)
{
- int xs, ys;
int ns_x, ns_y;
struct IBox *bbox;
@@ -1447,17 +1445,15 @@ static void gui_window_set_icon(struct gui_window *g,
hlcache_handle *icon)
void ami_handle_msg(void)
{
- struct IntuiMessage *message = NULL;
ULONG class,result,storage = 0,x,y,xs,ys,width=800,height=600;
uint16 code,quals;
struct IBox *bbox;
struct nsObject *node;
struct nsObject *nnode;
struct gui_window_2 *gwin = NULL;
- struct MenuItem *item;
struct InputEvent *ie;
struct Node *tabnode;
- int i, nskey;
+ int nskey;
struct browser_window *closedbw;
struct timeval curtime;
static int drag_x_move = 0, drag_y_move = 0;
@@ -2163,7 +2159,6 @@ void ami_handle_msg(void)
case WMHI_ICONIFY:
{
- struct DiskObject *dobj;
struct bitmap *bm;
bm = urldb_get_thumbnail(hlcache_handle_get_url(gwin->bw->current_content));
@@ -2747,8 +2742,6 @@ void ami_try_quit(void)
static void gui_quit(void)
{
- int i;
-
ami_theme_throbber_free();
urldb_save(nsoption_charp(url_file));
@@ -3169,8 +3162,6 @@ gui_window_create(struct browser_window *bw,
gui_window_create_flags flags)
{
struct gui_window *g = NULL;
- bool closegadg=TRUE;
- struct Node *node;
ULONG
curx=nsoption_int(window_x),cury=nsoption_int(window_y),curw=nsoption_int(window_width),curh=nsoption_int(window_height);
char nav_west[100],nav_west_s[100],nav_west_g[100];
char nav_east[100],nav_east_s[100],nav_east_g[100];
@@ -4170,9 +4161,7 @@ static void ami_do_redraw_limits(struct gui_window *g, struct
browser_window *bw
struct IBox *bbox;
ULONG cur_tab = 0;
ULONG sx, sy;
- struct rect clip;
- struct RastPort *temprp;
- int posx, posy;
+
struct redraw_context ctx = {
.interactive = true,
.background_images = true,
@@ -4295,14 +4284,12 @@ static void gui_window_update_box(struct gui_window *g, const
struct rect *rect)
static void ami_do_redraw(struct gui_window_2 *gwin)
{
- struct Region *reg = NULL;
struct Rectangle rect;
- hlcache_handle *c;
ULONG hcurrent,vcurrent,xoffset,yoffset,width=800,height=600,x0=0,y0=0;
struct IBox *bbox;
ULONG oldh = gwin->oldh, oldv=gwin->oldv;
- bool morescroll = false;
struct RastPort *temprp;
+ hlcache_handle *c;
if(browser_window_redraw_ready(gwin->bw) == false) return;
@@ -4339,7 +4326,6 @@ static void ami_do_redraw(struct gui_window_2 *gwin)
if(gwin->redraw_scroll)
{
struct rect rect;
- int x0, y0, x1, y1;
gwin->bw->window->c_h_temp = gwin->bw->window->c_h;
gui_window_remove_caret(gwin->bw->window);
@@ -4430,7 +4416,7 @@ void ami_refresh_window(struct gui_window_2 *gwin)
struct IBox *bbox;
int x0, x1, y0, y1, sx, sy;
- struct RegionRectangle *regrect, *nregrect;
+ struct RegionRectangle *regrect;
sx = gwin->bw->window->scrollx;
sy = gwin->bw->window->scrolly;
@@ -4704,7 +4690,6 @@ static void gui_set_search_ico(hlcache_handle *ico)
struct nsObject *node;
struct nsObject *nnode;
struct gui_window_2 *gwin;
- char fname[100];
struct bitmap *ico_bitmap;
if(IsMinListEmpty(window_list)) return;
@@ -4818,9 +4803,6 @@ static void gui_window_place_caret(struct gui_window *g, int x, int
y, int heigh
static void gui_window_remove_caret(struct gui_window *g)
{
- struct IBox *bbox;
- int xs,ys;
-
if(!g) return;
if(g->c_h == 0) return;
@@ -4879,9 +4861,7 @@ void ami_scroller_hook(struct Hook *hook,Object *object,struct
IntuiMessage *msg
ULONG gid;
struct gui_window_2 *gwin = hook->h_Data;
struct IntuiWheelData *wheel;
- Object *reqrefresh = NULL;
struct Node *node = NULL;
- char *urltxt;
nsurl *url;
switch(msg->Class)
@@ -4954,8 +4934,7 @@ void ami_scroller_hook(struct Hook *hook,Object *object,struct
IntuiMessage *msg
bool ami_text_box_at_point(struct gui_window_2 *gwin, ULONG *x, ULONG *y)
{
struct IBox *bbox;
- ULONG xs,ys,width,height;
- int box_x=0,box_y=0;
+ ULONG xs, ys, width, height;
struct contextual_content data;
GetAttr(SPACE_AreaBox, (Object *)gwin->objects[GID_BROWSER],
commitdiff
http://git.netsurf-browser.org/netsurf.git/commit/?id=268cda0f560ffdacf61...
commit 268cda0f560ffdacf6186b923f5540ed5da52ef9
Author: Chris Young <chris(a)unsatisfactorysoftware.co.uk>
Commit: Chris Young <chris(a)unsatisfactorysoftware.co.uk>
Fix cppcheck variableHidingTypedef
diff --git a/amiga/gui.c b/amiga/gui.c
index b893b6f..3949271 100644
--- a/amiga/gui.c
+++ b/amiga/gui.c
@@ -463,7 +463,7 @@ colour_option_from_pen(UWORD pen,
struct Screen *screen,
colour def_colour)
{
- ULONG colour[3];
+ ULONG colr[3];
struct DrawInfo *drinfo;
if((option < NSOPTION_SYS_COLOUR_START) ||
@@ -479,12 +479,12 @@ colour_option_from_pen(UWORD pen,
if(pen == AMINS_SCROLLERPEN) pen = ami_system_colour_scrollbar_fgpen(drinfo);
/* Get the colour of the pen being used for "pen" */
- GetRGB32(screen->ViewPort.ColorMap, drinfo->dri_Pens[pen], 1, (ULONG
*)&colour);
+ GetRGB32(screen->ViewPort.ColorMap, drinfo->dri_Pens[pen], 1, (ULONG
*)&colr);
/* convert it to a color */
- def_colour = ((colour[0] & 0xff000000) >> 24) |
- ((colour[1] & 0xff000000) >> 16) |
- ((colour[2] & 0xff000000) >> 8);
+ def_colour = ((colr[0] & 0xff000000) >> 24) |
+ ((colr[1] & 0xff000000) >> 16) |
+ ((colr[2] & 0xff000000) >> 8);
FreeScreenDrawInfo(screen, drinfo);
}
commitdiff
http://git.netsurf-browser.org/netsurf.git/commit/?id=d907ec9b0614e5c1787...
commit d907ec9b0614e5c178720429dee7a8ef96df6aad
Author: Chris Young <chris(a)unsatisfactorysoftware.co.uk>
Commit: Chris Young <chris(a)unsatisfactorysoftware.co.uk>
Remove cppcheck unnecessaryForwardDeclaration
diff --git a/amiga/plugin_hack.h b/amiga/plugin_hack.h
index ae79a1f..3d644ae 100644
--- a/amiga/plugin_hack.h
+++ b/amiga/plugin_hack.h
@@ -22,8 +22,6 @@
#include "utils/config.h"
#include "utils/errors.h"
-struct hlcache_handle;
-
nserror amiga_plugin_hack_init(void);
void amiga_plugin_hack_execute(struct hlcache_handle *c);
commitdiff
http://git.netsurf-browser.org/netsurf.git/commit/?id=412df342987f754958a...
commit 412df342987f754958a9756817ccacaebe07f764
Author: Chris Young <chris(a)unsatisfactorysoftware.co.uk>
Commit: Chris Young <chris(a)unsatisfactorysoftware.co.uk>
Fix some cppcheck variableScope warnings
diff --git a/amiga/gui.c b/amiga/gui.c
index 5c707c5..b893b6f 100644
--- a/amiga/gui.c
+++ b/amiga/gui.c
@@ -251,13 +251,12 @@ static bool path_add_part(char *path, int length, const char
*newpart)
STRPTR ami_locale_langs(void)
{
struct Locale *locale;
- STRPTR acceptlangs = NULL, acceptlangs2 = NULL;
- int i;
+ STRPTR acceptlangs = NULL;
char *remapped;
if(locale = OpenLocale(NULL))
{
- for(i=0;i<10;i++)
+ for(int i = 0; i < 10; i++)
{
if(locale->loc_PrefLanguages[i])
{
@@ -266,7 +265,7 @@ STRPTR ami_locale_langs(void)
{
if(acceptlangs)
{
- acceptlangs2 = acceptlangs;
+ STRPTR acceptlangs2 = acceptlangs;
acceptlangs = ASPrintf("%s, %s",acceptlangs2, remapped);
FreeVec(acceptlangs2);
acceptlangs2 = NULL;
-----------------------------------------------------------------------
Summary of changes:
amiga/arexx.c | 7 +++--
amiga/clipboard.c | 1 -
amiga/context_menu.c | 2 +-
amiga/download.c | 9 +++---
amiga/drag.c | 9 ++----
amiga/dt_anim.c | 14 +++------
amiga/dt_picture.c | 5 ---
amiga/dt_sound.c | 4 ---
amiga/file.c | 2 -
amiga/filetype.c | 2 -
amiga/font.c | 2 -
amiga/gui.c | 57 +++++++++++++----------------------------
amiga/gui_options.c | 2 +-
amiga/history_local.c | 2 -
amiga/icon.c | 7 ++---
amiga/iff_dr2d.c | 14 ++++------
amiga/launch.c | 2 -
amiga/menu.c | 3 --
amiga/misc.c | 2 +-
amiga/plotters.c | 23 ++++++++--------
amiga/plugin_hack.c | 2 +-
amiga/plugin_hack.h | 2 -
amiga/stringview/stringview.c | 1 -
23 files changed, 59 insertions(+), 115 deletions(-)
diff --git a/amiga/arexx.c b/amiga/arexx.c
index 240aafe..3bac0c2 100644
--- a/amiga/arexx.c
+++ b/amiga/arexx.c
@@ -196,12 +196,12 @@ int ami_find_tab_bw(struct gui_window_2 *gwin, struct browser_window
*bw)
struct browser_window *ami_find_tab(int window, int tab)
{
- int windows = 0, tabs = 0;
struct nsObject *node, *nnode;
- struct gui_window_2 *gwin;
if(!IsMinListEmpty(window_list))
{
+ int windows = 0;
+
node = (struct nsObject *)GetHead((struct List *)window_list);
do
@@ -569,7 +569,6 @@ STATIC VOID rx_windows(struct ARexxCmd *cmd, struct RexxMsg *rxm
__attribute__((
STATIC VOID rx_active(struct ARexxCmd *cmd, struct RexxMsg *rxm __attribute__((unused)))
{
- int windows = 0, tabs = 0;
int window = 0, tab = 0;
struct browser_window *bw = curbw;
struct nsObject *node, *nnode;
@@ -579,6 +578,8 @@ STATIC VOID rx_active(struct ARexxCmd *cmd, struct RexxMsg *rxm
__attribute__((u
if(!IsMinListEmpty(window_list))
{
+ int windows = 0;
+
node = (struct nsObject *)GetHead((struct List *)window_list);
do
diff --git a/amiga/clipboard.c b/amiga/clipboard.c
index 6768dde..0f3a33d 100644
--- a/amiga/clipboard.c
+++ b/amiga/clipboard.c
@@ -185,7 +185,6 @@ char *ami_clipboard_cat_collection(struct CollectionItem *ci, LONG
codeset, size
void gui_get_clipboard(char **buffer, size_t *length)
{
- struct ContextNode *cn;
struct CollectionItem *ci = NULL;
struct StoredProperty *sp = NULL;
ULONG rlen=0,error;
diff --git a/amiga/context_menu.c b/amiga/context_menu.c
index dde283b..cb350de 100644
--- a/amiga/context_menu.c
+++ b/amiga/context_menu.c
@@ -324,7 +324,7 @@ void ami_context_menu_add_submenu(Object *ctxmenuobj, ULONG cmsub,
void *userdat
PMIA_UserData, userdata,
PMIA_Disabled, (content_get_type(userdata) != CONTENT_HTML),
TAG_DONE),
- TAG_DONE),
+ PMEND,
TAG_DONE),
~0);
break;
diff --git a/amiga/download.c b/amiga/download.c
index fb5c109..7ce47a3 100644
--- a/amiga/download.c
+++ b/amiga/download.c
@@ -89,7 +89,6 @@ static struct gui_download_window
*gui_download_window_create(download_context *
struct gui_window *gui)
{
const char *url = download_context_get_url(ctx);
- const char *mime_type = download_context_get_mime_type(ctx);
unsigned long total_size = download_context_get_total_length(ctx);
struct gui_download_window *dw;
char *dl_filename = ami_utf8_easy(download_context_get_filename(ctx));
@@ -347,7 +346,6 @@ void ami_free_download_list(struct List *dllist)
void
gui_window_save_link(struct gui_window *g, const char *url, const char *title)
{
- BPTR fh = 0;
char fname[1024];
STRPTR openurlstring,linkname;
struct DiskObject *dobj = NULL;
@@ -369,6 +367,8 @@ gui_window_save_link(struct gui_window *g, const char *url, const char
*title)
if(ami_download_check_overwrite(fname, g->shared->win, 0))
{
+ BPTR fh;
+
if(fh = FOpen(fname,MODE_NEWFILE,0))
{
/* TODO: Should be URLOpen on OS4.1 */
@@ -401,8 +401,6 @@ BOOL ami_download_check_overwrite(const char *file, struct Window
*win, ULONG si
/* Return TRUE if file can be (over-)written */
int32 res = 0;
BPTR lock = 0;
- BPTR fh = 0;
- int64 oldsize = 0;
char *overwritetext;
if(nsoption_bool(ask_overwrite) == false) return TRUE;
@@ -412,6 +410,9 @@ BOOL ami_download_check_overwrite(const char *file, struct Window
*win, ULONG si
if(lock)
{
if(size) {
+ BPTR fh;
+ int64 oldsize = 0;
+
if(fh = OpenFromLock(lock)) {
oldsize = GetFileSize(fh);
Close(fh);
diff --git a/amiga/drag.c b/amiga/drag.c
index f8944d3..09df0d0 100644
--- a/amiga/drag.c
+++ b/amiga/drag.c
@@ -98,9 +98,8 @@ void gui_drag_save_selection(struct gui_window *g, const char
*selection)
void ami_drag_save(struct Window *win)
{
- ULONG which = WBO_NONE,type;
- char path[1025],dpath[1025];
- const char *source_data;
+ ULONG which = WBO_NONE, type;
+ char path[1025], dpath[1025];
ULONG source_size;
ami_drag_icon_close(NULL);
@@ -195,10 +194,8 @@ void ami_drag_save(struct Window *win)
void ami_drag_icon_show(struct Window *win, const char *type)
{
struct DiskObject *dobj = NULL;
- ULONG *icondata1;
ULONG width, height;
- long format = 0;
- int err = 0;
+ int err;
int deftype = WBPROJECT;
drag_in_progress = TRUE;
diff --git a/amiga/dt_anim.c b/amiga/dt_anim.c
index f2b0f76..4722d2d 100644
--- a/amiga/dt_anim.c
+++ b/amiga/dt_anim.c
@@ -92,7 +92,6 @@ static const content_handler amiga_dt_anim_content_handler = {
nserror amiga_dt_anim_init(void)
{
- char dt_mime[50];
struct DataType *dt, *prevdt = NULL;
lwc_string *type;
lwc_error lerror;
@@ -161,14 +160,11 @@ bool amiga_dt_anim_convert(struct content *c)
amiga_dt_anim_content *plugin = (amiga_dt_anim_content *) c;
union content_msg_data msg_data;
int width, height;
- char title[100];
const uint8 *data;
UBYTE *bm_buffer;
ULONG size;
- Object *dto;
struct BitMapHeader *bmh;
unsigned int bm_flags = BITMAP_NEW | BITMAP_OPAQUE;
- int bm_format = PBPAFMT_RGBA;
struct adtFrame adt_frame;
APTR clut;
@@ -341,20 +337,20 @@ APTR ami_colormap_to_clut(struct ColorMap *cmap)
{
int i;
UBYTE *clut = AllocVecTags(256 * 4, AVT_ClearWithValue, 0, TAG_DONE); /* NB: Was not
MEMF_PRIVATE */
- ULONG colour[256 * 4];
+ ULONG colr[256 * 4];
if(!clut) return NULL;
/* Get the palette from the ColorMap */
- GetRGB32(cmap, 0, 256, (ULONG *)&colour);
+ GetRGB32(cmap, 0, 256, (ULONG *)&colr);
/* convert it to a table of ARGB values */
for(i = 0; i < 1024; i += 4)
{
clut[i] = (0xff << 24) |
- ((colour[i] & 0xff000000) >> 8) |
- ((colour[i + 1] & 0xff000000) >> 16) |
- ((colour[i + 2] & 0xff000000) >> 24);
+ ((colr[i] & 0xff000000) >> 8) |
+ ((colr[i + 1] & 0xff000000) >> 16) |
+ ((colr[i + 2] & 0xff000000) >> 24);
}
return clut;
diff --git a/amiga/dt_picture.c b/amiga/dt_picture.c
index 211d221..1d30928 100644
--- a/amiga/dt_picture.c
+++ b/amiga/dt_picture.c
@@ -62,7 +62,6 @@ struct amiga_dt_picture_content {
nserror amiga_dt_picture_init(void)
{
- char dt_mime[50];
struct DataType *dt, *prevdt = NULL;
lwc_string *type;
lwc_error lerror;
@@ -214,14 +213,10 @@ bool amiga_dt_picture_convert(struct content *c)
{
LOG(("amiga_dt_picture_convert"));
- union content_msg_data msg_data;
int width, height;
char *title;
- UBYTE *bm_buffer;
Object *dto;
struct BitMapHeader *bmh;
- unsigned int bm_flags = BITMAP_NEW;
- int bm_format = PBPAFMT_RGBA;
char *filetype;
if(dto = amiga_dt_picture_newdtobject((struct amiga_dt_picture_content *)c))
diff --git a/amiga/dt_sound.c b/amiga/dt_sound.c
index 3f82169..a1daf03 100644
--- a/amiga/dt_sound.c
+++ b/amiga/dt_sound.c
@@ -77,7 +77,6 @@ void amiga_dt_sound_play(Object *dto)
nserror amiga_dt_sound_init(void)
{
- char dt_mime[50];
struct DataType *dt, *prevdt = NULL;
lwc_string *type;
lwc_error lerror;
@@ -146,12 +145,9 @@ bool amiga_dt_sound_convert(struct content *c)
LOG(("amiga_dt_sound_convert"));
amiga_dt_sound_content *plugin = (amiga_dt_sound_content *) c;
- union content_msg_data msg_data;
int width = 50, height = 50;
- char title[100];
const uint8 *data;
ULONG size;
- Object *dto;
data = (uint8 *)content__get_source_data(c, &size);
diff --git a/amiga/file.c b/amiga/file.c
index 91d3755..5d16ceb 100644
--- a/amiga/file.c
+++ b/amiga/file.c
@@ -49,8 +49,6 @@ static struct Hook aslhookfunc;
static const ULONG ami_file_asl_mime_hook(struct Hook *mh,
struct FileRequester *fr, struct AnchorPathOld *ap)
{
- BPTR file = 0;
- char buffer[10];
char fname[1024];
BOOL ret = FALSE;
char *mt = NULL;
diff --git a/amiga/filetype.c b/amiga/filetype.c
index 0cb4ac4..bcb6b7e 100644
--- a/amiga/filetype.c
+++ b/amiga/filetype.c
@@ -173,9 +173,7 @@ const char *ami_content_type_to_file_type(content_type type)
nserror ami_mime_init(const char *mimefile)
{
- lwc_string *type;
lwc_error lerror;
- nserror error;
char buffer[256];
BPTR fh = 0;
struct RDArgs *rargs = NULL;
diff --git a/amiga/font.c b/amiga/font.c
index df4a188..148d860 100755
--- a/amiga/font.c
+++ b/amiga/font.c
@@ -204,8 +204,6 @@ bool nsfont_position_in_string(const plot_font_style_t *fstyle,
FIXED kern = 0;
struct OutlineFont *ofont, *ufont = NULL;
uint32 tx=0,i=0;
- size_t len, utf8len = 0;
- uint8 *utf8;
int utf8_pos = 0;
uint32 co = 0;
int utf16charlen;
diff --git a/amiga/gui.c b/amiga/gui.c
index 5c707c5..ad452a6 100644
--- a/amiga/gui.c
+++ b/amiga/gui.c
@@ -251,13 +251,12 @@ static bool path_add_part(char *path, int length, const char
*newpart)
STRPTR ami_locale_langs(void)
{
struct Locale *locale;
- STRPTR acceptlangs = NULL, acceptlangs2 = NULL;
- int i;
+ STRPTR acceptlangs = NULL;
char *remapped;
if(locale = OpenLocale(NULL))
{
- for(i=0;i<10;i++)
+ for(int i = 0; i < 10; i++)
{
if(locale->loc_PrefLanguages[i])
{
@@ -266,7 +265,7 @@ STRPTR ami_locale_langs(void)
{
if(acceptlangs)
{
- acceptlangs2 = acceptlangs;
+ STRPTR acceptlangs2 = acceptlangs;
acceptlangs = ASPrintf("%s, %s",acceptlangs2, remapped);
FreeVec(acceptlangs2);
acceptlangs2 = NULL;
@@ -329,7 +328,6 @@ bool ami_gui_map_filename(char **remapped, const char *path, const
char *file, c
bool ami_gui_check_resource(char *fullpath, const char *file)
{
- bool free_rmap = false;
bool found = false;
char *remapped;
BPTR lock = 0;
@@ -464,7 +462,7 @@ colour_option_from_pen(UWORD pen,
struct Screen *screen,
colour def_colour)
{
- ULONG colour[3];
+ ULONG colr[3];
struct DrawInfo *drinfo;
if((option < NSOPTION_SYS_COLOUR_START) ||
@@ -480,12 +478,12 @@ colour_option_from_pen(UWORD pen,
if(pen == AMINS_SCROLLERPEN) pen = ami_system_colour_scrollbar_fgpen(drinfo);
/* Get the colour of the pen being used for "pen" */
- GetRGB32(screen->ViewPort.ColorMap, drinfo->dri_Pens[pen], 1, (ULONG
*)&colour);
+ GetRGB32(screen->ViewPort.ColorMap, drinfo->dri_Pens[pen], 1, (ULONG
*)&colr);
/* convert it to a color */
- def_colour = ((colour[0] & 0xff000000) >> 24) |
- ((colour[1] & 0xff000000) >> 16) |
- ((colour[2] & 0xff000000) >> 8);
+ def_colour = ((colr[0] & 0xff000000) >> 24) |
+ ((colr[1] & 0xff000000) >> 16) |
+ ((colr[2] & 0xff000000) >> 8);
FreeScreenDrawInfo(screen, drinfo);
}
@@ -549,7 +547,6 @@ static void ami_set_screen_defaults(struct Screen *screen)
static nserror ami_set_options(struct nsoption_s *defaults)
{
STRPTR tempacceptlangs;
- BPTR lock = 0;
char temp[1024];
/* The following line disables the popupmenu.class select menu
@@ -607,15 +604,16 @@ static nserror ami_set_options(struct nsoption_s *defaults)
if (nsoption_charp(font_unicode) == NULL)
{
+ BPTR lock = 0;
/* Search for some likely candidates */
- if(lock=Lock("FONTS:Code2000.font",ACCESS_READ))
+ if(lock = Lock("FONTS:Code2000.font", ACCESS_READ))
{
UnLock(lock);
nsoption_set_charp(font_unicode,
(char *)strdup("Code2000"));
}
- else if(lock=Lock("FONTS:Bitstream Cyberbit.font",ACCESS_READ))
+ else if(lock = Lock("FONTS:Bitstream Cyberbit.font", ACCESS_READ))
{
UnLock(lock);
nsoption_set_charp(font_unicode,
@@ -639,7 +637,7 @@ void ami_amiupdate(void)
{
/* Create AppPath location for AmiUpdate use */
- BPTR lock = 0, amiupdatefh = 0;
+ BPTR lock = 0;
if(((lock = Lock("ENVARC:AppPaths",SHARED_LOCK)) == 0))
{
@@ -651,6 +649,7 @@ void ami_amiupdate(void)
if(lock = Lock("PROGDIR:", ACCESS_READ))
{
char filename[1024];
+ BPTR amiupdatefh;
DevNameFromLock(lock,(STRPTR)&filename,1024L,DN_FULLPATH);
@@ -1226,7 +1225,6 @@ bool ami_spacebox_to_ns_coords(struct gui_window_2 *gwin, int *x,
int *y,
bool ami_mouse_to_ns_coords(struct gui_window_2 *gwin, int *x, int *y,
int mouse_x, int mouse_y)
{
- int xs, ys;
int ns_x, ns_y;
struct IBox *bbox;
@@ -1448,17 +1446,15 @@ static void gui_window_set_icon(struct gui_window *g,
hlcache_handle *icon)
void ami_handle_msg(void)
{
- struct IntuiMessage *message = NULL;
ULONG class,result,storage = 0,x,y,xs,ys,width=800,height=600;
uint16 code,quals;
struct IBox *bbox;
struct nsObject *node;
struct nsObject *nnode;
struct gui_window_2 *gwin = NULL;
- struct MenuItem *item;
struct InputEvent *ie;
struct Node *tabnode;
- int i, nskey;
+ int nskey;
struct browser_window *closedbw;
struct timeval curtime;
static int drag_x_move = 0, drag_y_move = 0;
@@ -2164,7 +2160,6 @@ void ami_handle_msg(void)
case WMHI_ICONIFY:
{
- struct DiskObject *dobj;
struct bitmap *bm;
bm = urldb_get_thumbnail(hlcache_handle_get_url(gwin->bw->current_content));
@@ -2748,8 +2743,6 @@ void ami_try_quit(void)
static void gui_quit(void)
{
- int i;
-
ami_theme_throbber_free();
urldb_save(nsoption_charp(url_file));
@@ -3170,8 +3163,6 @@ gui_window_create(struct browser_window *bw,
gui_window_create_flags flags)
{
struct gui_window *g = NULL;
- bool closegadg=TRUE;
- struct Node *node;
ULONG
curx=nsoption_int(window_x),cury=nsoption_int(window_y),curw=nsoption_int(window_width),curh=nsoption_int(window_height);
char nav_west[100],nav_west_s[100],nav_west_g[100];
char nav_east[100],nav_east_s[100],nav_east_g[100];
@@ -4171,9 +4162,7 @@ static void ami_do_redraw_limits(struct gui_window *g, struct
browser_window *bw
struct IBox *bbox;
ULONG cur_tab = 0;
ULONG sx, sy;
- struct rect clip;
- struct RastPort *temprp;
- int posx, posy;
+
struct redraw_context ctx = {
.interactive = true,
.background_images = true,
@@ -4296,14 +4285,12 @@ static void gui_window_update_box(struct gui_window *g, const
struct rect *rect)
static void ami_do_redraw(struct gui_window_2 *gwin)
{
- struct Region *reg = NULL;
struct Rectangle rect;
- hlcache_handle *c;
ULONG hcurrent,vcurrent,xoffset,yoffset,width=800,height=600,x0=0,y0=0;
struct IBox *bbox;
ULONG oldh = gwin->oldh, oldv=gwin->oldv;
- bool morescroll = false;
struct RastPort *temprp;
+ hlcache_handle *c;
if(browser_window_redraw_ready(gwin->bw) == false) return;
@@ -4340,7 +4327,6 @@ static void ami_do_redraw(struct gui_window_2 *gwin)
if(gwin->redraw_scroll)
{
struct rect rect;
- int x0, y0, x1, y1;
gwin->bw->window->c_h_temp = gwin->bw->window->c_h;
gui_window_remove_caret(gwin->bw->window);
@@ -4431,7 +4417,7 @@ void ami_refresh_window(struct gui_window_2 *gwin)
struct IBox *bbox;
int x0, x1, y0, y1, sx, sy;
- struct RegionRectangle *regrect, *nregrect;
+ struct RegionRectangle *regrect;
sx = gwin->bw->window->scrollx;
sy = gwin->bw->window->scrolly;
@@ -4705,7 +4691,6 @@ static void gui_set_search_ico(hlcache_handle *ico)
struct nsObject *node;
struct nsObject *nnode;
struct gui_window_2 *gwin;
- char fname[100];
struct bitmap *ico_bitmap;
if(IsMinListEmpty(window_list)) return;
@@ -4819,9 +4804,6 @@ static void gui_window_place_caret(struct gui_window *g, int x, int
y, int heigh
static void gui_window_remove_caret(struct gui_window *g)
{
- struct IBox *bbox;
- int xs,ys;
-
if(!g) return;
if(g->c_h == 0) return;
@@ -4880,9 +4862,7 @@ void ami_scroller_hook(struct Hook *hook,Object *object,struct
IntuiMessage *msg
ULONG gid;
struct gui_window_2 *gwin = hook->h_Data;
struct IntuiWheelData *wheel;
- Object *reqrefresh = NULL;
struct Node *node = NULL;
- char *urltxt;
nsurl *url;
switch(msg->Class)
@@ -4955,8 +4935,7 @@ void ami_scroller_hook(struct Hook *hook,Object *object,struct
IntuiMessage *msg
bool ami_text_box_at_point(struct gui_window_2 *gwin, ULONG *x, ULONG *y)
{
struct IBox *bbox;
- ULONG xs,ys,width,height;
- int box_x=0,box_y=0;
+ ULONG xs, ys, width, height;
struct contextual_content data;
GetAttr(SPACE_AreaBox, (Object *)gwin->objects[GID_BROWSER],
diff --git a/amiga/gui_options.c b/amiga/gui_options.c
index 400ced8..877ff09 100755
--- a/amiga/gui_options.c
+++ b/amiga/gui_options.c
@@ -198,7 +198,7 @@ enum
#define OPTS_MAX_TABS 10
#define OPTS_MAX_SCREEN 4
#define OPTS_MAX_PROXY 5
-#define OPTS_MAX_NATIVEBM 3
+#define OPTS_MAX_NATIVEBM 4
#define OPTS_MAX_DITHER 4
struct ami_gui_opts_window {
diff --git a/amiga/history_local.c b/amiga/history_local.c
index 1f710b2..4849c65 100755
--- a/amiga/history_local.c
+++ b/amiga/history_local.c
@@ -74,7 +74,6 @@ static void ami_history_scroller_hook(struct Hook *hook,Object
*object,struct In
void ami_history_open(struct browser_window *bw, struct history *history)
{
int width, height;
- struct IBox *bbox;
assert(history);
@@ -239,7 +238,6 @@ BOOL ami_history_event(struct history_window *hw)
/* return TRUE if window destroyed */
ULONG class,result,relevent = 0;
uint16 code;
- struct MenuItem *item;
const char *url;
struct IBox *bbox;
ULONG xs, ys;
diff --git a/amiga/icon.c b/amiga/icon.c
index c5bc6ae..a6b61a2 100644
--- a/amiga/icon.c
+++ b/amiga/icon.c
@@ -139,7 +139,7 @@ bool amiga_icon_convert(struct content *c)
ULONG size;
int width = 0, height = 0;
long format = 0;
- int err = 0;
+ int err;
uint8 r, g, b, a;
ULONG offset;
const char *url;
@@ -365,7 +365,7 @@ void amiga_icon_superimpose_favicon_internal(struct hlcache_handle
*icon, struct
ULONG *icondata1, *icondata2;
ULONG width, height;
long format = 0;
- int err = 0;
+ int err;
if(dobj == NULL) return;
@@ -420,11 +420,10 @@ void amiga_icon_superimpose_favicon_internal(struct hlcache_handle
*icon, struct
void amiga_icon_superimpose_favicon(char *path, struct hlcache_handle *icon, char *type)
{
struct DiskObject *dobj = NULL;
- struct BitMap *bm = NULL;
ULONG *icondata1, *icondata2;
ULONG width, height;
long format = 0;
- int err = 0;
+ int err;
ULONG trans1, pals1;
ULONG trans2, pals2;
struct ColorRegister *pal1;
diff --git a/amiga/iff_dr2d.c b/amiga/iff_dr2d.c
index 0638b94..5709d41 100644
--- a/amiga/iff_dr2d.c
+++ b/amiga/iff_dr2d.c
@@ -31,7 +31,7 @@ ULONG numcols;
ULONG findcolour(ULONG newcol)
{
ULONG i;
- ULONG colour = 0xFFFFFFFF;
+ ULONG colr = 0xFFFFFFFF;
UBYTE red,grn,blu;
red = svgtiny_RED(newcol);
@@ -41,21 +41,20 @@ ULONG findcolour(ULONG newcol)
for(i=0;i<numcols;i++)
{
if((cm[i].red == red) && (cm[i].green == grn) && (cm[i].blue == blu))
- colour = i;
+ colr = i;
}
- return colour;
+ return colr;
}
void addcolour(ULONG newcol)
{
- int i;
- ULONG colour;
+ ULONG colr;
UBYTE red,grn,blu;
- colour = findcolour(newcol);
+ colr = findcolour(newcol);
- if(colour == 0xFFFFFFFF)
+ if(colr == 0xFFFFFFFF)
{
cm[numcols].red = svgtiny_RED(newcol);
cm[numcols].green = svgtiny_GREEN(newcol);
@@ -342,7 +341,6 @@ int main(int argc, char **argv)
{
BPTR fh = 0;
char *buffer;
- size_t n;
struct IFFHandle *iffh = NULL;
int64 size;
LONG rarray[] = {0,0};
diff --git a/amiga/launch.c b/amiga/launch.c
index ebd8229..0d25bcf 100755
--- a/amiga/launch.c
+++ b/amiga/launch.c
@@ -105,8 +105,6 @@ BOOL ami_openurl_check_list(struct MinList *list, const char *url)
void ami_openurl_open(void)
{
- struct ami_protocol *ami_p;
-
if(nsoption_bool(use_openurl_lib)) {
if(OpenURLBase = OpenLibrary("openurl.library",0))
IOpenURL = (struct OpenURLIFace *)GetInterface(OpenURLBase,"main",1,NULL);
diff --git a/amiga/menu.c b/amiga/menu.c
index 13b9c9c..234a958 100644
--- a/amiga/menu.c
+++ b/amiga/menu.c
@@ -456,8 +456,6 @@ static struct gui_window_2 *ami_menu_layout(struct gui_window_2
*gwin)
struct NewMenu *ami_create_menu(struct gui_window_2 *gwin)
{
- int i;
-
gwin->menu = AllocVecTags(sizeof(struct NewMenu) * (AMI_MENU_AREXX_MAX + 1),
AVT_ClearWithValue, 0, TAG_DONE);
ami_init_menulabs(gwin);
@@ -1029,7 +1027,6 @@ static void ami_menu_item_hotlist_show(struct Hook *hook, APTR
window, struct In
static void ami_menu_item_hotlist_entries(struct Hook *hook, APTR window, struct
IntuiMessage *msg)
{
nsurl *url = hook->h_Data;
- nserror error;
struct gui_window_2 *gwin;
GetAttr(WINDOW_UserData, (Object *)window, (ULONG *)&gwin);
diff --git a/amiga/misc.c b/amiga/misc.c
index ac9d245..c25c5d5 100755
--- a/amiga/misc.c
+++ b/amiga/misc.c
@@ -108,7 +108,7 @@ void die(const char *error)
char *url_to_path(const char *url)
{
- char *tmps, *unesc, *slash, *colon, *url2;
+ char *unesc, *slash, *colon, *url2;
if (strncmp(url, "file://", SLEN("file://")) != 0)
return NULL;
diff --git a/amiga/plotters.c b/amiga/plotters.c
index 05db67f..0893c55 100755
--- a/amiga/plotters.c
+++ b/amiga/plotters.c
@@ -239,16 +239,16 @@ void ami_clearclipreg(struct gui_globals *gg)
gg->rect.MaxY = scrn->Height-1;
}
-static ULONG ami_plot_obtain_pen(struct MinList *shared_pens, ULONG colour)
+static ULONG ami_plot_obtain_pen(struct MinList *shared_pens, ULONG colr)
{
struct ami_plot_pen *node;
ULONG pen = ObtainBestPenA(scrn->ViewPort.ColorMap,
- (colour & 0x000000ff) << 24,
- (colour & 0x0000ff00) << 16,
- (colour & 0x00ff0000) << 8,
+ (colr & 0x000000ff) << 24,
+ (colr & 0x0000ff00) << 16,
+ (colr & 0x00ff0000) << 8,
NULL);
- if(pen == -1) LOG(("WARNING: Cannot allocate pen for ABGR:%lx", colour));
+ if(pen == -1) LOG(("WARNING: Cannot allocate pen for ABGR:%lx", colr));
if(shared_pens != NULL) {
if(node = (struct ami_plot_pen *)AllocVecTagList(sizeof(struct ami_plot_pen), NULL)) {
@@ -278,26 +278,26 @@ void ami_plot_release_pens(struct MinList *shared_pens)
}while(node = nnode);
}
-static void ami_plot_setapen(ULONG colour)
+static void ami_plot_setapen(ULONG colr)
{
if(palette_mapped == false) {
SetRPAttrs(glob->rp, RPTAG_APenColor,
- ns_color_to_nscss(colour),
+ ns_color_to_nscss(colr),
TAG_DONE);
} else {
- ULONG pen = ami_plot_obtain_pen(glob->shared_pens, colour);
+ ULONG pen = ami_plot_obtain_pen(glob->shared_pens, colr);
if(pen != -1) SetAPen(glob->rp, pen);
}
}
-static void ami_plot_setopen(ULONG colour)
+static void ami_plot_setopen(ULONG colr)
{
if(palette_mapped == false) {
SetRPAttrs(glob->rp, RPTAG_OPenColor,
- ns_color_to_nscss(colour),
+ ns_color_to_nscss(colr),
TAG_DONE);
} else {
- ULONG pen = ami_plot_obtain_pen(glob->shared_pens, colour);
+ ULONG pen = ami_plot_obtain_pen(glob->shared_pens, colr);
if(pen != -1) SetOPen(glob->rp, pen);
}
}
@@ -945,7 +945,6 @@ bool ami_path(const float *p, unsigned int n, colour fill, float
width,
colour c, const float transform[6])
{
unsigned int i;
- struct bez_point *old_p;
struct bez_point start_p, cur_p, p_a, p_b, p_c, p_r;
#ifdef AMI_PLOTTER_DEBUG
diff --git a/amiga/plugin_hack.c b/amiga/plugin_hack.c
index f78a67e..9bfd7a3 100644
--- a/amiga/plugin_hack.c
+++ b/amiga/plugin_hack.c
@@ -132,7 +132,7 @@ void amiga_plugin_hack_destroy(struct content *c)
{
amiga_plugin_hack_content *plugin = (amiga_plugin_hack_content *) c;
- LOG(("amiga_plugin_hack_destroy"));
+ LOG(("amiga_plugin_hack_destroy %p", plugin));
return;
}
diff --git a/amiga/plugin_hack.h b/amiga/plugin_hack.h
index ae79a1f..3d644ae 100644
--- a/amiga/plugin_hack.h
+++ b/amiga/plugin_hack.h
@@ -22,8 +22,6 @@
#include "utils/config.h"
#include "utils/errors.h"
-struct hlcache_handle;
-
nserror amiga_plugin_hack_init(void);
void amiga_plugin_hack_execute(struct hlcache_handle *c);
diff --git a/amiga/stringview/stringview.c b/amiga/stringview/stringview.c
index 5aea939..9aa110a 100755
--- a/amiga/stringview/stringview.c
+++ b/amiga/stringview/stringview.c
@@ -859,7 +859,6 @@ Class *MakeStringClass( void )
void FreeStringClass(Class *cl)
{
- struct Library *libbase;
URLHistory_Free();
FreeClass(cl);
}
--
NetSurf Browser