Solve compile warnings

This commit is contained in:
Iwan Timmer
2017-05-28 14:46:21 +02:00
parent 91d9aef6ff
commit 343e3992c1
5 changed files with 8 additions and 5 deletions

View File

@@ -17,10 +17,11 @@
* along with Moonlight; if not, see <http://www.gnu.org/licenses/>.
*/
#include "../loop.h"
#include "evdev.h"
#include "keyboard.h"
#include "mapping.h"
#include "../loop.h"
#include "libevdev/libevdev.h"
#include <Limelight.h>

View File

@@ -17,6 +17,8 @@
* along with Moonlight; if not, see <http://www.gnu.org/licenses/>.
*/
#include "mapping.h"
void evdev_create(const char* device, struct mapping* mappings);
void evdev_loop();

View File

@@ -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) {

View File

@@ -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;

View File

@@ -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;