View Issue Details

IDProjectCategoryView StatusLast Update
0002549SOGoSOPEpublic2014-02-04 13:52
Reporterbuzzdee Assigned Toludovic  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Platformx86_64OSOpenBSDOS Version5.4-current
Product Version2.1.1b 
Target Version2.2.0Fixed in Version2.2.0 
Summary0002549: fix some format strings in sope-xml
Description

Compiling with clang, there are many warnings shown compiling sope. This is just a first patch, this fixes format string warnings in sope-xml:

SaxAttributeList.m:163:34: warning: format specifies type 'unsigned int' but the argument has type 'SaxAttributeList *' [-Wformat]
[s appendFormat:@"<%08X[%@]:", self, NSStringFromClass([self class])];


                     %8@
1 warning generated.

SaxAttributes.m:216:34: warning: format specifies type 'unsigned int' but the argument has type 'SaxAttributes *' [-Wformat]
  [s appendFormat:@&quot;&lt;%08X[%@]:&quot;, self, NSStringFromClass([self class])];
                     ~~~~        ^~~~
                     %8@
1 warning generated.

SaxXMLReaderFactory.m:386:69: warning: data argument not used by format string [-Wformat-extra-args]
  if (debugOn) NSLog(@&quot;%s:   default name ...&quot;,__PRETTY_FUNCTION__, defReader);
                     ~~~~~~~~~~~~~~~~~~~~~~~~~                      ^
1 warning generated.
Steps To Reproduce

compile with clang on 64Bit arch

TagsNo tags attached.

Activities

buzzdee

buzzdee

2013-12-15 12:32

reporter  

sope-xml-format-strings.diff (1,424 bytes)   
$OpenBSD$
--- sope-xml/SaxObjC/SaxAttributeList.m.orig	Sun Dec 15 13:17:43 2013
+++ sope-xml/SaxObjC/SaxAttributeList.m	Sun Dec 15 13:20:19 2013
@@ -160,7 +160,7 @@
   NSUInteger i, c;
   
   s = [[NSMutableString alloc] init];
-  [s appendFormat:@"<%08X[%@]:", self, NSStringFromClass([self class])];
+  [s appendFormat:@"<%p[%@]:", self, NSStringFromClass([self class])];
   
   for (i = 0, c = [self count]; i < c; i++) {
     NSString *type;
$OpenBSD$
--- sope-xml/SaxObjC/SaxAttributes.m.orig	Sun Dec 15 13:20:41 2013
+++ sope-xml/SaxObjC/SaxAttributes.m	Sun Dec 15 13:22:43 2013
@@ -213,7 +213,7 @@
   NSUInteger i, c;
   
   s = [[NSMutableString alloc] init];
-  [s appendFormat:@"<%08X[%@]:", self, NSStringFromClass([self class])];
+  [s appendFormat:@"<%p[%@]:", self, NSStringFromClass([self class])];
   
   for (i = 0, c = [self count]; i < c; i++) {
     NSString *type;
$OpenBSD$
--- sope-xml/SaxObjC/SaxXMLReaderFactory.m.orig	Sun Dec 15 13:22:53 2013
+++ sope-xml/SaxObjC/SaxXMLReaderFactory.m	Sun Dec 15 13:24:47 2013
@@ -383,7 +383,7 @@ NSEnumerator *libraryPaths;
   defReader = 
     [[NSUserDefaults standardUserDefaults] stringForKey:@"XMLReader"];
 
-  if (debugOn) NSLog(@"%s:   default name ...",__PRETTY_FUNCTION__, defReader);
+  if (debugOn) NSLog(@"%s: '%@' default reader",__PRETTY_FUNCTION__, defReader);
   
   if (defReader) {
     if ((reader = [self createXMLReaderWithName:defReader]))
sope-xml-format-strings.diff (1,424 bytes)   
buzzdee

buzzdee

2014-01-15 18:30

reporter   ~0006400

ping

ludovic

ludovic

2014-02-04 13:52

administrator   ~0006480

https://github.com/inverse-inc/sope/commit/2a5b6b2cb1cd1db00b0237c0a3d95fc0de28ac46

Issue History

Date Modified Username Field Change
2013-12-15 12:32 buzzdee New Issue
2013-12-15 12:32 buzzdee File Added: sope-xml-format-strings.diff
2014-01-15 18:30 buzzdee Note Added: 0006400
2014-02-04 00:06 ludovic Target Version => 2.2.0
2014-02-04 13:52 ludovic Note Added: 0006480
2014-02-04 13:52 ludovic Status new => closed
2014-02-04 13:52 ludovic Assigned To => ludovic
2014-02-04 13:52 ludovic Resolution open => fixed
2014-02-04 13:52 ludovic Fixed in Version => 2.2.0