From 135bcb483e6c14008ee1091d34ee374da8a12938 Mon Sep 17 00:00:00 2001 From: Jake Petroules Date: Sat, 28 Jun 2014 21:11:43 -0400 Subject: [PATCH] Let the compiler know that SULog is a format function. This allows it to warn properly on malformed format strings. --- SUDiskImageUnarchiver.m | 2 +- SULog.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/SUDiskImageUnarchiver.m b/SUDiskImageUnarchiver.m index 72029cb1..1ad7b276 100644 --- a/SUDiskImageUnarchiver.m +++ b/SUDiskImageUnarchiver.m @@ -80,7 +80,7 @@ if (taskResult != 0) { NSString* resultStr = output ? [[[NSString alloc] initWithData: output encoding: NSUTF8StringEncoding] autorelease] : nil; - SULog( @"hdiutil failed with code: %d data: <<%@>>", taskResult, resultStr ); + SULog( @"hdiutil failed with code: %ld data: <<%@>>", (long)taskResult, resultStr ); goto reportError; } mountedSuccessfully = YES; diff --git a/SULog.h b/SULog.h index 7631f95e..00ff2414 100644 --- a/SULog.h +++ b/SULog.h @@ -26,6 +26,6 @@ // ----------------------------------------------------------------------------- void SUClearLog( void ); -void SULog( NSString* format, ... ); +void SULog( NSString* format, ... ) NS_FORMAT_FUNCTION(1,2);