From 8e7b041f3596e119ee74fcc1a4dece2f1c1e1230 Mon Sep 17 00:00:00 2001 From: Romain Vimont Date: Mon, 23 Oct 2023 21:49:42 +0200 Subject: [PATCH] Add missing `void`s for empty parameter list --- app/src/adb/adb.c | 2 +- app/src/icon.c | 2 +- app/src/scrcpy.c | 2 +- app/tests/test_str.c | 2 +- app/tests/test_vecdeque.c | 4 ++-- app/tests/test_vector.c | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/src/adb/adb.c b/app/src/adb/adb.c index 6bc6dd62..b248b8ed 100644 --- a/app/src/adb/adb.c +++ b/app/src/adb/adb.c @@ -70,7 +70,7 @@ argv_to_string(const char *const *argv, char *buf, size_t bufsize) { } static void -show_adb_installation_msg() { +show_adb_installation_msg(void) { #ifndef __WINDOWS__ static const struct { const char *binary; diff --git a/app/src/icon.c b/app/src/icon.c index a8588dd8..a9aad875 100644 --- a/app/src/icon.c +++ b/app/src/icon.c @@ -271,7 +271,7 @@ error: } SDL_Surface * -scrcpy_icon_load() { +scrcpy_icon_load(void) { char *icon_path = get_icon_path(); if (!icon_path) { return NULL; diff --git a/app/src/scrcpy.c b/app/src/scrcpy.c index aabb7c5a..968629a2 100644 --- a/app/src/scrcpy.c +++ b/app/src/scrcpy.c @@ -297,7 +297,7 @@ sc_timeout_on_timeout(struct sc_timeout *timeout, void *userdata) { // Generate a scrcpy id to differentiate multiple running scrcpy instances static uint32_t -scrcpy_generate_scid() { +scrcpy_generate_scid(void) { struct sc_rand rand; sc_rand_init(&rand); // Only use 31 bits to avoid issues with signed values on the Java-side diff --git a/app/tests/test_str.c b/app/tests/test_str.c index 4fe8a1df..f719bc98 100644 --- a/app/tests/test_str.c +++ b/app/tests/test_str.c @@ -358,7 +358,7 @@ static void test_index_of_column(void) { assert(sc_str_index_of_column(" a bc d", 1, " ") == 2); } -static void test_remove_trailing_cr() { +static void test_remove_trailing_cr(void) { char s[] = "abc\r"; sc_str_remove_trailing_cr(s, sizeof(s) - 1); assert(!strcmp(s, "abc")); diff --git a/app/tests/test_vecdeque.c b/app/tests/test_vecdeque.c index fa3ba963..44d33560 100644 --- a/app/tests/test_vecdeque.c +++ b/app/tests/test_vecdeque.c @@ -102,7 +102,7 @@ static void test_vecdeque_reserve(void) { sc_vecdeque_destroy(&vdq); } -static void test_vecdeque_grow() { +static void test_vecdeque_grow(void) { struct SC_VECDEQUE(int) vdq = SC_VECDEQUE_INITIALIZER; bool ok = sc_vecdeque_reserve(&vdq, 20); @@ -142,7 +142,7 @@ static void test_vecdeque_grow() { sc_vecdeque_destroy(&vdq); } -static void test_vecdeque_push_hole() { +static void test_vecdeque_push_hole(void) { struct SC_VECDEQUE(int) vdq = SC_VECDEQUE_INITIALIZER; bool ok = sc_vecdeque_reserve(&vdq, 20); diff --git a/app/tests/test_vector.c b/app/tests/test_vector.c index 7ca09989..459b4e0f 100644 --- a/app/tests/test_vector.c +++ b/app/tests/test_vector.c @@ -187,7 +187,7 @@ static void test_vector_index_of(void) { sc_vector_destroy(&vec); } -static void test_vector_grow() { +static void test_vector_grow(void) { struct SC_VECTOR(int) vec = SC_VECTOR_INITIALIZER; bool ok;