+2005-04-24 Helge Hess <helge.hess@opengroupware.org>
+
+ * fixed gcc 4.0 warnings (v4.5.158)
+
2005-04-04 Marcus Mueller <znek@mulle-kybernetik.com>
* FdExt.subproj/NSObject+Logs.m: fixed previously broken implementation
if (doAbort()) abort();
if ((sig = [_invocation methodSignature])) {
- const unsigned char *ret;
+ const char *ret;
if ((ret = [sig methodReturnType])) {
switch (*ret) {
dict = [NSMutableDictionary dictionaryWithCapacity:res];
if (res > 0) [dict setObject:_int(pid) forKey:@"pid"];
- if (res > 1) [dict setObject:[NSString stringWithCString:comm]
+ if (res > 1) [dict setObject:[NSString stringWithCString:(char *)comm]
forKey:@"comm"];
if (res > 2) [dict setObject:[NSString stringWithCString:&state length:1]
forKey:@"state"];
unsigned char nbuf[16];
unsigned int k;
- sprintf(nbuf, "&#%i;", (int)chars[i]);
+ sprintf((char *)nbuf, "&#%i;", (int)chars[i]);
for (k = 0; nbuf[k] != '\0'; k++) {
buf[j] = nbuf[k];
j++;
unsigned char nbuf[16];
unsigned int k;
- sprintf(nbuf, "&#%i;", (int)chars[i]);
+ sprintf((char *)nbuf, "&#%i;", (int)chars[i]);
for (k = 0; nbuf[k] != '\0'; k++) {
buf[j] = nbuf[k];
j++;
}
else { // any other char is escaped ..
*_dest = '%'; _dest++;
- sprintf(_dest, "%02X", (unsigned)*src);
+ sprintf((char *)_dest, "%02X", (unsigned)*src);
_dest += 2;
}
}
- (NSString *)stringByUnescapingURL {
/*
- input is a URL string - per definition ASCII(?!), like "hello%98%88.txt"
+ Input is a URL string - per definition ASCII(?!), like "hello%98%88.txt"
output is a unicode string (never longer than the input)
Note that the input itself is in some encoding! That is, the input is
cstr[len] = '\0';
buffer = malloc(len + 4);
- NGUnescapeUrlBuffer(cstr, buffer);
+ NGUnescapeUrlBuffer((unsigned char *)cstr, (unsigned char *)buffer);
if (doUseUTF8Encoding()) {
/* OK, the input is considered UTF-8 encoded in a string */
s = [[NSString alloc] initWithUTF8String:buffer];
- if (buffer) free(buffer);
+ if (buffer != NULL) free(buffer); buffer = NULL;
}
else {
s = [[NSString alloc]
length:strlen(buffer)
freeWhenDone:YES];
}
- if (cstr) free(cstr);
+ if (cstr != NULL) free(cstr); cstr = NULL;
return [s autorelease];
}
return @"";
buffer = malloc(len * 3 + 2);
- NGEscapeUrlBuffer([data bytes], buffer, len);
+ NGEscapeUrlBuffer([data bytes], (unsigned char *)buffer, len);
}
else {
unsigned char *cstr;
len = [self cStringLength];
cstr = malloc(len + 4);
- [self getCString:cstr]; // Unicode!
+ [self getCString:(char *)cstr]; // Unicode!
cstr[len] = '\0';
buffer = malloc(len * 3 + 2);
- NGEscapeUrlBuffer(cstr, buffer, len);
+ NGEscapeUrlBuffer(cstr, (unsigned char *)buffer, len);
if (cstr) free(cstr);
}
unsigned char nbuf[16];
unsigned int k;
- sprintf(nbuf, "&#%i;", (int)chars[i]);
+ sprintf((char *)nbuf, "&#%i;", (int)chars[i]);
for (k = 0; nbuf[k] != '\0'; k++) {
buf[j] = nbuf[k];
j++;
@implementation NGDirEntry
-- (id)initWithFileManager:(id)_fm path:(NSString *)_path {
+- (id)initWithFileManager:(id<NSObject, NGFileManager>)_fm path:(NSString *)_p{
self->fileManager = [_fm retain];
- self->path = [_path copy];
+ self->path = [_p copy];
return self;
}
[super dealloc];
}
+/* operations */
+
- (NSString *)readdir {
NSString *s;
}
s = [self->e nextObject];
- //NSLog(@"readdir: %@", s);
+ // [self logWithFormat:@"readdir: %@", s];
return s;
}
pn = [processInfo processName];
len = [pn cStringLength];
processName = malloc(len + 4);
- [pn getCString:processName];
+ [pn getCString:(char *)processName];
}
-static __inline__ unsigned char * levelPrefixForEvent(NGLogEvent *_event) {
+static __inline__ unsigned char *levelPrefixForEvent(NGLogEvent *_event) {
switch ([_event level]) {
- case NGLogLevelWarn: return "[WARN] ";
- case NGLogLevelError: return "[ERROR] ";
- case NGLogLevelFatal: return "[FATAL] ";
- default: return "";
+ case NGLogLevelWarn: return (unsigned char *)"[WARN] ";
+ case NGLogLevelError: return (unsigned char *)"[ERROR] ";
+ case NGLogLevelFatal: return (unsigned char *)"[FATAL] ";
+ default: return (unsigned char *)"";
}
}
#if !LIB_FOUNDATION_LIBRARY
names[i] = [NSString stringWithCString:ivarName];
#else
- names[i] = [NSString stringWithCStringNoCopy:ivarName freeWhenDone:NO];
+ names[i] = [NSString stringWithCStringNoCopy:(char *)ivarName
+ freeWhenDone:NO];
#endif
}
# version
-SUBMINOR_VERSION:=157
+SUBMINOR_VERSION:=158
# v4.3.115 requires libFoundation v1.0.59
# v4.2.72 requires libEOControl v4.2.39