mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-22 21:05:58 +01:00
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:
parent
83c1ba7783
commit
0281b58d2f
1 changed files with 3 additions and 2 deletions
|
@ -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…
Reference in a new issue