View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002553 | SOGo | SOPE | public | 2013-12-18 06:14 | 2014-02-04 13:58 |
Reporter | buzzdee | Assigned To | ludovic | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | amd64 | OS | OpenBSD | OS Version | 5.4-current |
Product Version | 2.1.1b | ||||
Target Version | 2.2.0 | Fixed in Version | 2.2.0 | ||
Summary | 0002553: fix compilation warnings in sope-core/NGExtensions/FdExt | ||||
Description | attached patch fixes the following warnings: NSProcessInfo+misc.m:71:48: warning: format specifies type 'unsigned int' but the argument has type 'time_t' (aka 'long long') [-Wformat]
| ||||
Tags | No tags attached. | ||||
fix-warnings-in-sope-core-NGExtensions-FdExt.diff (6,006 bytes)
$OpenBSD$ --- sope-core/NGExtensions/FdExt.subproj/NGPropertyListParser.m.orig Mon Dec 16 07:37:27 2013 +++ sope-core/NGExtensions/FdExt.subproj/NGPropertyListParser.m Mon Dec 16 07:38:24 2013 @@ -456,7 +456,7 @@ static NSException *_makeException(NSException *_excep register unsigned pos; const unsigned char *startPos, *endPos; - for (pos = _idx; (pos >= 0) && (_buffer[pos] != '\n'); pos--) + for (pos = _idx; (pos > 0) && (_buffer[pos] != '\n'); pos--) ; startPos = &(_buffer[pos + 1]); $OpenBSD$ --- sope-core/NGExtensions/FdExt.subproj/NSProcessInfo+misc.m.orig Wed Dec 4 17:51:26 2013 +++ sope-core/NGExtensions/FdExt.subproj/NSProcessInfo+misc.m Tue Dec 17 07:11:27 2013 @@ -68,7 +68,7 @@ NSString *s; cnt++; s = [NSString stringWithFormat: - @"%04X%X%02X.tmp", getpid(), time(NULL), + @"%04X%llX%02X.tmp", getpid(), (long long)time(NULL), cnt]; return [_prefix stringByAppendingString:s]; } $OpenBSD$ --- sope-core/NGExtensions/FdExt.subproj/NSString+Encoding.m.orig Mon Dec 16 07:15:13 2013 +++ sope-core/NGExtensions/FdExt.subproj/NSString+Encoding.m Mon Dec 16 07:16:45 2013 @@ -197,7 +197,7 @@ static char *iconv_wrapper(id self, char *_src, unsign inbuf = NULL; outbuf = NULL; - if ((type == (iconv_t)-1)) { + if (type == (iconv_t)-1) { [self logWithFormat:@"%s: Could not handle iconv encoding. FromEncoding:%@" @" to encoding:%@", __PRETTY_FUNCTION__, _fromEncode, _toEncode]; goto CLEAR_AND_RETURN; $OpenBSD$ --- sope-core/NGExtensions/FdExt.subproj/NSString+Escaping.m.orig Mon Dec 16 07:17:30 2013 +++ sope-core/NGExtensions/FdExt.subproj/NSString+Escaping.m Mon Dec 16 07:18:17 2013 @@ -71,7 +71,7 @@ } - (NSString *)stringByEscapingCharactersFromSet:(NSCharacterSet *)_escSet - usingStringEscaping:(<NGStringEscaping>)_esc + usingStringEscaping:(id <NGStringEscaping>)_esc { NSMutableString *safeString; unsigned length; $OpenBSD$ --- sope-core/NGExtensions/FdExt.subproj/NSString+Ext.m.orig Mon Dec 16 07:11:20 2013 +++ sope-core/NGExtensions/FdExt.subproj/NSString+Ext.m Mon Dec 16 07:14:18 2013 @@ -64,16 +64,16 @@ - (NSString *)stringByTrimmingTailWhiteSpaces { // should check 'whitespaceAndNewlineCharacterSet' .. - unsigned len; + NSUInteger len; if ((len = [self length]) > 0) { unichar *buf; - unsigned idx; + NSUInteger idx; buf = calloc(len + 1, sizeof(unichar)); [self getCharacters:buf]; - for (idx = (len - 1); (idx >= 0) && (buf[idx] == 32); idx--) + for (idx = (len - 1); (idx > 0) && (buf[idx] == 32); idx--) ; self = [NSString stringWithCharacters:buf length:(idx + 1)]; $OpenBSD$ --- sope-core/NGExtensions/FdExt.subproj/NSString+misc.m.orig Wed Dec 4 17:51:26 2013 +++ sope-core/NGExtensions/FdExt.subproj/NSString+misc.m Tue Dec 17 07:15:41 2013 @@ -23,12 +23,6 @@ #include "NSString+misc.h" #include "common.h" -@interface NSStringVariableBindingException : NSException -@end - -@implementation NSStringVariableBindingException -@end - @implementation NSObject(StringBindings) - (NSString *)valueForStringBinding:(NSString *)_key { @@ -56,9 +50,10 @@ if (pos + 1 == len) { /* last entry */ if (wbuf[pos] == '$') { /* found $ without end-char */ - [[[NSStringVariableBindingException alloc] - initWithFormat:@"did not find end of variable for string %@", self] - raise]; + [[NSException exceptionWithName: @"NSStringVariableBindingException" + reason:[NSString stringWithFormat: + @"did not find end of variable for string %@", self] + userInfo:nil] raise]; } break; } @@ -84,9 +79,10 @@ break; } if (pos == len) { /* end of string was reached */ - [[[NSStringVariableBindingException alloc] - initWithFormat:@"did not find end of variable for string %@", self] - raise]; + [[NSException exceptionWithName: @"NSStringVariableBindingException" + reason:[NSString stringWithFormat: + @"did not find end of variable for string %@", self] + userInfo:nil] raise]; } else { NSString *key = nil; @@ -119,9 +115,10 @@ while (pos < len) { if (pos + 1 == len) { /* last entry */ if (wbuf[pos] == '$') { /* found $ without end-char */ - [[[NSStringVariableBindingException alloc] - initWithFormat:@"did not find end of variable for string %@", self] - raise]; + [[NSException exceptionWithName: @"NSStringVariableBindingException" + reason:[NSString stringWithFormat: + @"did not find end of variable for string %@", self] + userInfo:nil] raise]; } break; } @@ -145,9 +142,10 @@ break; } if (pos == len) { /* end of string was reached */ - [[[NSStringVariableBindingException alloc] - initWithFormat:@"did not find end of variable for string %@", - self] raise]; + [[NSException exceptionWithName: @"NSStringVariableBindingException" + reason:[NSString stringWithFormat: + @"did not find end of variable for string %@", self] + userInfo:nil] raise]; } else { NSString *key; @@ -159,10 +157,13 @@ if ((value = [_bindings valueForStringBinding:key]) == nil) { if (_unknown == nil) { - [[[NSStringVariableBindingException alloc] - initWithFormat:@"did not find binding for " - @"name %@ in binding-dictionary %@", - [key autorelease], _bindings] raise]; + [[NSException exceptionWithName: + @"NSStringVariableBindingException" + reason:[NSString stringWithFormat: + @"did not find binding for " + @"name %@ in binding-dictionary %@", + [key autorelease], _bindings] + userInfo:nil] raise]; } else value = _unknown; |
|
ping |
|
https://github.com/inverse-inc/sope/commit/0261eafb19da1e46be7ed589ef9517007793b875 |
|
Date Modified | Username | Field | Change |
---|---|---|---|
2013-12-18 06:14 | buzzdee | New Issue | |
2013-12-18 06:14 | buzzdee | File Added: fix-warnings-in-sope-core-NGExtensions-FdExt.diff | |
2014-01-15 18:29 | buzzdee | Note Added: 0006397 | |
2014-02-04 00:06 | ludovic | Target Version | => 2.2.0 |
2014-02-04 13:58 | ludovic | Note Added: 0006483 | |
2014-02-04 13:58 | ludovic | Status | new => closed |
2014-02-04 13:58 | ludovic | Assigned To | => ludovic |
2014-02-04 13:58 | ludovic | Resolution | open => fixed |
2014-02-04 13:58 | ludovic | Fixed in Version | => 2.2.0 |