[PATCH 04/12] Convert old-style function definitions into modern-style definitions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



With newer compilers (gcc 15.1.1) -Wold-style-definition
flag is set by default which causes warnings for
most of the functions in these files.

    warning: old-style function definition [-Wold-style-definition]

The warnings are remove by converting the old-style
function definitions into modern-style definitions

Signed-off-by: Steve Dickson <steved@xxxxxxxxxx>
---
 src/rpcdname.c |  3 +--
 src/rtime.c    | 11 +++++------
 2 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/src/rpcdname.c b/src/rpcdname.c
index 3e6a988..c3d1353 100644
--- a/src/rpcdname.c
+++ b/src/rpcdname.c
@@ -63,8 +63,7 @@ get_default_domain()
  * get rejected elsewhere in the NIS client package.
  */
 int
-__rpc_get_default_domain(domain)
-	char **domain;
+__rpc_get_default_domain(char **domain)
 {
 	if ((*domain = get_default_domain()) != 0)
 		return (0);
diff --git a/src/rtime.c b/src/rtime.c
index 29fbf0a..5bc52a8 100644
--- a/src/rtime.c
+++ b/src/rtime.c
@@ -62,10 +62,10 @@ extern int _rpc_dtablesize( void );
 static void do_close( int );
 
 int
-rtime(addrp, timep, timeout)
-	struct sockaddr_in *addrp;
-	struct timeval *timep;
-	struct timeval *timeout;
+rtime(
+	struct sockaddr_in *addrp,
+	struct timeval *timep,
+	struct timeval *timeout)
 {
 	int s;
 	struct pollfd fd;
@@ -146,8 +146,7 @@ rtime(addrp, timep, timeout)
 }
 
 static void
-do_close(s)
-	int s;
+do_close(int s)
 {
 	int save;
 
-- 
2.50.1





[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux