diff options
author | Dan McGee <dpmcgee@gmail.com> | 2012-02-13 13:53:32 -0600 |
---|---|---|
committer | Alon Levy <alevy@redhat.com> | 2012-02-14 10:44:49 +0200 |
commit | aebe837d3ae58f7bbd48bcb010680c1b95f8dc6a (patch) | |
tree | 843c50c502ce5090f8adff68176ba568be738a56 /server/reds.c | |
parent | 5868c99da65610898202a5cc896e36e4835b5b87 (diff) | |
download | spice-aebe837d3ae58f7bbd48bcb010680c1b95f8dc6a.tar.gz spice-aebe837d3ae58f7bbd48bcb010680c1b95f8dc6a.tar.xz spice-aebe837d3ae58f7bbd48bcb010680c1b95f8dc6a.zip |
Add casts for compatibility purposes
Some non-Linux platforms return a (caddr_t *) result for the return
value of mmap(), which is very unfortunate. Add a (void *) cast to
explicitly avoid the warning when compiling with -Werror.
For the IO vector related stuff, signed vs. unsigned comes into play so
adding a (void *) cast here is technically correct for all platforms.
Signed-off-by: Dan McGee <dpmcgee@gmail.com>
Diffstat (limited to 'server/reds.c')
-rw-r--r-- | server/reds.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/server/reds.c b/server/reds.c index 828ba654..ab0dfaff 100644 --- a/server/reds.c +++ b/server/reds.c @@ -3623,7 +3623,7 @@ static int do_spice_init(SpiceCoreInterface *core_interface) if (ftruncate(fd, REDS_STAT_SHM_SIZE) == -1) { red_error("statistics ftruncate failed, %s", strerror(errno)); } - reds->stat = mmap(NULL, REDS_STAT_SHM_SIZE, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); + reds->stat = (SpiceStat *)mmap(NULL, REDS_STAT_SHM_SIZE, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); if (reds->stat == (SpiceStat *)MAP_FAILED) { red_error("statistics mmap failed, %s", strerror(errno)); } |