From 140839f97827691d43970329424bd1c0503f3b43 Mon Sep 17 00:00:00 2001
From: Shreenidhi Shedi <sshedi@vmware.com>
Date: Thu, 2 Sep 2021 12:49:39 +0530
Subject: [PATCH 12/12] Use void where functions don't take any arguments

Signed-off-by: Shreenidhi Shedi <sshedi@vmware.com>
---
 src/copyin.c |  2 +-
 src/extern.h |  4 ++--
 src/fatal.c  |  2 +-
 src/global.c |  4 ++--
 src/main.c   |  2 +-
 src/mt.c     | 10 +++++-----
 src/util.c   |  4 ++--
 7 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/src/copyin.c b/src/copyin.c
index 5eb9abc..75f892e 100644
--- a/src/copyin.c
+++ b/src/copyin.c
@@ -342,7 +342,7 @@ create_defered_links_to_skipped (struct cpio_file_stat *file_hdr,
    empty links that are still on the deferments list.  */
 
 static void
-create_final_defers ()
+create_final_defers (void)
 {
   struct deferment *d;
   int	link_res;
diff --git a/src/extern.h b/src/extern.h
index 962df79..91c34e7 100644
--- a/src/extern.h
+++ b/src/extern.h
@@ -99,8 +99,8 @@ extern char input_is_special;
 extern char output_is_special;
 extern char input_is_seekable;
 extern char output_is_seekable;
-extern int (*xstat) ();
-extern void (*copy_function) ();
+extern int (*xstat) (const char *, struct stat *);
+extern void (*copy_function) (void);
 extern char *change_directory_option;
 
 /* copyin.c */
diff --git a/src/fatal.c b/src/fatal.c
index 488c509..8ebf2d3 100644
--- a/src/fatal.c
+++ b/src/fatal.c
@@ -21,7 +21,7 @@
 #include <paxlib.h>
 
 void
-fatal_exit ()
+fatal_exit (void)
 {
   exit (PAXEXIT_FAILURE);
 }
diff --git a/src/global.c b/src/global.c
index cbc35cd..5ee66aa 100644
--- a/src/global.c
+++ b/src/global.c
@@ -186,10 +186,10 @@ bool to_stdout_option = false;
 
 /* A pointer to either lstat or stat, depending on whether
    dereferencing of symlinks is done for input files.  */
-int (*xstat) ();
+int (*xstat) (const char *, struct stat *);
 
 /* Which copy operation to perform. (-i, -o, -p) */
-void (*copy_function) () = 0;
+void (*copy_function) (void) = 0;
 
 char *change_directory_option;
 
diff --git a/src/main.c b/src/main.c
index 487b404..52c30a9 100644
--- a/src/main.c
+++ b/src/main.c
@@ -724,7 +724,7 @@ process_args (int argc, char *argv[])
    buffers.  */
 
 void
-initialize_buffers ()
+initialize_buffers (void)
 {
   int in_buf_size, out_buf_size;
 
diff --git a/src/mt.c b/src/mt.c
index 8022b7c..b89a5fc 100644
--- a/src/mt.c
+++ b/src/mt.c
@@ -186,7 +186,7 @@ static struct argp_option options[] = {
 
 char *tapedev;                   /* tape device */
 char *rsh_command_option = NULL; /* rsh command */
-short operation;                 /* operation code */ 
+short operation;                 /* operation code */
 int count = 1;                   /* count */
 
 int argcnt = 0;                  /* number of command line arguments
@@ -232,7 +232,7 @@ parse_opt (int key, char *arg, struct argp_state *state)
 #endif
 	}
       break;
-      
+
     case 'f':
     case 't':
       tapedev = arg;
@@ -306,7 +306,7 @@ print_status (char *dev, int desc)
 }
 
 void
-fatal_exit ()
+fatal_exit (void)
 {
   exit (MT_EXIT_FAILURE);
 }
@@ -319,7 +319,7 @@ main (int argc, char **argv)
   setlocale (LC_ALL, "");
   bindtextdomain (PACKAGE, LOCALEDIR);
   textdomain (PACKAGE);
-  
+
   set_program_name (argv[0]);
   argp_version_setup ("mt", program_authors);
   argmatch_die = fatal_exit;
@@ -339,7 +339,7 @@ main (int argc, char **argv)
     default:
       tapedesc = rmtopen (tapedev, O_RDONLY, 0, rsh_command_option);
     }
-  
+
   if (tapedesc == -1)
     error (MT_EXIT_INVOP, errno, _("%s: rmtopen failed"), tapedev);
   check_type (tapedev, tapedesc);
diff --git a/src/util.c b/src/util.c
index 6c76c75..edeeb9a 100644
--- a/src/util.c
+++ b/src/util.c
@@ -1403,7 +1403,7 @@ repair_delayed_set_stat (struct cpio_file_stat *file_hdr)
 }
 
 void
-apply_delayed_set_stat ()
+apply_delayed_set_stat (void)
 {
   while (delayed_set_stat_head)
     {
@@ -1504,7 +1504,7 @@ cpio_create_dir (struct cpio_file_stat *file_hdr, int existing_dir)
 }
 
 void
-change_dir ()
+change_dir (void)
 {
   if (change_directory_option && chdir (change_directory_option))
     {
-- 
2.17.1

