]> err.no Git - sope/commitdiff
fixed gcc 4.0 warnings
authorhelge <helge@e4a50df8-12e2-0310-a44c-efbce7f8a7e3>
Sun, 24 Apr 2005 18:43:44 +0000 (18:43 +0000)
committerhelge <helge@e4a50df8-12e2-0310-a44c-efbce7f8a7e3>
Sun, 24 Apr 2005 18:43:44 +0000 (18:43 +0000)
git-svn-id: http://svn.opengroupware.org/SOPE/trunk@771 e4a50df8-12e2-0310-a44c-efbce7f8a7e3

sope-core/NGExtensions/ChangeLog
sope-core/NGExtensions/FdExt.subproj/NSNull+misc.m
sope-core/NGExtensions/FdExt.subproj/NSProcessInfo+misc.m
sope-core/NGExtensions/FdExt.subproj/NSString+HTMLEscaping.m
sope-core/NGExtensions/FdExt.subproj/NSString+URLEscaping.m
sope-core/NGExtensions/FdExt.subproj/NSString+XMLEscaping.m
sope-core/NGExtensions/NGDirectoryEnumerator.m
sope-core/NGExtensions/NGLogging.subproj/NGLogEventDetailedFormatter.m
sope-core/NGExtensions/NGObjCRuntime.m
sope-core/NGExtensions/Version

index e63f6a110b5f1851fbba67332b2a2393409d3af3..f7fcd50eae6c4eb9a2a7267bd8f8fd7c8f70b4af 100644 (file)
@@ -1,3 +1,7 @@
+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
index f74b968b9c19d2d161a7ce4a411f97f858127944..15846eb430dc1cd0975f2b30fa62756ece7777e0 100644 (file)
@@ -169,7 +169,7 @@ static inline BOOL doAbort(void) {
   if (doAbort()) abort();
   
   if ((sig = [_invocation methodSignature])) {
-    const unsigned char *ret;
+    const char *ret;
     
     if ((ret = [sig methodReturnType])) {
       switch (*ret) {
index 6230ecc77424687638fc68cbb64f661939003dea..0c7bc1bb5d3c4d6af6cb54178fa8750e9aa315de 100644 (file)
@@ -228,7 +228,7 @@ static NSNumber *_uint(unsigned int i) {
     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"];
index c61377f8a3749bb732e9b78c6ae938811244df62..9595bdb8b153981745563dd68610bc5a91ada33c 100644 (file)
           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++;
index eb3859245fcf8165e59f5f91aaad2e8f90415012..acd88786e2588000900950afb0ceb5422926902a 100644 (file)
@@ -131,7 +131,7 @@ NGEscapeUrlBuffer(const unsigned char *_source, unsigned char *_dest,
     } 
     else { // any other char is escaped ..
       *_dest = '%'; _dest++;
-      sprintf(_dest, "%02X", (unsigned)*src);
+      sprintf((char *)_dest, "%02X", (unsigned)*src);
       _dest += 2;
     }
   }
@@ -236,7 +236,7 @@ NGUnescapeUrlBuffer(const unsigned char *_source, unsigned char *_dest)
 
 - (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
@@ -258,12 +258,12 @@ NGUnescapeUrlBuffer(const unsigned char *_source, unsigned char *_dest)
   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]
@@ -271,7 +271,7 @@ NGUnescapeUrlBuffer(const unsigned char *_source, unsigned char *_dest)
          length:strlen(buffer)
          freeWhenDone:YES];
   }
-  if (cstr) free(cstr);
+  if (cstr != NULL) free(cstr); cstr = NULL;
   return [s autorelease];
 }
 
@@ -298,18 +298,18 @@ NGUnescapeUrlBuffer(const unsigned char *_source, unsigned char *_dest)
       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);
   
   }
index fa877b3091774b1a335113dd8bd480577018c3d5..cc4e229ea6f422643c3d8e2a6882c8907e330e36 100644 (file)
@@ -80,7 +80,7 @@
           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++;
index f3e48d3eacb527e8514f01690e809944dec05adf..5462cc9ffbb48c185555803a30205c843fa99450 100644 (file)
 
 @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;
 }
index 5a4da75ffd2b858e8c4dba5dbf0ca28932f3fe06..0d51ad14de8ee9cf1a99d949747de897c4690597 100644 (file)
@@ -65,15 +65,15 @@ static char *monthNames[14] = {
   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 *)"";
   }
 }
 
index c95c7b2d2414c3e6fec0c51ce41a95bb473345f2..5c577f0d6451e04f426b95d49c9b48617c15c875 100644 (file)
@@ -679,7 +679,8 @@ fillMethodListWithSpecs(MethodList_t methods, SEL _selector, va_list *va)
 #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
   }
   
index d4e246804e32aac866340a0a0fbd1e1a858b3de5..55539210ce7c3f02c823df40f07b4400c8173230 100644 (file)
@@ -1,6 +1,6 @@
 # version
 
-SUBMINOR_VERSION:=157
+SUBMINOR_VERSION:=158
 
 # v4.3.115 requires libFoundation v1.0.59
 # v4.2.72  requires libEOControl  v4.2.39