From 1602e33ba1311c36344f5ab0362ca65dfc88aece Mon Sep 17 00:00:00 2001 From: Richard Frith-MacDonald Date: Sat, 13 Jul 2013 07:58:07 +0000 Subject: [PATCH] minor 64bit issues git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/ec/trunk@36881 72102866-910b-0410-8b05-ffd578937521 --- EcAlarmSinkSNMP.m | 2 +- EcAlerter.m | 3 ++- EcControl.m | 5 +---- EcProcess.h | 19 ++++++++++--------- EcProcess.m | 7 +------ NSFileHandle+Printf.h | 2 +- 6 files changed, 16 insertions(+), 22 deletions(-) diff --git a/EcAlarmSinkSNMP.m b/EcAlarmSinkSNMP.m index 9c00e96..624a2b7 100644 --- a/EcAlarmSinkSNMP.m +++ b/EcAlarmSinkSNMP.m @@ -591,7 +591,7 @@ init_EcAlarmSink(void) tinfo->max_column = COLUMN_OBJECTID; netsnmp_tdata_register(reg, objectsTable, tinfo); - /* Create the alarms table as a red-only item for SNMP. + /* Create the alarms table as a read-only item for SNMP. */ reg = netsnmp_create_handler_registration( "alarmsTable", diff --git a/EcAlerter.m b/EcAlerter.m index 4243c63..9a1ca36 100644 --- a/EcAlerter.m +++ b/EcAlerter.m @@ -364,7 +364,8 @@ replaceFields(NSDictionary *fields, NSString *template) { return [NSString stringWithFormat: @"%@ -\nConfigured with %u rules\n" @"With SMTP %@:%@ as %@\nPending Email:%@\nPending SMS:%@", - [super description], [rules count], eHost, ePort, eFrom, email, sms]; + [super description], (unsigned)[rules count], eHost, ePort, + eFrom, email, sms]; } - (void) flushEmailForAddress: (NSString*)address diff --git a/EcControl.m b/EcControl.m index faed197..2b329e9 100644 --- a/EcControl.m +++ b/EcControl.m @@ -1987,7 +1987,6 @@ static NSString* cmdWord(NSArray* a, unsigned int pos) NSString *repair; NSString *spacing1; NSString *spacing2; - int minutes; instance = [alarm moInstance]; if ([instance length] == 0) @@ -2032,8 +2031,6 @@ static NSString* cmdWord(NSArray* a, unsigned int pos) spacing2 = @", "; } - minutes = (0.0 - [[alarm eventDate] timeIntervalSinceNow]) / 60.0; - identifier = [NSString stringWithFormat: @"%d", [alarm notificationID]]; alarm = [[alarm copy] autorelease]; @@ -2702,7 +2699,7 @@ static NSString* cmdWord(NSArray* a, unsigned int pos) e = [NSString stringWithFormat: @"%@ top-level is not a dictionary.\n", path]; ASSIGN(configFailed, e); - [[self cmdLogFile: logname] printf: @"%n", configFailed]; + [[self cmdLogFile: logname] printf: @"%@", configFailed]; return NO; } diff --git a/EcProcess.h b/EcProcess.h index 8d70f38..6c25a5f 100644 --- a/EcProcess.h +++ b/EcProcess.h @@ -368,7 +368,7 @@ extern NSString* cmdVersion(NSString *ver); - (NSArray*) alarms; /** Convenience method to clear an alarm as produced by the - * -alarmConfiguratonFor:specificProblem:perceivedSeverity:additionalText: + * -alarmConfigurationFor:specificProblem:additionalText:critical: * method. */ - (void) clearConfigurationFor: (NSString*)managedObject @@ -451,7 +451,7 @@ extern NSString* cmdVersion(NSString *ver); /** Send a SEVERE error message to the server by calling the * -cmdAlert:arguments: method. */ -- (void) cmdAlert: (NSString*)fmt, ...; +- (void) cmdAlert: (NSString*)fmt, ... NS_FORMAT_FUNCTION(1,2); /** Archives debug log files into the specified subdirectory of the debug * logging directory. If subdir is nil then a subdirectory name corresponding @@ -466,7 +466,7 @@ extern NSString* cmdVersion(NSString *ver); /** Send a log message to the server by calling the -cmdAudit:arguments: method. */ -- (void) cmdAudit: (NSString*)fmt, ...; +- (void) cmdAudit: (NSString*)fmt, ... NS_FORMAT_FUNCTION(1,2); /** Handles loss of connection to the server. */ @@ -485,7 +485,8 @@ extern NSString* cmdVersion(NSString *ver); /** Send a debug message - as long as the debug mode specified as 'type' * is currently set. Operates by calling the -cmdDbg:msg:arguments: method. */ -- (void) cmdDbg: (NSString*)type msg: (NSString*)fmt, ...; +- (void) cmdDbg: (NSString*)type + msg: (NSString*)fmt, ... NS_FORMAT_FUNCTION(1,3); /** Send a debug message with debug mode 'defaultMode'.
* Calls the -cmdDbg:msg:arguments: method. @@ -495,7 +496,7 @@ extern NSString* cmdVersion(NSString *ver); /** Send a debug message with debug mode 'defaultMode'.
* Operates by calling the -cmdDebug:arguments: method. */ -- (void) cmdDebug: (NSString*)fmt, ...; +- (void) cmdDebug: (NSString*)fmt, ... NS_FORMAT_FUNCTION(1,2); /** Called whenever the user defaults are updated (which may be due to a * central configuration in additions to other defaults system changes).
@@ -520,7 +521,7 @@ extern NSString* cmdVersion(NSString *ver); /** Send an error message to the server by calling the * -cmdError:arguments: method. */ -- (void) cmdError: (NSString*)fmt, ...; +- (void) cmdError: (NSString*)fmt, ... NS_FORMAT_FUNCTION(1,2); /** Flush logging information. */ @@ -672,7 +673,7 @@ extern NSString* cmdVersion(NSString *ver); /** Send a warning message to the server. */ -- (void) cmdWarn: (NSString*)fmt, ...; +- (void) cmdWarn: (NSString*)fmt, ... NS_FORMAT_FUNCTION(1,2); /* Return interval between timeouts. */ @@ -740,7 +741,7 @@ extern NSString* cmdVersion(NSString *ver); /** May be used withing cmdMesg... methods to return formatted text to * the Console. */ -- (void) cmdPrintf: (NSString*)fmt, ...; +- (void) cmdPrintf: (NSString*)fmt, ... NS_FORMAT_FUNCTION(1,2); /** Should be over-ridden to perform extra tidy up on shutdown of the * process - should call [super cmdQuit:...] at the end of the method. @@ -885,7 +886,7 @@ extern NSString* cmdVersion(NSString *ver); /** Logs a message iff the process is running in test mode.
* Operates by calling the -ecTestLog:arguments: method. */ -- (void) ecTestLog: (NSString*)fmt, ...; +- (void) ecTestLog: (NSString*)fmt, ... NS_FORMAT_FUNCTION(1,2); /** Returns the directory set as the root for files owned by the ECCL user */ diff --git a/EcProcess.m b/EcProcess.m index 1999ba8..e820fa1 100644 --- a/EcProcess.m +++ b/EcProcess.m @@ -3683,16 +3683,11 @@ NSLog(@"Ignored attempt to set timer interval to %g ... using 10.0", interval); return ([server multiple] == nil) ? NO : YES; } + @end @implementation EcProcess (Private) -// For logging from the Control server. -- (void) log: (NSString*)message type: (EcLogType)t -{ - NSLog(@"%@", message); -} - - (void) cmdMesgrelease: (NSArray*)msg { if ([msg count] == 0) diff --git a/NSFileHandle+Printf.h b/NSFileHandle+Printf.h index 0d6b4a8..9f1b5c5 100644 --- a/NSFileHandle+Printf.h +++ b/NSFileHandle+Printf.h @@ -34,7 +34,7 @@ @interface NSFileHandle (Printf) - (void) printWithFormat: (NSString*)format arguments: (va_list)args; -- (void) printf: (NSString*)format,...; +- (void) printf: (NSString*)format,... NS_FORMAT_FUNCTION(1,2); - (void) puts: (NSString*)text; @end