From 343e3992c182f402e3ffafaf759f9c2c54314900 Mon Sep 17 00:00:00 2001 From: Iwan Timmer Date: Sun, 28 May 2017 14:46:21 +0200 Subject: [PATCH] Solve compile warnings --- src/input/evdev.c | 5 +++-- src/input/evdev.h | 2 ++ src/input/mapping.c | 2 +- src/input/x11.c | 2 +- src/video/x11.c | 2 +- 5 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/input/evdev.c b/src/input/evdev.c index 2adf713..e26fbbd 100644 --- a/src/input/evdev.c +++ b/src/input/evdev.c @@ -17,10 +17,11 @@ * along with Moonlight; if not, see . */ -#include "../loop.h" +#include "evdev.h" #include "keyboard.h" -#include "mapping.h" + +#include "../loop.h" #include "libevdev/libevdev.h" #include diff --git a/src/input/evdev.h b/src/input/evdev.h index e52319a..c3330e4 100644 --- a/src/input/evdev.h +++ b/src/input/evdev.h @@ -17,6 +17,8 @@ * along with Moonlight; if not, see . */ +#include "mapping.h" + void evdev_create(const char* device, struct mapping* mappings); void evdev_loop(); diff --git a/src/input/mapping.c b/src/input/mapping.c index dd357ba..029f1a7 100644 --- a/src/input/mapping.c +++ b/src/input/mapping.c @@ -61,7 +61,7 @@ struct mapping* mapping_load(char* fileName) { int ret; if ((ret = sscanf(option, "%m[^:]:%ms", &key, &value)) == 2) { int int_value, direction_value; - char flag = NULL; + char flag = 0; if (strcmp("platform", key) == 0) strncpy(map->platform, value, sizeof(map->platform)); else if (sscanf(value, "b%d", &int_value) == 1) { diff --git a/src/input/x11.c b/src/input/x11.c index 1e51579..5f76c53 100644 --- a/src/input/x11.c +++ b/src/input/x11.c @@ -60,7 +60,7 @@ static int x11_handler(int fd) { if (event.xkey.keycode >= 8 && event.xkey.keycode < (sizeof(keyCodes)/sizeof(keyCodes[0]) + 8)) { if ((keyboard_modifiers & MODIFIERS) == MODIFIERS && event.type == KeyRelease) { grabbed = !grabbed; - XDefineCursor(display, window, grabbed ? cursor : NULL); + XDefineCursor(display, window, grabbed ? cursor : 0); } int modifier = 0; diff --git a/src/video/x11.c b/src/video/x11.c index 03de6aa..38f2834 100644 --- a/src/video/x11.c +++ b/src/video/x11.c @@ -100,7 +100,7 @@ int x11_submit_decode_unit(PDECODE_UNIT decodeUnit) { ffmpeg_decode(ffmpeg_buffer, length); AVFrame* frame = ffmpeg_get_frame(); if (frame != NULL) - egl_draw(frame->data); + egl_draw((const unsigned char**) frame->data); } return DR_OK;