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.
master
Simon Ser 5 years ago committed by Drew DeVault
parent 83c1ba7783
commit 0281b58d2f

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

Loading…
Cancel
Save