aboutsummaryrefslogtreecommitdiffstats
path: root/src/output.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2016-07-10 22:15:24 +0200
committerMattias Andrée <maandree@kth.se>2016-07-10 22:15:24 +0200
commita7f0392ccb88f7faa7ca3f15d4ccfcf637896d1d (patch)
tree000db8e2281e951d432b5da7ae212dfc65c6ceb6 /src/output.c
parentAdd makefile (diff)
downloadcoopgammad-a7f0392ccb88f7faa7ca3f15d4ccfcf637896d1d.tar.gz
coopgammad-a7f0392ccb88f7faa7ca3f15d4ccfcf637896d1d.tar.bz2
coopgammad-a7f0392ccb88f7faa7ca3f15d4ccfcf637896d1d.tar.xz
Fix warnings (and two errors)
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'src/output.c')
-rw-r--r--src/output.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/output.c b/src/output.c
index 48a51a8..2e399bf 100644
--- a/src/output.c
+++ b/src/output.c
@@ -151,22 +151,22 @@ size_t output_unmarshal(struct output* this, const char* buf)
this->crtc = NULL;
this->name = NULL;
- this->depth = *(signed*)(buf + off);
+ this->depth = *(const signed*)(buf + off);
off += sizeof(signed);
- this->red_size = *(size_t*)(buf + off);
+ this->red_size = *(const size_t*)(buf + off);
off += sizeof(size_t);
- this->green_size = *(size_t*)(buf + off);
+ this->green_size = *(const size_t*)(buf + off);
off += sizeof(size_t);
- this->blue_size = *(size_t*)(buf + off);
+ this->blue_size = *(const size_t*)(buf + off);
off += sizeof(size_t);
- this->ramps_size = *(size_t*)(buf + off);
+ this->ramps_size = *(const size_t*)(buf + off);
off += sizeof(size_t);
- this->supported = *(enum libgamma_decision*)(buf + off);
+ this->supported = *(const enum libgamma_decision*)(buf + off);
off += sizeof(enum libgamma_decision);
n = strlen(buf + off) + 1;
@@ -179,7 +179,7 @@ size_t output_unmarshal(struct output* this, const char* buf)
if (n == 0)
return 0;
- this->table_size = this->table_alloc = *(size_t*)(buf + off);
+ this->table_size = this->table_alloc = *(const size_t*)(buf + off);
off += sizeof(size_t);
if (this->table_size > 0)
{