output: fix maybe-uninitialized warning

GCC is complaining about a maybe-uninitialized variable when doing a
release build. Even if that can't actually happen because all enum
values are handled, add an abort call to silence the warning.
This commit is contained in:
Simon Ser 2020-04-10 17:00:05 +02:00 committed by Drew DeVault
parent 83c1ba7783
commit 0281b58d2f
1 changed files with 3 additions and 2 deletions

View File

@ -480,12 +480,13 @@ static void output_pending_resolution(struct wlr_output *output, int *width,
case WLR_OUTPUT_STATE_MODE_FIXED: case WLR_OUTPUT_STATE_MODE_FIXED:
*width = output->pending.mode->width; *width = output->pending.mode->width;
*height = output->pending.mode->height; *height = output->pending.mode->height;
break; return;
case WLR_OUTPUT_STATE_MODE_CUSTOM: case WLR_OUTPUT_STATE_MODE_CUSTOM:
*width = output->pending.custom_mode.width; *width = output->pending.custom_mode.width;
*height = output->pending.custom_mode.height; *height = output->pending.custom_mode.height;
break; return;
} }
abort();
} else { } else {
*width = output->width; *width = output->width;
*height = output->height; *height = output->height;