screen-share: define variable type before using as function argument

Define the void pointer as pixman_region32_t instead of using it
directly.

Void pointers are used by generic API's so each user can define
a data type as needed. Not doing this is dangerous, since void
pointers implicitly cast from/to any pointer without giving
warnings. So we must define its type instead of using it directly
in a function call.

Signed-off-by: Leandro Ribeiro <leandrohr@riseup.net>
This commit is contained in:
Leandro Ribeiro 2019-12-03 18:32:05 -03:00 committed by Daniel Stone
parent 1b3ad0993b
commit 2a6cfef07e
1 changed files with 2 additions and 1 deletions

View File

@ -819,6 +819,7 @@ shared_output_repainted(struct wl_listener *listener, void *data)
struct shared_output *so =
container_of(listener, struct shared_output, frame_listener);
pixman_region32_t damage;
pixman_region32_t *current_damage = data;
struct ss_shm_buffer *sb;
int32_t x, y, width, height, stride;
int i, nrects, do_yflip, y_orig;
@ -847,7 +848,7 @@ shared_output_repainted(struct wl_listener *listener, void *data)
} else {
/* Damage in output coordinates */
pixman_region32_init(&damage);
pixman_region32_intersect(&damage, &so->output->region, data);
pixman_region32_intersect(&damage, &so->output->region, current_damage);
pixman_region32_translate(&damage, -so->output->x, -so->output->y);
}