mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2025-12-26 22:48:19 +00:00
remove void * arithmetic
With -Wpointer-arith, gcc complains about void pointer arithmetic. This is not a big deal with gcc, but could be with other compilers, so it's better to cast to char */uint8_t * before doing the arithmetic on such pointers.
This commit is contained in:
parent
e17767e892
commit
cdba4ead67
@ -8460,7 +8460,7 @@ static inline void red_create_surface(RedWorker *worker, uint32_t surface_id, ui
|
||||
surface->context.stride = stride;
|
||||
surface->context.line_0 = line_0;
|
||||
if (!data_is_valid) {
|
||||
memset(line_0 + (int32_t)(stride * (height - 1)), 0, height*abs(stride));
|
||||
memset((char *)line_0 + (int32_t)(stride * (height - 1)), 0, height*abs(stride));
|
||||
}
|
||||
surface->create.info = NULL;
|
||||
surface->destroy.info = NULL;
|
||||
|
||||
@ -1766,7 +1766,7 @@ static ssize_t reds_stream_sasl_write(RedsStream *s, const void *buf, size_t nby
|
||||
return -1;
|
||||
}
|
||||
|
||||
static ssize_t reds_stream_sasl_read(RedsStream *s, void *buf, size_t nbyte)
|
||||
static ssize_t reds_stream_sasl_read(RedsStream *s, uint8_t *buf, size_t nbyte)
|
||||
{
|
||||
uint8_t encoded[4096];
|
||||
const char *decoded;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user