Fixed some unused variable warining.

This commit is contained in:
Ole Loots 2014-09-15 23:27:15 +02:00
parent 2c01ca13f2
commit 067b21e8f6
7 changed files with 12 additions and 66 deletions

View File

@ -566,7 +566,6 @@ static void throbber_advance( void * data )
static void gui_window_start_throbber(struct gui_window *w)
{
GRECT work;
if (w == NULL)
return;
@ -1061,7 +1060,6 @@ int main(int argc, char** argv)
struct stat stat_buf;
nsurl *url;
nserror ret;
extern struct gui_llcache_table* filesystem_llcache_table;
struct netsurf_table atari_table = {
.browser = &atari_browser_table,

View File

@ -112,57 +112,12 @@ static void atari_global_history_mouse_action(struct core_window *cw,
static short handle_event(GUIWIN *win, EVMULT_OUT *ev_out, short msg[8])
{
GRECT tb_area;
short retval = 0;
LOG((""));
if(ev_out->emo_events & MU_MESAG){
switch (msg[0]) {
// case WM_TOOLBAR:
// LOG(("WM_TOOLBAR"));
// tv = (struct atari_treeview_window*) gemtk_wm_get_user_data(win);
// assert(tv);
// switch (msg[4]) {
// case TOOLBAR_HOTLIST_CREATE_FOLDER:
// hotlist_add_folder(NULL, 0, 0);
// break;
//
// case TOOLBAR_HOTLIST_ADD:
// gw = gui_window_get_input_window();
// if(gw && gw->browser){
// cur_url = gui_window_get_url(gw);
// cur_title = gui_window_get_title(gw);
// // TODO: read language string.
// cur_title = (cur_title ? cur_title : "New bookmark");
// } else {
// cur_url = "http://www";
// }
// atari_global_history_add_page(cur_url, cur_title);
// break;
//
// case TOOLBAR_HOTLIST_DELETE:
// hotlist_keypress(KEY_DELETE_LEFT);
// // TODO: check if redraw is really required,
// // - implement treeview getter for the gemtk
// // handle.
// break;
//
// case TOOLBAR_HOTLIST_EDIT:
// hotlist_edit_selection();
// break;
// }
//
// gemtk_win = atari_treeview_get_gemtk_window(tv);
// assert(gemtk_win);
// gemtk_obj_get_tree(TOOLBAR_HOTLIST)[msg[4]].ob_state &= ~OS_SELECTED;
// atari_treeview_get_grect(tv, TREEVIEW_AREA_TOOLBAR, &tb_area);
// evnt_timer(150);
// gemtk_wm_exec_redraw(gemtk_win, &tb_area);
//
// break;
case WM_CLOSED:
atari_global_history_close();
retval = 1;
@ -185,7 +140,6 @@ void atari_global_history_init(void)
if( atari_global_history.window == NULL ){
int flags = ATARI_TREEVIEW_WIDGETS;
short handle = -1;
GRECT desk;
OBJECT * tree = gemtk_obj_get_tree(TOOLBAR_HISTORY);
assert( tree );

View File

@ -110,7 +110,7 @@ void redraw_slot_schedule(struct s_redrw_slots * slots, short x0, short y0,
slots->areas[slots->size-1].x1 = MAX(slots->areas[i].x1, x1);
slots->areas[slots->size-1].y1 = MAX(slots->areas[i].y1, y1);
}
done:
return;
}

View File

@ -80,8 +80,8 @@ static void on_redraw(ROOTWIN *rootwin, short msg[8]);
static void on_resized(ROOTWIN *rootwin);
static void on_file_dropped(ROOTWIN *rootwin, short msg[8]);
static short on_window_key_input(ROOTWIN * rootwin, unsigned short nkc);
static bool on_content_mouse_click(ROOTWIN *rootwin);
static bool on_content_mouse_move(ROOTWIN *rootwin, GRECT *content_area);
static void on_content_mouse_click(ROOTWIN *rootwin);
static void on_content_mouse_move(ROOTWIN *rootwin, GRECT *content_area);
static void toolbar_redraw_cb(GUIWIN *win, uint16_t msg, GRECT *clip);
bool gui_window_get_scroll(struct gui_window *w, int *sx, int *sy);
@ -381,7 +381,7 @@ int window_destroy(ROOTWIN *rootwin)
void window_open(ROOTWIN *rootwin, struct gui_window *gw, GRECT pos)
{
GRECT br, g;
GRECT g;
rootwin->active_gui_window = gw;
@ -465,7 +465,6 @@ void window_set_title(struct s_gui_win_root * rootwin, char *title)
void window_scroll_by(ROOTWIN *root, int sx, int sy)
{
GRECT content_area;
struct gemtk_wm_scroll_info_s *slid = gemtk_wm_get_scroll_info(root->win);
if (sx < 0) {
@ -1012,7 +1011,7 @@ exit:
void window_process_redraws(ROOTWIN * rootwin)
{
GRECT work, visible_ro, tb_area, content_area;
GRECT visible_ro, tb_area, content_area;
short i;
short scroll_x=0, scroll_y=0;
bool caret_rdrw_required = false;
@ -1133,7 +1132,7 @@ void window_process_redraws(ROOTWIN * rootwin)
/* -------------------------------------------------------------------------- */
/* Event Handlers: */
/* -------------------------------------------------------------------------- */
static bool on_content_mouse_move(ROOTWIN *rootwin, GRECT *content_area)
static void on_content_mouse_move(ROOTWIN *rootwin, GRECT *content_area)
{
int mx, my, sx, sy;
struct gemtk_wm_scroll_info_s *slid;
@ -1155,7 +1154,7 @@ static bool on_content_mouse_move(ROOTWIN *rootwin, GRECT *content_area)
browser_window_mouse_track(bw, 0, mx + sx, my + sy);
}
static bool on_content_mouse_click(ROOTWIN *rootwin)
static void on_content_mouse_click(ROOTWIN *rootwin)
{
short dummy, mbut, mx, my;
GRECT cwork;
@ -1393,7 +1392,6 @@ static void on_redraw(ROOTWIN *rootwin, short msg[8])
if(gemtk_wm_get_state(rootwin->win) & GEMTK_WM_STATUS_ICONIFIED) {
// TODO: remove asignment:
GRECT clip = {msg[4], msg[5], msg[6], msg[7]};
window_redraw_favicon(rootwin, NULL);
} else {
window_schedule_redraw_grect(rootwin, &clip);
@ -1476,7 +1474,6 @@ static void on_file_dropped(ROOTWIN *rootwin, short msg[8])
int sx, sy;
bool processed = false;
GRECT content_area;
struct browser_window * bw = gw->browser->bw;
buff[size] = 0;

View File

@ -114,7 +114,7 @@ nserror atari_schedule(int ival, void (*callback)(void *p), void *p)
if ((ival < 0) || (ret != NSERROR_OK)) {
return ret;
}
nscb = calloc(1, sizeof(struct nscallback));
nscb->timeout = MS_NOW() + ival;
@ -211,7 +211,6 @@ int schedule_run(void)
/* exported function documented in atari/schedule.h */
void list_schedule(void)
{
struct timeval tv;
struct nscallback *cur_nscb;
LOG(("schedule list at ms clock %ld", MS_NOW() ));

View File

@ -170,8 +170,6 @@ static const struct redraw_context toolbar_rdrw_ctx = {
};
static void tb_txt_request_redraw(void *data, int x, int y, int w, int h );
static nserror toolbar_icon_callback( hlcache_handle *handle,
const hlcache_event *event, void *pw );
/**
* Find a button for a specific resource ID
@ -688,8 +686,6 @@ bool toolbar_key_input(struct s_toolbar *tb, short nkc)
{
assert(tb!=NULL);
GRECT work;
bool ret = false;
struct gui_window *gw = window_get_active_gui_window(tb->owner);

View File

@ -91,7 +91,7 @@ static void on_redraw_event(struct core_window *cw, EVMULT_OUT *ev_out,
short msg[8]);
/* static utils: */
static void atari_treeview_dump_info(struct atari_treeview_window *tv, char *s);
//static void atari_treeview_dump_info(struct atari_treeview_window *tv, char *s);
/**
* Schedule a redraw of the treeview content
@ -144,6 +144,7 @@ GUIWIN * atari_treeview_get_gemtk_window(struct core_window *cw)
return(tv->window);
}
/*
static void atari_treeview_dump_info(struct atari_treeview_window *tv,
char * title)
{
@ -152,8 +153,9 @@ static void atari_treeview_dump_info(struct atari_treeview_window *tv,
gemtk_wm_dump_window_info(atari_treeview_get_gemtk_window((struct core_window *)tv));
GEMTK_DBG_GRECT("Redraw Area: \n", &tv->rdw_area)
dbg_grect("Redraw Area2: \n", &tv->rdw_area);
printf("Extent: x: %d, y: %d\n", tv->extent, tv->extent);
printf("Extent: x: %d, y: %d\n", tv->extent.x, tv->extent.y);
}
*/
static bool atari_treeview_is_iconified(struct core_window *cw){