mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-01 18:58:10 +02:00
loader: Silence a warning at -Og
../src/loader/loader_dri3_helper.c: In function ‘dri3_free_buffers’:
../src/loader/loader_dri3_helper.c:2022:46: warning: ‘n_id’ may be used uninitialized in this function [-Wmaybe-uninitialized]
2022 | for (buf_id = first_id; buf_id < first_id + n_id; buf_id++) {
Can't happen, mark it unreachable.
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8724>
This commit is contained in:
parent
b882857d28
commit
36ea1758fd
1 changed files with 3 additions and 0 deletions
|
|
@ -2017,6 +2017,9 @@ dri3_free_buffers(__DRIdrawable *driDrawable,
|
|||
first_id = LOADER_DRI3_FRONT_ID;
|
||||
/* Don't free a fake front holding new backbuffer content. */
|
||||
n_id = (draw->cur_blit_source == LOADER_DRI3_FRONT_ID) ? 0 : 1;
|
||||
break;
|
||||
default:
|
||||
unreachable("unhandled buffer_type");
|
||||
}
|
||||
|
||||
for (buf_id = first_id; buf_id < first_id + n_id; buf_id++) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue