]> git.ipfire.org Git - pakfire.git/commitdiff
Make old-style functions new-style functions
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 4 Oct 2023 16:57:37 +0000 (16:57 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 4 Oct 2023 16:57:37 +0000 (16:57 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/cli/lib/color.c
src/cli/lib/terminal.c
src/libpakfire/arch.c
src/libpakfire/util.c

index 859d5fc24bbfca724c655d22395fcccbe194867c..2ead40eea3d7612fd81a2171a1d2ee29bd93e616 100644 (file)
@@ -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();
        }
index 046a00fccdf79b71612f08f3b3aa085f5291fdf0..90e49648c4ddbf8ebe2f426187ee0ab9d30a3290 100644 (file)
@@ -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);
 }
 
index 18ab74b33982aac5def0e6bf9795231f8f194a1b..4c714277b273248b0e4f4a534dc0e8beb06c8acc 100644 (file)
@@ -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;
index 727438ba610fc055c5ceb4dd2c7c5a1f44c49f72..5a7bddafeefe81d73a476f4af4f4f793a468a432 100644 (file)
@@ -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