diff options
author | Mattias Andrée <maandree@operamail.com> | 2014-08-08 01:34:43 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2014-08-08 01:34:43 +0200 |
commit | 6e10b5d8eae9424b831b673e2ec63e9a64ecfe86 (patch) | |
tree | c8110ec031fbddc330776b960f659d8030f19d0d /src/drmgamma.c | |
parent | doc (diff) | |
download | crt-calibrator-6e10b5d8eae9424b831b673e2ec63e9a64ecfe86.tar.gz crt-calibrator-6e10b5d8eae9424b831b673e2ec63e9a64ecfe86.tar.bz2 crt-calibrator-6e10b5d8eae9424b831b673e2ec63e9a64ecfe86.tar.xz |
warnings + add state.c
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to '')
-rw-r--r-- | src/drmgamma.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/drmgamma.c b/src/drmgamma.c index e0dcbfb..d7e04dc 100644 --- a/src/drmgamma.c +++ b/src/drmgamma.c @@ -197,7 +197,7 @@ int drm_crtc_open(size_t index, drm_card_t* restrict card, drm_crtc_t* restrict crtc->green = crtc->red + crtc->gamma_stops; crtc->blue = crtc->green + crtc->gamma_stops; - for (i = 0; i < crtc->connector->count_props; i++) + for (i = 0; i < (size_t)(crtc->connector->count_props); i++) { size_t j; @@ -210,7 +210,7 @@ int drm_crtc_open(size_t index, drm_card_t* restrict card, drm_crtc_t* restrict blob = drmModeGetPropertyBlob(card->fd, (uint32_t)(crtc->connector->prop_values[i])); - i = crtc->connector->count_props; + i = (size_t)(crtc->connector->count_props); if ((blob == NULL) || (blob->data == NULL)) goto free_blob; @@ -265,7 +265,7 @@ void drm_crtc_close(drm_crtc_t* restrict crtc) int drm_get_gamma(drm_crtc_t* restrict crtc) { int r; - r = drmModeCrtcGetGamma(crtc->card->fd, crtc->id, crtc->gamma_stops, + r = drmModeCrtcGetGamma(crtc->card->fd, crtc->id, (uint32_t)(crtc->gamma_stops), crtc->red, crtc->green, crtc->blue); return -!!r; } @@ -280,7 +280,7 @@ int drm_get_gamma(drm_crtc_t* restrict crtc) int drm_set_gamma(drm_crtc_t* restrict crtc) { int r; - r = drmModeCrtcSetGamma(crtc->card->fd, crtc->id, crtc->gamma_stops, + r = drmModeCrtcSetGamma(crtc->card->fd, crtc->id, (uint32_t)(crtc->gamma_stops), crtc->red, crtc->green, crtc->blue); return -!!r; } |