From 81206794eefe67c4cc53c2de119d931d5660ca78 Mon Sep 17 00:00:00 2001 From: Thomas Van Lenten Date: Mon, 27 Nov 2023 16:03:59 -0500 Subject: [PATCH] Fix issues with `-Wstrict-prototypes`. Declare functions with not args with `(void)` not `()` --- DebugUtils/GTMMethodCheck.h | 2 +- Foundation/GTMTimeUtils.m | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/DebugUtils/GTMMethodCheck.h b/DebugUtils/GTMMethodCheck.h index 644e8feb..a307929a 100644 --- a/DebugUtils/GTMMethodCheck.h +++ b/DebugUtils/GTMMethodCheck.h @@ -52,7 +52,7 @@ NS_ASSUME_NONNULL_BEGIN // implementation for |method| (either a class method or an instance method). #define GTM_METHOD_CHECK_INNER_INNER(class, method, line) \ __attribute__ ((constructor, visibility("hidden"))) \ - static void xxGTMMethodCheckMethod ## class ## line () { \ + static void xxGTMMethodCheckMethod ## class ## line (void) { \ @autoreleasepool { \ if (![class instancesRespondToSelector:@selector(method)] \ && ![class respondsToSelector:@selector(method)]) { \ diff --git a/Foundation/GTMTimeUtils.m b/Foundation/GTMTimeUtils.m index 2b551e41..ed687792 100644 --- a/Foundation/GTMTimeUtils.m +++ b/Foundation/GTMTimeUtils.m @@ -59,13 +59,13 @@ struct timeval GTMAppLaunchTimeRelativeTo1970(void) { return info.kp_proc.p_starttime; } -NSDate *GTMAppLaunchDate() { +NSDate *GTMAppLaunchDate(void) { NSTimeInterval ti = GTMTimeValToNSTimeInterval(GTMAppLaunchTimeRelativeTo1970()); return [NSDate dateWithTimeIntervalSince1970:ti]; } -NSDate *GTMBootDate() { +NSDate *GTMBootDate(void) { NSTimeInterval ti = GTMTimeValToNSTimeInterval(GTMBootTimeRelativeTo1970()); return [NSDate dateWithTimeIntervalSince1970:ti];