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:
Adam Jackson 2021-01-26 14:11:52 -05:00 committed by Marge Bot
parent b882857d28
commit 36ea1758fd

View file

@ -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++) {