Display and control your Android device
Fix warnings
Romain Vimont31d9d5611730
diff --git a/app/src/receiver.c b/app/src/receiver.cindex 23944d5a..33bbf8b5 100644--- a/app/src/receiver.c+++ b/app/src/receiver.c@@ -23,7 +23,7 @@ receiver_destroy(struct receiver *receiver) {}static void-process_msg(struct receiver *receiver, struct device_msg *msg) {+process_msg(struct device_msg *msg) {switch (msg->type) {case DEVICE_MSG_TYPE_CLIPBOARD:LOGI("Device clipboard copied");@@ -33,7 +33,7 @@ process_msg(struct receiver *receiver, struct device_msg *msg) {}static ssize_t-process_msgs(struct receiver *receiver, const unsigned char *buf, size_t len) {+process_msgs(const unsigned char *buf, size_t len) {size_t head = 0;for (;;) {struct device_msg msg;@@ -45,7 +45,7 @@ process_msgs(struct receiver *receiver, const unsigned char *buf, size_t len) {return head;}- process_msg(receiver, &msg);+ process_msg(&msg);device_msg_destroy(&msg);head += r;@@ -72,7 +72,7 @@ run_receiver(void *data) {break;}- ssize_t consumed = process_msgs(receiver, buf, r);+ ssize_t consumed = process_msgs(buf, r);if (consumed == -1) {// an error occurredbreak;diff --git a/app/src/scrcpy.c b/app/src/scrcpy.cindex 673ec678..06e20e26 100644--- a/app/src/scrcpy.c+++ b/app/src/scrcpy.c@@ -201,6 +201,7 @@ handle_event(SDL_Event *event, bool control) {static boolevent_loop(bool display, bool control) {+ (void) display;#ifdef CONTINUOUS_RESIZING_WORKAROUNDif (display) {SDL_AddEventWatch(event_watcher, NULL);@@ -256,6 +257,7 @@ sdl_priority_from_av_level(int level) {static voidav_log_callback(void *avcl, int level, const char *fmt, va_list vl) {+ (void) avcl;SDL_LogPriority priority = sdl_priority_from_av_level(level);if (priority == 0) {return;diff --git a/app/src/screen.c b/app/src/screen.cindex 4cc7cde3..5c1fdab3 100644--- a/app/src/screen.c+++ b/app/src/screen.c@@ -185,8 +185,8 @@ screen_init_rendering(struct screen *screen, const char *window_title,window_flags |= SDL_WINDOW_BORDERLESS;}- int x = window_x != -1 ? window_x : SDL_WINDOWPOS_UNDEFINED;- int y = window_y != -1 ? window_y : SDL_WINDOWPOS_UNDEFINED;+ int x = window_x != -1 ? window_x : (int) SDL_WINDOWPOS_UNDEFINED;+ int y = window_y != -1 ? window_y : (int) SDL_WINDOWPOS_UNDEFINED;screen->window = SDL_CreateWindow(window_title, x, y,window_size.width, window_size.height,window_flags);