]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Fix -Wstrict-prototypes warnings
authorCameron Cawley <ccawley2011@gmail.com>
Thu, 25 Sep 2025 14:11:14 +0000 (15:11 +0100)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Sat, 27 Sep 2025 13:07:29 +0000 (15:07 +0200)
arch/arm/arm_features.c
arch/riscv/riscv_features.c
gzlib.c

index d591a3bdfc5ef4816d2b2a62c508e5e4d7d8a50c..fa48c4aaf1ba9639d3a8f04eedca18e72dc9410b 100644 (file)
@@ -25,7 +25,7 @@
 #  include <windows.h>
 #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
index 1580af42b8f2fc3e5c934c954eba70e83140ba5f..25aed5fd5ded239769185d08f99c9df764198f72 100644 (file)
@@ -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 8235d7191dc7468f72a43f3368f69c1f46b5bad6..498073a666db76c4e2497d6c972bad9b82915199 100644 (file)
--- 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)