apps/testing/driver_test:fix warning
drivertest_lcd.c:234:12: warning: assignment to 'uint16_t *' {aka 'short unsigned int *'} from incompatible pointer type 'uint8_t *' {aka 'unsigned char *'} [-Wincompatible-pointer-types] Signed-off-by: rongyichang <rongyichang@xiaomi.com>
This commit is contained in:
parent
b2d3fb726d
commit
49f81d387a
@ -208,8 +208,8 @@ static void draw_rect(FAR struct fb_info_s *fb_info, int x, int y,
|
||||
int i = 0;
|
||||
int j = 0;
|
||||
int offset = 0;
|
||||
uint32_t *fb_bpp32 = fb_info->fb_mem;
|
||||
uint16_t *fb_bpp16 = fb_info->fb_mem;
|
||||
uint32_t *fb_bpp32 = (uint32_t *)fb_info->fb_mem;
|
||||
uint16_t *fb_bpp16 = (uint16_t *)fb_info->fb_mem;
|
||||
const uint8_t bpp = fb_info->plane_info.bpp;
|
||||
const uint32_t xres = fb_info->video_info.xres;
|
||||
const uint32_t yres = fb_info->video_info.yres;
|
||||
|
@ -231,8 +231,8 @@ static void draw_rect(FAR struct lcd_info_s *lcd_info, int x, int y,
|
||||
draw_area.col_end = y + valid_h - 1;
|
||||
draw_area.data = malloc(valid_w * valid_h * (bpp >> 3));
|
||||
assert_ptr_not_equal(draw_area.data, NULL);
|
||||
fb_bpp16 = draw_area.data;
|
||||
fb_bpp32 = draw_area.data;
|
||||
fb_bpp16 = (uint16_t *)draw_area.data;
|
||||
fb_bpp32 = (uint32_t *)draw_area.data;
|
||||
for (j = 0; j <= (draw_area.col_end - draw_area.col_start); j++)
|
||||
{
|
||||
offset = j * valid_w;
|
||||
|
Loading…
Reference in New Issue
Block a user