Build error fix for -Werror=sign-conversion

-resolves https://gitlab.freedesktop.org/emersion/libliftoff/-/issues/83

Signed-off-by: Joel Winarske <joel.winarske@gmail.com>
This commit is contained in:
Joel Winarske 2024-11-20 15:15:47 -08:00
parent 07fbf14332
commit c157adb452
2 changed files with 2 additions and 2 deletions

View file

@ -420,7 +420,7 @@ check_alloc_valid(struct liftoff_output *output, struct alloc_result *result,
static bool static bool
check_plane_output_compatible(struct liftoff_plane *plane, struct liftoff_output *output) check_plane_output_compatible(struct liftoff_plane *plane, struct liftoff_output *output)
{ {
return (plane->possible_crtcs & (1 << output->crtc_index)) != 0; return (plane->possible_crtcs & (1UL << output->crtc_index)) != 0;
} }
static int static int

View file

@ -51,7 +51,7 @@ pick_crtc(int drm_fd, drmModeRes *drm_res, drmModeConnector *connector)
for (j = 0; !found && j < drm_res->count_crtcs; j++) { for (j = 0; !found && j < drm_res->count_crtcs; j++) {
/* Can the CRTC drive the connector? */ /* Can the CRTC drive the connector? */
if (enc->possible_crtcs & (1 << j)) { if (enc->possible_crtcs & (1UL << j)) {
crtc_id = drm_res->crtcs[j]; crtc_id = drm_res->crtcs[j];
found = true; found = true;
} }