Merge pull request #54 from KINGbabasula/master

Silence warnings from unused variables
This commit is contained in:
Vojtěch Boček
2015-03-23 15:36:12 +01:00
15 changed files with 32 additions and 29 deletions

View File

@@ -1089,7 +1089,7 @@ void fb_pop_context(void)
}
#define SLEEP_CONST 16
void *fb_draw_thread_work(void *cookie)
void *fb_draw_thread_work(UNUSED void *cookie)
{
struct timespec last, curr;
uint32_t diff = 0, prevSleepTime = 0;

View File

@@ -176,7 +176,7 @@ static void fb_qcom_vsync_destroy(struct fb_qcom_vsync *vs)
free(vs);
}
static int fb_qcom_vsync_wait(struct fb_qcom_vsync *vs)
static int fb_qcom_vsync_wait(UNUSED struct fb_qcom_vsync *vs)
{
#ifdef MR_QCOM_OVERLAY_USE_VSYNC
int res;

View File

@@ -45,7 +45,7 @@ static int get_img_trampoline_ver(struct bootimg *img)
return ver;
}
static int copy_rd_files(const char *path, const char *busybox_path)
static int copy_rd_files(UNUSED const char *path, UNUSED const char *busybox_path)
{
char buf[256];

View File

@@ -294,7 +294,7 @@ void touch_commit_events(struct timeval ev_time)
}
}
static void *input_thread_work(void *cookie)
static void *input_thread_work(UNUSED void *cookie)
{
ev_init();
struct input_event ev;

View File

@@ -108,7 +108,7 @@ struct keyboard_btn_data {
static int keyboard_init_map(struct keyboard *k, const uint32_t *map, const uint32_t *dimen);
static int keyboard_charset_switch_worker(uint32_t diff, void *data)
static int keyboard_charset_switch_worker(UNUSED uint32_t diff, void *data)
{
void **keyboard_bnt_data_old = NULL;
struct keyboard_btn_data *d = data;

View File

@@ -37,7 +37,7 @@
#define OVERSCROLL_MARK_H (4*DPI_MUL)
#define OVERSCROLL_RETURN_SPD (10*DPI_MUL)
static int listview_bounceback(uint32_t diff, void *data)
static int listview_bounceback(UNUSED uint32_t diff, void *data)
{
listview *v = (listview*)data;
const int max = v->fullH - v->h;
@@ -570,7 +570,7 @@ static void rom_item_deselect_finished(void *data)
d->sel_rect_sh = NULL;
}
static void rom_item_sel_step(void *data, float interpolated)
static void rom_item_sel_step(void *data, UNUSED float interpolated)
{
rom_item_data *d = data;
if(!d->sel_rect || !d->sel_rect_sh)
@@ -744,7 +744,7 @@ void rom_item_hide(void *data)
d->icon = NULL;
}
int rom_item_height(listview_item *it)
int rom_item_height(UNUSED listview_item *it)
{
return ROM_ITEM_H;
}

View File

@@ -278,7 +278,7 @@ static void ncard_move_step(void *data, float interpolated)
fb_request_draw();
}
static void ncard_reveal_finished(void *data)
static void ncard_reveal_finished(UNUSED void *data)
{
pthread_mutex_lock(&ncard.mutex);
ncard.bg->h = ncard.targetH;
@@ -529,7 +529,7 @@ void ncard_hide(void)
ncard.on_hidden_call(ncard.on_hidden_data);
}
void ncard_hide_callback(void *data)
void ncard_hide_callback(UNUSED void *data)
{
ncard_hide();
}

View File

@@ -22,6 +22,8 @@
#include <sys/time.h>
#include <time.h>
#define UNUSED __attribute__((unused))
#define ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0]))
#define REBOOT_SYSTEM 0

View File

@@ -410,7 +410,7 @@ static void multirom_ui_destroy_auto_boot_data(void)
auto_boot_data.destroy = 1;
}
static void multirom_ui_auto_boot_hidden(void *data)
static void multirom_ui_auto_boot_hidden(UNUSED void *data)
{
pthread_mutex_lock(&auto_boot_data.mutex);
multirom_ui_destroy_auto_boot_data();
@@ -427,7 +427,7 @@ static void multirom_ui_auto_boot_now(void *data)
pthread_mutex_unlock(&exit_code_mutex);
}
static void multirom_ui_auto_boot_tick(void *data)
static void multirom_ui_auto_boot_tick(UNUSED void *data)
{
char buff[128];
@@ -490,7 +490,7 @@ void multirom_ui_refresh_usb_handler(void)
pthread_mutex_unlock(&exit_code_mutex);
}
void multirom_ui_start_pong(void *data)
void multirom_ui_start_pong(UNUSED void *data)
{
pthread_mutex_lock(&exit_code_mutex);
loop_act |= LOOP_START_PONG;
@@ -552,7 +552,7 @@ void multirom_ui_tab_rom_destroy(void *data)
free(t);
}
void multirom_ui_tab_rom_confirmed(listview_item *it)
void multirom_ui_tab_rom_confirmed(UNUSED listview_item *it)
{
multirom_ui_tab_rom_boot();
}
@@ -623,7 +623,7 @@ void multirom_ui_tab_rom_update_usb(void)
fb_request_draw();
}
void multirom_ui_tab_rom_refresh_usb(int action)
void multirom_ui_tab_rom_refresh_usb(UNUSED int action)
{
multirom_update_partitions(mrom_status);
}
@@ -705,7 +705,7 @@ void multirom_ui_reboot_btn(void *data)
pthread_mutex_unlock(&exit_code_mutex);
}
void multirom_ui_tab_misc_copy_log(void *data)
void multirom_ui_tab_misc_copy_log(UNUSED void *data)
{
multirom_dump_status(mrom_status);

View File

@@ -50,7 +50,7 @@
#define SELECTED_RECT_H (6*DPI_MUL)
#define BTN_SHADOW_OFF (5*DPI_MUL)
static void destroy(multirom_theme_data *t)
static void destroy(UNUSED multirom_theme_data *t)
{
}
@@ -146,7 +146,7 @@ static void init_header(multirom_theme_data *t)
header_set_tab_selector_pos(t, 0.f);
}
static void tab_rom_init(multirom_theme_data *t, tab_data_roms *d, int tab_type)
static void tab_rom_init(UNUSED multirom_theme_data *t, tab_data_roms *d, UNUSED int tab_type)
{
d->list->x = fb_width/2 - fb_height/2;
d->list->y = HEADER_HEIGHT + LISTVIEW_MARGIN;
@@ -260,12 +260,12 @@ static void tab_misc_init(multirom_theme_data *t, tab_data_misc *d, int color_sc
tabview_add_items(t->tabs, TAB_MISC, d->ui_elements);
}
static int get_tab_width(multirom_theme_data *t)
static int get_tab_width(UNUSED multirom_theme_data *t)
{
return fb_width;
}
static int get_tab_height(multirom_theme_data *t)
static int get_tab_height(UNUSED multirom_theme_data *t)
{
return fb_height - HEADER_HEIGHT;
}

View File

@@ -51,7 +51,7 @@
#define BTN_SHADOW_OFF (5*DPI_MUL)
static button *pong_btn = NULL;
static void destroy(multirom_theme_data *t)
static void destroy(UNUSED multirom_theme_data *t)
{
if(pong_btn)
{
@@ -161,7 +161,7 @@ static void init_header(multirom_theme_data *t)
header_set_tab_selector_pos(t, 0.f);
}
static void tab_rom_init(multirom_theme_data *t, tab_data_roms *d, int tab_type)
static void tab_rom_init(UNUSED multirom_theme_data *t, tab_data_roms *d, UNUSED int tab_type)
{
d->list->x = LISTVIEW_MARGIN;
d->list->y = HEADER_HEIGHT+LISTVIEW_MARGIN;
@@ -273,12 +273,12 @@ static void tab_misc_init(multirom_theme_data *t, tab_data_misc *d, int color_sc
tabview_add_items(t->tabs, TAB_MISC, d->ui_elements);
}
static int get_tab_width(multirom_theme_data *t)
static int get_tab_width(UNUSED multirom_theme_data *t)
{
return fb_width;
}
static int get_tab_height(multirom_theme_data *t)
static int get_tab_height(UNUSED multirom_theme_data *t)
{
return fb_height - HEADER_HEIGHT;
}

2
pong.c
View File

@@ -198,7 +198,7 @@ int pong_do_movement(int step)
return 0;
}
int pong_touch_handler(touch_event *ev, void *data)
int pong_touch_handler(touch_event *ev, UNUSED void *data)
{
int i = 0;
for(; i < 2; ++i)

View File

@@ -77,7 +77,7 @@ static int device_fd = -1;
static volatile int run_event_thread = 1;
static pthread_t uevent_thread;
static void *uevent_thread_work(void *cookie)
static void *uevent_thread_work(UNUSED void *cookie)
{
struct pollfd ufd;
int nr;
@@ -328,7 +328,7 @@ static mode_t get_device_perm(const char *path, unsigned *uid, unsigned *gid)
}
static void make_device(const char *path,
const char *upath,
UNUSED const char *upath,
int block, int major, int minor)
{
unsigned uid;

View File

@@ -24,6 +24,7 @@
#include "../lib/log.h"
#include "../lib/fstab.h"
#include "../lib/framebuffer.h"
#include "../lib/util.h"
#include "crypto/lollipop/cryptfs.h"

View File

@@ -65,7 +65,7 @@ static int exit_code = ENCMNT_UIRES_ERROR;
static void *pwui_type_data = NULL;
static fb_text *invalid_pass_text = NULL;
static void boot_internal_clicked(void *data)
static void boot_internal_clicked(UNUSED void *data)
{
ncard_builder *b = ncard_create_builder();
ncard_set_pos(b, NCARD_POS_CENTER);
@@ -422,7 +422,7 @@ static void destroy_ui(int pwtype)
}
}
static int pw_ui_shutdown_counter_touch_handler(touch_event *ev, void *data)
static int pw_ui_shutdown_counter_touch_handler(UNUSED touch_event *ev, void *data)
{
int *shutdown_counter = data;
if(*shutdown_counter == 0)