compilation errors with new gcc 12.1.0
Closed this issue · 1 comments
irmen commented
Manjaro linux, gcc 12.1.0:
(note: similar errors occur when compiling the official emulator)
inlined from ‘void render_sprite_line(uint16_t)’ at ../src/vera/vera_video.cpp:410:20,
inlined from ‘void render_line(uint16_t)’ at ../src/vera/vera_video.cpp:747:21:
../src/vera/vera_video.cpp:371:22: warning: writing 16 bytes into a region of size 0 [-Wstringop-overflow=]
371 | *dst = (*src) & 0xf;
| ~~~~~^~~~~~~~~~~~~~
../src/vera/vera_video.cpp: In function ‘void render_line(uint16_t)’:
../src/vera/vera_video.cpp:407:32: note: at offset 64 into destination object ‘unpacked_sprite_line’ of size 64
407 | uint8_t unpacked_sprite_line[64];
| ^~~~~~~~~~~~~~~~~~~~
In function ‘void expand_4bpp_data(uint8_t*, const uint8_t*, int)’,
inlined from ‘void render_sprite_line(uint16_t)’ at ../src/vera/vera_video.cpp:410:20,
inlined from ‘void render_line(uint16_t)’ at ../src/vera/vera_video.cpp:747:21:
../src/vera/vera_video.cpp:371:22: warning: writing 16 bytes into a region of size 0 [-Wstringop-overflow=]
371 | *dst = (*src) & 0xf;
| ~~~~~^~~~~~~~~~~~~~
../src/vera/vera_video.cpp: In function ‘void render_line(uint16_t)’:
../src/vera/vera_video.cpp:407:32: note: at offset 80 into destination object ‘unpacked_sprite_line’ of size 64
407 | uint8_t unpacked_sprite_line[64];
| ^~~~~~~~~~~~~~~~~~~~
In function ‘void expand_4bpp_data(uint8_t*, const uint8_t*, int)’,
inlined from ‘void render_sprite_line(uint16_t)’ at ../src/vera/vera_video.cpp:410:20,
inlined from ‘void render_line(uint16_t)’ at ../src/vera/vera_video.cpp:747:21:
../src/vera/vera_video.cpp:371:22: warning: writing 16 bytes into a region of size 0 [-Wstringop-overflow=]
371 | *dst = (*src) & 0xf;
| ~~~~~^~~~~~~~~~~~~~
../src/vera/vera_video.cpp: In function ‘void render_line(uint16_t)’:
../src/vera/vera_video.cpp:407:32: note: at offset 96 into destination object ‘unpacked_sprite_line’ of size 64
407 | uint8_t unpacked_sprite_line[64];
| ^~~~~~~~~~~~~~~~~~~~
In function ‘void expand_4bpp_data(uint8_t*, const uint8_t*, int)’,
inlined from ‘void render_sprite_line(uint16_t)’ at ../src/vera/vera_video.cpp:410:20,
inlined from ‘void render_line(uint16_t)’ at ../src/vera/vera_video.cpp:747:21:
../src/vera/vera_video.cpp:371:22: warning: writing 16 bytes into a region of size 0 [-Wstringop-overflow=]
371 | *dst = (*src) & 0xf;
| ~~~~~^~~~~~~~~~~~~~
../src/vera/vera_video.cpp: In function ‘void render_line(uint16_t)’:
../src/vera/vera_video.cpp:407:32: note: at offset 112 into destination object ‘unpacked_sprite_line’ of size 64
407 | uint8_t unpacked_sprite_line[64];
| ^~~~~~~~~~~~~~~~~~~~
In function ‘void expand_4bpp_data(uint8_t*, const uint8_t*, int)’,
inlined from ‘void render_sprite_line(uint16_t)’ at ../src/vera/vera_video.cpp:410:20,
inlined from ‘void render_line(uint16_t)’ at ../src/vera/vera_video.cpp:747:21:
../src/vera/vera_video.cpp:371:22: warning: writing 16 bytes into a region of size 0 [-Wstringop-overflow=]
371 | *dst = (*src) & 0xf;
| ~~~~~^~~~~~~~~~~~~~
../src/vera/vera_video.cpp: In function ‘void render_line(uint16_t)’:
../src/vera/vera_video.cpp:407:32: note: at offset 128 into destination object ‘unpacked_sprite_line’ of size 64
407 | uint8_t unpacked_sprite_line[64];
| ^~~~~~~~~~~~~~~~~~~~
In function ‘void expand_4bpp_data(uint8_t*, const uint8_t*, int)’,
inlined from ‘void render_sprite_line(uint16_t)’ at ../src/vera/vera_video.cpp:410:20,
inlined from ‘void render_line(uint16_t)’ at ../src/vera/vera_video.cpp:747:21:
../src/vera/vera_video.cpp:371:22: warning: writing 16 bytes into a region of size 0 [-Wstringop-overflow=]
371 | *dst = (*src) & 0xf;
| ~~~~~^~~~~~~~~~~~~~
../src/vera/vera_video.cpp: In function ‘void render_line(uint16_t)’:
../src/vera/vera_video.cpp:407:32: note: at offset 144 into destination object ‘unpacked_sprite_line’ of size 64
407 | uint8_t unpacked_sprite_line[64];
| ^~~~~~~~~~~~~~~~~~~~
In function ‘void expand_4bpp_data(uint8_t*, const uint8_t*, int)’,
inlined from ‘void render_sprite_line(uint16_t)’ at ../src/vera/vera_video.cpp:410:20,
inlined from ‘void render_line(uint16_t)’ at ../src/vera/vera_video.cpp:747:21:
../src/vera/vera_video.cpp:371:22: warning: writing 16 bytes into a region of size 0 [-Wstringop-overflow=]
371 | *dst = (*src) & 0xf;
| ~~~~~^~~~~~~~~~~~~~
../src/vera/vera_video.cpp: In function ‘void render_line(uint16_t)’:
../src/vera/vera_video.cpp:407:32: note: at offset 160 into destination object ‘unpacked_sprite_line’ of size 64
407 | uint8_t unpacked_sprite_line[64];
| ^~~~~~~~~~~~~~~~~~~~
In function ‘void expand_4bpp_data(uint8_t*, const uint8_t*, int)’,
inlined from ‘void render_sprite_line(uint16_t)’ at ../src/vera/vera_video.cpp:410:20,
inlined from ‘void render_line(uint16_t)’ at ../src/vera/vera_video.cpp:747:21:
../src/vera/vera_video.cpp:371:22: warning: writing 16 bytes into a region of size 0 [-Wstringop-overflow=]
371 | *dst = (*src) & 0xf;
| ~~~~~^~~~~~~~~~~~~~
../src/vera/vera_video.cpp: In function ‘void render_line(uint16_t)’:
../src/vera/vera_video.cpp:407:32: note: at offset 176 into destination object ‘unpacked_sprite_line’ of size 64
407 | uint8_t unpacked_sprite_line[64];
| ^~~~~~~~~~~~~~~~~~~~
In function ‘void expand_4bpp_data(uint8_t*, const uint8_t*, int)’,
inlined from ‘void render_sprite_line(uint16_t)’ at ../src/vera/vera_video.cpp:410:20,
inlined from ‘void render_line(uint16_t)’ at ../src/vera/vera_video.cpp:747:21:
../src/vera/vera_video.cpp:371:22: warning: writing 16 bytes into a region of size 0 [-Wstringop-overflow=]
371 | *dst = (*src) & 0xf;
| ~~~~~^~~~~~~~~~~~~~
../src/vera/vera_video.cpp: In function ‘void render_line(uint16_t)’:
../src/vera/vera_video.cpp:407:32: note: at offset 192 into destination object ‘unpacked_sprite_line’ of size 64
407 | uint8_t unpacked_sprite_line[64];
| ^~~~~~~~~~~~~~~~~~~~
In function ‘void expand_4bpp_data(uint8_t*, const uint8_t*, int)’,
inlined from ‘void render_sprite_line(uint16_t)’ at ../src/vera/vera_video.cpp:410:20,
inlined from ‘void render_line(uint16_t)’ at ../src/vera/vera_video.cpp:747:21:
../src/vera/vera_video.cpp:371:22: warning: writing 16 bytes into a region of size 0 [-Wstringop-overflow=]
371 | *dst = (*src) & 0xf;
| ~~~~~^~~~~~~~~~~~~~
../src/vera/vera_video.cpp: In function ‘void render_line(uint16_t)’:
../src/vera/vera_video.cpp:407:32: note: at offset 208 into destination object ‘unpacked_sprite_line’ of size 64
407 | uint8_t unpacked_sprite_line[64];
| ^~~~~~~~~~~~~~~~~~~~
indigodarkwolf commented
Fixed with 98923a7