Skip to content

Commit

Permalink
refactor: dont cast to 'void *'
Browse files Browse the repository at this point in the history
warning: cast to 'void *' from smaller integer type 'int'
  • Loading branch information
Xtr126 committed Nov 20, 2023
1 parent f3296f6 commit a868419
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/src/main/cpp/mouse_read.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ void* send_mouse_events(void* context) {

int mouse_fd = pctx->mouse_fd;
int mouse_lock = 1;
ioctl(mouse_fd, EVIOCGRAB, (void *)mouse_lock);
ioctl(mouse_fd, EVIOCGRAB, mouse_lock);

struct input_event ie;
while (read(mouse_fd, &ie, sizeof(struct input_event))) {
Expand All @@ -77,7 +77,7 @@ void* send_mouse_events(void* context) {

if (pctx->mouse_lock != mouse_lock) {
mouse_lock = pctx->mouse_lock;
ioctl(mouse_fd, EVIOCGRAB, (void *)mouse_lock);
ioctl(mouse_fd, EVIOCGRAB, mouse_lock);
}
pthread_mutex_unlock(&pctx->lock);
if (done) {
Expand Down

0 comments on commit a868419

Please sign in to comment.