From 0209b2c932994e9ca55d39d98a83ea02aacd1332 Mon Sep 17 00:00:00 2001 From: Flavio Cruz Date: Sat, 18 Mar 2023 23:18:11 -0400 Subject: Modernize code by removing use of old style definitions. Also add -Werror=old-style-definition to enforce new code. Message-Id: --- pfinet/glue-include/linux/sched.h | 2 +- pfinet/linux-src/net/ipv6/ip6_flowlabel.c | 4 ++-- pfinet/linux-src/net/ipv6/route_ipv6.c | 2 +- pfinet/main.c | 2 +- pfinet/mapped-time.h | 4 ++-- pfinet/timer-emul.c | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) (limited to 'pfinet') diff --git a/pfinet/glue-include/linux/sched.h b/pfinet/glue-include/linux/sched.h index 2446e88c..b91c3edf 100644 --- a/pfinet/glue-include/linux/sched.h +++ b/pfinet/glue-include/linux/sched.h @@ -79,7 +79,7 @@ struct semaphore { }; static inline int -suser () +suser (void) { return current->isroot; }; diff --git a/pfinet/linux-src/net/ipv6/ip6_flowlabel.c b/pfinet/linux-src/net/ipv6/ip6_flowlabel.c index 4a34b878..802551c7 100644 --- a/pfinet/linux-src/net/ipv6/ip6_flowlabel.c +++ b/pfinet/linux-src/net/ipv6/ip6_flowlabel.c @@ -604,7 +604,7 @@ done: #endif -void ip6_flowlabel_init() +void ip6_flowlabel_init(void) { #ifdef CONFIG_PROC_FS struct proc_dir_entry *ent; @@ -618,7 +618,7 @@ void ip6_flowlabel_init() #endif } -void ip6_flowlabel_cleanup() +void ip6_flowlabel_cleanup(void) { del_timer(&ip6_fl_gc_timer); #ifdef CONFIG_PROC_FS diff --git a/pfinet/linux-src/net/ipv6/route_ipv6.c b/pfinet/linux-src/net/ipv6/route_ipv6.c index 5f79a226..d404ae5c 100644 --- a/pfinet/linux-src/net/ipv6/route_ipv6.c +++ b/pfinet/linux-src/net/ipv6/route_ipv6.c @@ -542,7 +542,7 @@ static void ip6_link_failure(struct sk_buff *skb) } } -static int ip6_dst_gc() +static int ip6_dst_gc(void) { static unsigned expire = 30*HZ; static unsigned long last_gc; diff --git a/pfinet/main.c b/pfinet/main.c index e3e027c7..7d85c469 100644 --- a/pfinet/main.c +++ b/pfinet/main.c @@ -169,7 +169,7 @@ sigterm_handler (int signo) } void -arrange_shutdown_notification () +arrange_shutdown_notification (void) { error_t err; mach_port_t initport, notify; diff --git a/pfinet/mapped-time.h b/pfinet/mapped-time.h index 01f2dcc8..1d37affd 100644 --- a/pfinet/mapped-time.h +++ b/pfinet/mapped-time.h @@ -9,13 +9,13 @@ extern volatile struct mapped_time_value *mapped_time; extern long long root_jiffies; static inline int -read_mapped_secs () +read_mapped_secs (void) { return mapped_time->seconds; } static inline int -fetch_jiffies () +fetch_jiffies (void) { struct timeval tv; long long j; diff --git a/pfinet/timer-emul.c b/pfinet/timer-emul.c index e2ed3a26..f1686741 100644 --- a/pfinet/timer-emul.c +++ b/pfinet/timer-emul.c @@ -156,7 +156,7 @@ init_timer (struct timer_list *timer) } void -init_time () +init_time (void) { error_t err; struct timeval tp; -- cgit v1.2.3