From: Cameron Cawley Date: Thu, 25 Sep 2025 14:11:14 +0000 (+0100) Subject: Fix -Wstrict-prototypes warnings X-Git-Tag: 2.3.0-rc1~21 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=46cf4706ea527400847a2a3659acfd36c3ef8ec9;p=thirdparty%2Fzlib-ng.git Fix -Wstrict-prototypes warnings --- diff --git a/arch/arm/arm_features.c b/arch/arm/arm_features.c index d591a3bd..fa48c4aa 100644 --- a/arch/arm/arm_features.c +++ b/arch/arm/arm_features.c @@ -25,7 +25,7 @@ # include #endif -static int arm_has_crc32() { +static int arm_has_crc32(void) { #if defined(__linux__) && defined(ARM_AUXV_HAS_CRC32) # ifdef HWCAP_CRC32 return (getauxval(AT_HWCAP) & HWCAP_CRC32) != 0 ? 1 : 0; @@ -61,7 +61,7 @@ static int arm_has_crc32() { /* AArch64 has neon. */ #if !defined(__aarch64__) && !defined(_M_ARM64) && !defined(_M_ARM64EC) -static inline int arm_has_neon() { +static inline int arm_has_neon(void) { #if defined(__linux__) && defined(ARM_AUXV_HAS_NEON) # ifdef HWCAP_ARM_NEON return (getauxval(AT_HWCAP) & HWCAP_ARM_NEON) != 0 ? 1 : 0; @@ -89,7 +89,7 @@ static inline int arm_has_neon() { /* AArch64 does not have ARMv6 SIMD. */ #if !defined(__aarch64__) && !defined(_M_ARM64) && !defined(_M_ARM64EC) -static inline int arm_has_simd() { +static inline int arm_has_simd(void) { #if defined(__linux__) && defined(HAVE_SYS_AUXV_H) const char *platform = (const char *)getauxval(AT_PLATFORM); return strncmp(platform, "v6l", 3) == 0 diff --git a/arch/riscv/riscv_features.c b/arch/riscv/riscv_features.c index 1580af42..25aed5fd 100644 --- a/arch/riscv/riscv_features.c +++ b/arch/riscv/riscv_features.c @@ -13,7 +13,7 @@ #define ISA_V_HWCAP (1 << ('v' - 'a')) #define ISA_ZBC_HWCAP (1 << 29) -int Z_INTERNAL is_kernel_version_greater_or_equal_to_6_5() { +int Z_INTERNAL is_kernel_version_greater_or_equal_to_6_5(void) { struct utsname buffer; if (uname(&buffer) == -1) { // uname failed diff --git a/gzlib.c b/gzlib.c index 8235d719..498073a6 100644 --- a/gzlib.c +++ b/gzlib.c @@ -24,7 +24,7 @@ static void gz_reset(gz_state *); static gzFile gz_open(const void *, int, const char *); /* Initialize struct for gzFile state */ -static gzFile gz_state_init() { +static gzFile gz_state_init(void) { /* allocate gzFile structure to return */ gz_state *state = (gz_state *)zng_alloc(sizeof(gz_state)); if (state == NULL)