Skip to content

Commit

Permalink
fixing some clang warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
nift4 committed Aug 2, 2024
1 parent 6f9a434 commit 81020d6
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 21 deletions.
8 changes: 4 additions & 4 deletions common/droidboot_platform_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ void droidboot_fb_flush(lv_disp_drv_t * disp_drv, const lv_area_t * area, lv_col
droidboot_internal_fb_flush(disp_drv, area, color_p);
}

int droidboot_get_display_height()
lv_coord_t droidboot_get_display_height()
{
return droidboot_internal_get_display_height();
}

int droidboot_get_display_width()
lv_coord_t droidboot_get_display_width()
{
return droidboot_internal_get_display_width();
}
Expand Down Expand Up @@ -98,12 +98,12 @@ void droidboot_delay(unsigned int time)
droidboot_internal_delay(time);
}

void droidboot_platform_boot_linux_from_ram(void *kernel_raw, off_t kernel_raw_size, void *ramdisk_raw, off_t ramdisk_size, void *dtb_raw, off_t dtb_raw_size, void *dtbo_raw, off_t dtbo_raw_size, char *options)
void droidboot_platform_boot_linux_from_ram(void *kernel_raw, uint64_t kernel_raw_size, void *ramdisk_raw, uint64_t ramdisk_size, void *dtb_raw, uint64_t dtb_raw_size, void *dtbo_raw, uint64_t dtbo_raw_size, char *options)
{
droidboot_internal_boot_linux_from_ram(kernel_raw, kernel_raw_size, ramdisk_raw, ramdisk_size, dtb_raw, dtb_raw_size, dtbo_raw, dtbo_raw_size, options);
}

void droidboot_pre_ramdisk_load(void *kernel_raw, off_t kernel_raw_size)
void droidboot_pre_ramdisk_load(void *kernel_raw, uint64_t kernel_raw_size)
{
droidboot_internal_pre_ramdisk_load(kernel_raw, kernel_raw_size);
}
Expand Down
8 changes: 4 additions & 4 deletions common/droidboot_platform_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@
#endif

void droidboot_fb_flush(lv_disp_drv_t * disp_drv, const lv_area_t * area, lv_color_t * color_p);
int droidboot_get_display_height();
int droidboot_get_display_width();
lv_coord_t droidboot_get_display_height();
lv_coord_t droidboot_get_display_width();
void droidboot_key_read(lv_indev_drv_t * drv, lv_indev_data_t*data);

int droidboot_platform_settings_dev_open(struct ext4_blockdev *bdev);
Expand All @@ -69,8 +69,8 @@ void droidboot_platform_system_log(const char *buf);

void droidboot_delay(unsigned int time);

void droidboot_platform_boot_linux_from_ram(void *kernel_raw, off_t kernel_raw_size, void *ramdisk_raw, off_t ramdisk_size, void *dtb_raw, off_t dtb_raw_size, void *dtbo_raw, off_t dtbo_raw_size, char *options);
void droidboot_pre_ramdisk_load(void *kernel_raw, off_t kernel_raw_size);
void droidboot_platform_boot_linux_from_ram(void *kernel_raw, uint64_t kernel_raw_size, void *ramdisk_raw, uint64_t ramdisk_size, void *dtb_raw, uint64_t dtb_raw_size, void *dtbo_raw, uint64_t dtbo_raw_size, char *options);
void droidboot_pre_ramdisk_load(void *kernel_raw, uint64_t kernel_raw_size);
void *droidboot_get_kernel_load_addr(void);
void *droidboot_get_ramdisk_load_addr(void);
bool droidboot_append_ramdisk_to_kernel(void);
Expand Down
18 changes: 9 additions & 9 deletions simulator/simulator.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ static bool s_simulator_running;
uint8_t s_simulator_keymask;
static JavaVM* s_simulator_jvm;
static jobject s_simulator_bitmap, s_simulator_thiz;
static jint s_simulator_h, s_simulator_w;
static lv_coord_t s_simulator_h, s_simulator_w;
extern int droidboot_exit;

int droidboot_internal_get_display_height()
lv_coord_t droidboot_internal_get_display_height()
{
return s_simulator_h;
}

int droidboot_internal_get_display_width()
lv_coord_t droidboot_internal_get_display_width()
{
return s_simulator_w;
}
Expand All @@ -33,13 +33,13 @@ JNIEXPORT void simulator_stop(JNIEnv* env)
droidboot_exit = 0;
}

JNIEXPORT void simulator_start(JNIEnv* env, jobject thiz, jobject bitmap, jint w, jint h)
__attribute__((unused)) JNIEXPORT void simulator_start(JNIEnv* env, jobject thiz, jobject bitmap, jint w, jint h)
{
(*env)->GetJavaVM(env, &s_simulator_jvm);
s_simulator_bitmap = (*env)->NewGlobalRef(env, bitmap);
s_simulator_thiz = (*env)->NewGlobalRef(env, thiz);
s_simulator_h = h;
s_simulator_w = w;
s_simulator_h = (lv_coord_t)h;
s_simulator_w = (lv_coord_t)w;
droidboot_init();
droidboot_show_dualboot_menu();
simulator_stop(env);
Expand Down Expand Up @@ -78,7 +78,7 @@ void droidboot_internal_fb_flush(lv_disp_drv_t * disp_drv, const lv_area_t * are
//__android_log_print(ANDROID_LOG_VERBOSE, "droidboot", "locked fb %p", addr);
for (uint32_t y = area->y1; y <= area->y2; y++) {
for (uint32_t x = area->x1; x <= area->x2; x++) {
addr[(y*s_simulator_w)+x] = 0xff << 24 | color_p->ch.blue << 16 | color_p->ch.green << 8 | color_p->ch.red;
addr[(y*s_simulator_w)+x] = 0xffU << 24 | color_p->ch.blue << 16 | color_p->ch.green << 8 | color_p->ch.red;
color_p++;
}
}
Expand Down Expand Up @@ -261,12 +261,12 @@ void droidboot_internal_delay(unsigned int time)
usleep(time*1000);
}

void droidboot_internal_boot_linux_from_ram(void *kernel_raw, off_t kernel_raw_size, void *ramdisk_raw, off_t ramdisk_size, void *dtb_raw, off_t dtb_raw_size, void *dtbo_raw, off_t dtbo_raw_size, char *options)
void droidboot_internal_boot_linux_from_ram(void *kernel_raw, uint64_t kernel_raw_size, void *ramdisk_raw, uint64_t ramdisk_size, void *dtb_raw, uint64_t dtb_raw_size, void *dtbo_raw, uint64_t dtbo_raw_size, char *options)
{
// nothing happens
}

void droidboot_internal_pre_ramdisk_load(void *kernel_raw, off_t kernel_raw_size)
void droidboot_internal_pre_ramdisk_load(void *kernel_raw, uint64_t kernel_raw_size)
{
// nothing happens
}
Expand Down
8 changes: 4 additions & 4 deletions simulator/simulator.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
#include "droidboot_error.h"

void droidboot_internal_fb_flush(lv_disp_drv_t * disp_drv, const lv_area_t * area, lv_color_t * color_p);
int droidboot_internal_get_display_height();
int droidboot_internal_get_display_width();
lv_coord_t droidboot_internal_get_display_height();
lv_coord_t droidboot_internal_get_display_width();
void droidboot_internal_key_read(lv_indev_drv_t * drv, lv_indev_data_t*data);
droidboot_error droidboot_internal_platform_init();
ssize_t dridboot_internal_sd_read_block(void *buf, uint32_t block, uint count);
Expand All @@ -24,8 +24,8 @@ void droidboot_internal_lvgl_threads_init();
void droidboot_internal_platform_on_screen_log(const char *buf);
void droidboot_internal_platform_system_log(const char *buf);
void droidboot_internal_delay(unsigned int time);
void droidboot_internal_boot_linux_from_ram(void *kernel_raw, off_t kernel_raw_size, void *ramdisk_raw, off_t ramdisk_size, void *dtb_raw, off_t dtb_raw_size, void *dtbo_raw, off_t dtbo_raw_size, char *options);
void droidboot_internal_pre_ramdisk_load(void *kernel_raw, off_t kernel_raw_size);
void droidboot_internal_boot_linux_from_ram(void *kernel_raw, uint64_t kernel_raw_size, void *ramdisk_raw, uint64_t ramdisk_size, void *dtb_raw, uint64_t dtb_raw_size, void *dtbo_raw, uint64_t dtbo_raw_size, char *options);
void droidboot_internal_pre_ramdisk_load(void *kernel_raw, uint64_t kernel_raw_size);
void *droidboot_internal_get_kernel_load_addr();
void *droidboot_internal_get_ramdisk_load_addr();
void *droidboot_internal_get_dtb_load_addr();
Expand Down

0 comments on commit 81020d6

Please sign in to comment.