]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
lib: fix empty arg function prototypes
authorEric Sandeen <sandeen@redhat.com>
Mon, 10 Mar 2025 18:29:06 +0000 (13:29 -0500)
committerZorro Lang <zlang@kernel.org>
Tue, 11 Mar 2025 20:03:39 +0000 (04:03 +0800)
Several function prototypes used () when in fact they take
arguments. Fix those to make sparse happy.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Zorro Lang <zlang@kernel.org>
include/random_range.h
include/write_log.h
lib/random_range.c
lib/string_to_tokens.c
lib/tlibio.c
lib/write_log.c

index b47aef9ef6197444a6fd98f6cb3fe3942723c533..c352c5a9ccdf9176f7907251d009b7c8ddc279c3 100644 (file)
@@ -6,7 +6,7 @@
 #ifndef _RANDOM_RANGE_H_
 #define _RANDOM_RANGE_H_
 
-int       parse_ranges     ( char *, int, int, int, int (*)(), char **, char ** );
+int       parse_ranges     ( char *, int, int, int, int (*)(char *, int *), char **, char ** );
 int       range_min        ( char *, int );
 int       range_max        ( char *, int );
 int       range_mult       ( char *, int );
index 6b08841679db451ec5d264db09931723f9543851..a7ad2ee4baf79d51c029093174e761041db5e868 100644 (file)
@@ -125,7 +125,7 @@ extern int  wlog_close(struct wlog_file *wfile);
 extern int     wlog_record_write(struct wlog_file *wfile,
                                  struct wlog_rec *wrec, long offset);
 extern int     wlog_scan_backward(struct wlog_file *wfile, int nrecs,
-                                  int (*func)(struct wlog_rec *rec),
+                                  int (*func)(struct wlog_rec *rec, long data),
                                   long data);
 #else
 int    wlog_open();
index 680bf71ca12121fce85fa844d818befe455bcafd..0b38eb7f19b8bdc102c4c5c32c6480a7ef0de8cb 100644 (file)
@@ -69,7 +69,7 @@ struct range {
  * parse_range() returns -1 on error, or the number of ranges parsed.
  */
 
-static int       str_to_int();
+static int       str_to_int(char *str, int *ip);
 static long long divider(long long, long long, long long, long long);
 
 int
@@ -78,7 +78,7 @@ parse_ranges(
        int defmin,
        int defmax,
        int defmult,
-       int (*parse_func)(),
+       int (*parse_func)(char *str, int *ip),
        char **rangeptr,
        char **errptr)
 {
@@ -570,8 +570,6 @@ printf("   diff = %lld, half = %lld,   med = %lld\n", diff, half, med);
 void
 random_range_seed(long s)
 {
-    extern void srand48();
-
     srand48(s);
 }
 
index 08df9fcc0a3ba3266255a5791eb877106f3f23a1..8383ed4c4a777100bbbd661482bc0de3f9093c68 100644 (file)
@@ -54,7 +54,6 @@ int
 string_to_tokens(char *arg_string, char *arg_array[], int array_size, char *separator)
 {
    int num_toks = 0;  /* number of tokens found */
-   char *strtok();
        
    if ( arg_array == NULL || array_size <= 1 || separator == NULL )
        return -1;
index 17ab34ee1f30168380ee6393d01e38ef78e57a78..75f10cecdd3e83a8394d4b6f4c6733a4d00befba 100644 (file)
@@ -75,7 +75,7 @@
 
 
 #ifndef __linux__
-static void lio_async_signal_handler();
+static void lio_async_signal_handler(int sig);
 #endif
 
 /*
index 32567a1c6ac47031dff508799fa22d0b44f04c28..eb3fa2b3f56d1ae66aeea05961c0f47bd4e3af65 100644 (file)
@@ -217,7 +217,7 @@ int
 wlog_scan_backward(
        struct wlog_file        *wfile,
        int                     nrecs,
-       int                     (*func)(),
+       int                     (*func)(struct wlog_rec *, long data),
        long                    data)
 {
        int                     fd, leftover, nbytes, offset, recnum, reclen;