Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

warning: overflow in conversion from #98

Open
fatalfeel opened this issue Sep 25, 2022 · 1 comment
Open

warning: overflow in conversion from #98

fatalfeel opened this issue Sep 25, 2022 · 1 comment

Comments

@fatalfeel
Copy link

-I/root/fbgui/awtk/3rd/nanovg/gl -I/root/fbgui/awtk/3rd/nanovg/base -I/root/fbgui/awtk/res build/var/awtk/src/lcd/lcd_mem_rgba8888.c
In file included from build/var/awtk/src/lcd/lcd_mem_rgb565.c:35:
/root/fbgui/awtk/src/lcd/lcd_mem.inc: In function ‘lcd_mem_draw_vline’:
/root/fbgui/awtk/src/lcd/lcd_mem.inc:224:16: warning: overflow in conversion from ‘long unsigned int’ to ‘int32_t’ {aka ‘int’} changes value from ‘18446744073709551614’ to ‘-2’ [-Woverflow]
offset = -sizeof(pixel_t);
^
/root/fbgui/awtk/src/lcd/lcd_mem.inc: In function ‘lcd_mem_draw_glyph4’:
/root/fbgui/awtk/src/lcd/lcd_mem.inc:339:18: warning: overflow in conversion from ‘long unsigned int’ to ‘wh_t’ {aka ‘int’} changes value from ‘18446744073709551614’ to ‘-2’ [-Woverflow]
d_offset = -sizeof(pixel_t);
^
/root/fbgui/awtk/src/lcd/lcd_mem.inc:343:20: warning: overflow in conversion from ‘long unsigned int’ to ‘wh_t’ {aka ‘int’} changes value from ‘18446744073709551614’ to ‘-2’ [-Woverflow]
dst_offset = -sizeof(pixel_t);
^
/root/fbgui/awtk/src/lcd/lcd_mem.inc: In function ‘lcd_mem_draw_glyph8’:
/root/fbgui/awtk/src/lcd/lcd_mem.inc:411:18: warning: overflow in conversion from ‘long unsigned int’ to ‘wh_t’ {aka ‘int’} changes value from ‘18446744073709551614’ to ‘-2’ [-Woverflow]
d_offset = -sizeof(pixel_t);
^
/root/fbgui/awtk/src/lcd/lcd_mem.inc:415:20: warning: overflow in conversion from ‘long unsigned int’ to ‘wh_t’ {aka ‘int’} changes value from ‘18446744073709551614’ to ‘-2’ [-Woverflow]
dst_offset = -sizeof(pixel_t);
^
In file included from build/var/awtk/src/lcd/lcd_mem_rgb888.c:35:
/root/fbgui/awtk/src/lcd/lcd_mem.inc: In function ‘lcd_mem_draw_vline’:
/root/fbgui/awtk/src/lcd/lcd_mem.inc:224:16: warning: overflow in conversion from ‘long unsigned int’ to ‘int32_t’ {aka ‘int’} changes value from ‘18446744073709551613’ to ‘-3’ [-Woverflow]
offset = -sizeof(pixel_t);
^
/root/fbgui/awtk/src/lcd/lcd_mem.inc: In function ‘lcd_mem_draw_glyph4’:
/root/fbgui/awtk/src/lcd/lcd_mem.inc:339:18: warning: overflow in conversion from ‘long unsigned int’ to ‘wh_t’ {aka ‘int’} changes value from ‘18446744073709551613’ to ‘-3’ [-Woverflow]
d_offset = -sizeof(pixel_t);
^
/root/fbgui/awtk/src/lcd/lcd_mem.inc:343:20: warning: overflow in conversion from ‘long unsigned int’ to ‘wh_t’ {aka ‘int’} changes value from ‘18446744073709551613’ to ‘-3’ [-Woverflow]
dst_offset = -sizeof(pixel_t);
^
/root/fbgui/awtk/src/lcd/lcd_mem.inc: In function ‘lcd_mem_draw_glyph8’:
/root/fbgui/awtk/src/lcd/lcd_mem.inc:411:18: warning: overflow in conversion from ‘long unsigned int’ to ‘wh_t’ {aka ‘int’} changes value from ‘18446744073709551613’ to ‘-3’ [-Woverflow]
d_offset = -sizeof(pixel_t);
^
/root/fbgui/awtk/src/lcd/lcd_mem.inc:415:20: warning: overflow in conversion from ‘long unsigned int’ to ‘wh_t’ {aka ‘int’} changes value from ‘18446744073709551613’ to ‘-3’ [-Woverflow]
dst_offset = -sizeof(pixel_t);
^
In file included from build/var/awtk/src/lcd/lcd_mem_rgba8888.c:35:
/root/fbgui/awtk/src/lcd/lcd_mem.inc: In function ‘lcd_mem_draw_vline’:
/root/fbgui/awtk/src/lcd/lcd_mem.inc:224:16: warning: overflow in conversion from ‘long unsigned int’ to ‘int32_t’ {aka ‘int’} changes value from ‘18446744073709551612’ to ‘-4’ [-Woverflow]
offset = -sizeof(pixel_t);
^
/root/fbgui/awtk/src/lcd/lcd_mem.inc: In function ‘lcd_mem_draw_glyph4’:
/root/fbgui/awtk/src/lcd/lcd_mem.inc:339:18: warning: overflow in conversion from ‘long unsigned int’ to ‘wh_t’ {aka ‘int’} changes value from ‘18446744073709551612’ to ‘-4’ [-Woverflow]
d_offset = -sizeof(pixel_t);
^
/root/fbgui/awtk/src/lcd/lcd_mem.inc:343:20: warning: overflow in conversion from ‘long unsigned int’ to ‘wh_t’ {aka ‘int’} changes value from ‘18446744073709551612’ to ‘-4’ [-Woverflow]
dst_offset = -sizeof(pixel_t);
^
/root/fbgui/awtk/src/lcd/lcd_mem.inc: In function ‘lcd_mem_draw_glyph8’:
/root/fbgui/awtk/src/lcd/lcd_mem.inc:411:18: warning: overflow in conversion from ‘long unsigned int’ to ‘wh_t’ {aka ‘int’} changes value from ‘18446744073709551612’ to ‘-4’ [-Woverflow]
d_offset = -sizeof(pixel_t);
^
/root/fbgui/awtk/src/lcd/lcd_mem.inc:415:20: warning: overflow in conversion from ‘long unsigned int’ to ‘wh_t’ {aka ‘int’} changes value from ‘18446744073709551612’ to ‘-4’ [-Woverflow]
dst_offset = -sizeof(pixel_t);

@fatalfeel
Copy link
Author

fatalfeel commented Sep 25, 2022

/root/fbgui/awtk-linux-fb/build/var/awtk/src/tkc/types_def.h
typedef int32_t xy_t;
typedef int32_t wh_t;

/root/fbgui/awtk/src/lcd/lcd_mem.inc
//wh_t offset = sizeof(pixel_t);
//to
size_t d_offset = sizeof(pixel_t); //fixed
~~also need modify others
size_t dst_offset = line_length;
size_t offset = 0;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant