From: Michael Tremer Date: Wed, 4 Oct 2023 16:57:37 +0000 (+0000) Subject: Make old-style functions new-style functions X-Git-Tag: 0.9.30~1549 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e898325c20cd72d928f083f8708168cc3c96d151;p=pakfire.git Make old-style functions new-style functions Signed-off-by: Michael Tremer --- diff --git a/src/cli/lib/color.c b/src/cli/lib/color.c index 859d5fc24..2ead40eea 100644 --- a/src/cli/lib/color.c +++ b/src/cli/lib/color.c @@ -42,7 +42,7 @@ static color_mode_t detect_color_mode(void) { return COLORS_ON; } -color_mode_t color_mode() { +color_mode_t color_mode(void) { if (__color_mode == COLORS_UNKNOWN) { __color_mode = detect_color_mode(); } diff --git a/src/cli/lib/terminal.c b/src/cli/lib/terminal.c index 046a00fcc..90e49648c 100644 --- a/src/cli/lib/terminal.c +++ b/src/cli/lib/terminal.c @@ -81,7 +81,7 @@ int cli_term_get_dimensions(int* rows, int* cols) { return 0; } -int cli_term_is_interactive() { +int cli_term_is_interactive(void) { return isatty(STDIN_FILENO) && isatty(STDOUT_FILENO) && isatty(STDERR_FILENO); } diff --git a/src/libpakfire/arch.c b/src/libpakfire/arch.c index 18ab74b33..4c714277b 100644 --- a/src/libpakfire/arch.c +++ b/src/libpakfire/arch.c @@ -91,7 +91,7 @@ PAKFIRE_EXPORT int pakfire_arch_supported(const char* name) { return 0; } -PAKFIRE_EXPORT const char** pakfire_supported_arches() { +PAKFIRE_EXPORT const char** pakfire_supported_arches(void) { static const char* supported_arches[] = { // x86_64 PAKFIRE_ARCHES[0].name, @@ -164,7 +164,7 @@ int __pakfire_arch_buildtarget(char* buffer, size_t length, const char* arch, co return 0; } -PAKFIRE_EXPORT const char* pakfire_arch_native() { +PAKFIRE_EXPORT const char* pakfire_arch_native(void) { struct utsname buf; static __thread const char* arch_native = NULL; diff --git a/src/libpakfire/util.c b/src/libpakfire/util.c index 727438ba6..5a7bddafe 100644 --- a/src/libpakfire/util.c +++ b/src/libpakfire/util.c @@ -359,7 +359,7 @@ char* pakfire_remove_trailing_newline(char* str) { return str; } -const char* pakfire_hostname() { +const char* pakfire_hostname(void) { static __thread char hostname[256]; int r = gethostname(hostname, sizeof(hostname)); @@ -404,7 +404,7 @@ int pakfire_read_file_into_buffer(FILE* f, char** buffer, size_t* len) { return 0; } -char* pakfire_generate_uuid() { +char* pakfire_generate_uuid(void) { uuid_t uuid; // Generate a new random value