summaryrefslogtreecommitdiffstats
path: root/src/blueshift_drm_c.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-04-11 21:49:54 +0200
committerMattias Andrée <maandree@operamail.com>2014-04-11 21:49:54 +0200
commit80a321118cc46c357a317b8668998d13f8c8b062 (patch)
tree81f43a1eb00fb48d78568a3cc71ee77e955ba80b /src/blueshift_drm_c.c
parenthotplugging does work, can operate on CRTC:s without any attached monitors (diff)
downloadblueshift-80a321118cc46c357a317b8668998d13f8c8b062.tar.gz
blueshift-80a321118cc46c357a317b8668998d13f8c8b062.tar.bz2
blueshift-80a321118cc46c357a317b8668998d13f8c8b062.tar.xz
add more warnings
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'src/blueshift_drm_c.c')
-rw-r--r--src/blueshift_drm_c.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/blueshift_drm_c.c b/src/blueshift_drm_c.c
index 368991a..a900685 100644
--- a/src/blueshift_drm_c.c
+++ b/src/blueshift_drm_c.c
@@ -114,14 +114,14 @@ int blueshift_drm_open_card(int card_index)
}
if (card_connection_reuse_ptr)
- rc = *(card_connection_reusables + --card_connection_reuse_ptr);
+ rc = (int)*(card_connection_reusables + --card_connection_reuse_ptr);
else
{
if (card_connection_size == 0)
card_connections = malloc((card_connection_size = 8) * sizeof(card_connection));
else if (card_connection_ptr == card_connection_size)
card_connections = realloc(card_connections, (card_connection_size <<= 1) * sizeof(card_connection));
- rc = card_connection_ptr++;
+ rc = (int)(card_connection_ptr++);
}
(card_connections + rc)->fd = fd;
@@ -162,7 +162,7 @@ void blueshift_drm_close_card(int connection)
free(card->connectors);
close(card->fd);
- if ((size_t)connection + 1U == card_connection_reuse_ptr)
+ if ((size_t)connection + 1 == card_connection_reuse_ptr)
card_connection_reuse_ptr--;
else
{
@@ -422,10 +422,10 @@ long blueshift_drm_get_edid(int connection, int connector_index, char* edid, lon
drmModePropertyRes* prop = drmModeGetProperty(fd, connector->props[prop_i]);
if (!strcmp("EDID", prop->name))
{
- drmModePropertyBlobRes* blob = drmModeGetPropertyBlob(fd, connector->prop_values[prop_i]);
+ drmModePropertyBlobRes* blob = drmModeGetPropertyBlob(fd, (uint32_t)(connector->prop_values[prop_i]));
if (hexadecimal)
{
- uint32_t n = size / 2;
+ uint32_t n = (uint32_t)size / 2;
uint32_t i;
rc += blob->length;
if (n < blob->length)
@@ -438,7 +438,7 @@ long blueshift_drm_get_edid(int connection, int connector_index, char* edid, lon
}
else
{
- uint32_t len = blob->length < size ? blob->length : size;
+ uint32_t len = blob->length < size ? blob->length : (uint32_t)size;
memcpy(edid, blob->data, (size_t)len * sizeof(char));
}
drmModeFreePropertyBlob(blob);