Skip to content

Commit

Permalink
Fix issues with -Wstrict-prototypes.
Browse files Browse the repository at this point in the history
Declare functions with not args with `(void)` not `()`
  • Loading branch information
thomasvl committed Nov 27, 2023
1 parent ed01273 commit 8120679
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion DebugUtils/GTMMethodCheck.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)]) { \
Expand Down
4 changes: 2 additions & 2 deletions Foundation/GTMTimeUtils.m
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down

0 comments on commit 8120679

Please sign in to comment.