I re-post my patches as a big one patch.

On Wed, 2013-02-27 at 17:34 +0100, Jean-Charles BERTIN wrote:
> Some minor fixes introduced when applying my patches in gnustep-base.
> 
> Jean-Charles BERTIN (2):
>   Added NS_REQUIRES_NIL_TERMINATION and NS_FORMAT_FUNCTION macros where
>     is is needed.
>   Fixed warnings in printf-like formats.
> 
>  SQLClient.h | 18 +++++++++---------
>  SQLClient.m |  2 +-
>  2 files changed, 10 insertions(+), 10 deletions(-)
> 
> _______________________________________________
> Gnustep-dev mailing list
> Gnustep-dev@gnu.org
> https://lists.gnu.org/mailman/listinfo/gnustep-dev

-- 
Jean-Charles BERTIN
Axinoe - Software Engineer
Tel.: (+33) (0)1.80.82.59.23
Fax : (+33) (0)1.80.82.59.29
Skype: jcbertin
Web: <http://www.axinoe.com/>
Certificate Authority: <https://ca.axinoe.com/axinoe-root.crt>
diff --git a/SQLClient.h b/SQLClient.h
index 6a3bd4f..1aeed95 100644
--- a/SQLClient.h
+++ b/SQLClient.h
@@ -490,7 +490,7 @@ SQLCLIENT_PRIVATE
  * or -cache:simpleQuery:recordType:listType: methods.
  * </p>
  */
-- (NSString*) buildQuery: (NSString*)stmt,...;
+- (NSString*) buildQuery: (NSString*)stmt, ... NS_REQUIRES_NIL_TERMINATION;
 
 /**
  * Takes the query statement and substitutes in values from
@@ -588,7 +588,7 @@ SQLCLIENT_PRIVATE
  * the number of rows to which the operation applied.  Otherwise this
  * returns -1.
  */
-- (NSInteger) execute: (NSString*)stmt,...;
+- (NSInteger) execute: (NSString*)stmt, ... NS_REQUIRES_NIL_TERMINATION;
 
 /**
  * Takes the statement and substitutes in values from
@@ -703,7 +703,7 @@ SQLCLIENT_PRIVATE
  * <p>Date and timestamp field items are returned as NSDate objects.
  * </p>
  */
-- (NSMutableArray*) query: (NSString*)stmt,...;
+- (NSMutableArray*) query: (NSString*)stmt, ... NS_REQUIRES_NIL_TERMINATION;
 
 /**
  * Takes the query statement and substitutes in values from
@@ -744,7 +744,7 @@ SQLCLIENT_PRIVATE
 /**
  * Produce a quoted string from the supplied arguments (printf style).
  */
-- (NSString*) quotef: (NSString*)fmt, ...;
+- (NSString*) quotef: (NSString*)fmt, ... NS_FORMAT_FUNCTION(1,2);
 
 /**
  * Convert a big (64 bit) integer to a string suitable for use in an SQL query.
@@ -1158,7 +1158,7 @@ SQLCLIENT_PRIVATE
  * (raising an exception if the query did not contain a single record)
  * and returns the resulting record.
  */
-- (SQLRecord*) queryRecord: (NSString*)stmt,...;
+- (SQLRecord*) queryRecord: (NSString*)stmt, ... NS_REQUIRES_NIL_TERMINATION;
 
 /**
  * Executes a query (like the -query:,... method) and checks the result.<br />
@@ -1166,7 +1166,7 @@ SQLCLIENT_PRIVATE
  * if the record did not contain a single field.<br />
  * Returns the resulting field as a <em>string</em>.
  */
-- (NSString*) queryString: (NSString*)stmt,...;
+- (NSString*) queryString: (NSString*)stmt, ... NS_REQUIRES_NIL_TERMINATION;
 
 /**
  * Convenience method to deal with the results of a query where each
@@ -1223,7 +1223,7 @@ SQLCLIENT_PRIVATE
  * The default implementation calls NSLogv to log a debug message.<br />
  * Override this in a category to provide more sophisticated logging.
  */
-- (void) debug: (NSString*)fmt, ...;
+- (void) debug: (NSString*)fmt, ... NS_FORMAT_FUNCTION(1,2);
 
 /**
  * Return the current debugging level.<br />
@@ -1275,7 +1275,7 @@ SQLCLIENT_PRIVATE
  * stmt and the following values (if any).
  */
 - (NSMutableArray*) cache: (int)seconds
-		    query: (NSString*)stmt,...;
+		    query: (NSString*)stmt, ... NS_REQUIRES_NIL_TERMINATION;
 
 /**
  * Calls -cache:simpleQuery:recordType:listType: with the default
@@ -1378,7 +1378,7 @@ SQLCLIENT_PRIVATE
  * [SQLClient-execute:,...] but does not cause any database operation
  * until -execute is called, so it will not raise a database exception.
  */
-- (void) add: (NSString*)stmt,...;
+- (void) add: (NSString*)stmt, ... NS_REQUIRES_NIL_TERMINATION;
 
 /**
  * Adds an SQL statement to the transaction.  This is similar to
diff --git a/SQLClient.m b/SQLClient.m
index 08284c6..4160153 100644
--- a/SQLClient.m
+++ b/SQLClient.m
@@ -1622,7 +1622,7 @@ static unsigned int	maxConnections = 8;
 
 - (NSString*) quoteBigInteger: (int64_t)i
 {
-  return [NSString stringWithFormat: @"%lld", i];
+  return [NSString stringWithFormat: @"%lld", (long long)i];
 }
 
 - (NSString*) quoteCString: (const char *)s

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
Gnustep-dev mailing list
Gnustep-dev@gnu.org
https://lists.gnu.org/mailman/listinfo/gnustep-dev

Reply via email to