From 969a720a87a3d9bbcaf360c3daab7ed5281b5594 Mon Sep 17 00:00:00 2001 From: helge Date: Mon, 25 Apr 2005 21:34:03 +0000 Subject: [PATCH] fixed gcc 4.0 warnings git-svn-id: http://svn.opengroupware.org/SOPE/trunk@777 e4a50df8-12e2-0310-a44c-efbce7f8a7e3 --- sope-ldap/NGLdap/ChangeLog | 4 ++++ sope-ldap/NGLdap/NGLdapAttribute.m | 2 +- sope-ldap/NGLdap/NGLdapURL.m | 9 +++++---- sope-ldap/NGLdap/Version | 2 +- 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/sope-ldap/NGLdap/ChangeLog b/sope-ldap/NGLdap/ChangeLog index e7dba7eb..88926e93 100644 --- a/sope-ldap/NGLdap/ChangeLog +++ b/sope-ldap/NGLdap/ChangeLog @@ -1,3 +1,7 @@ +2005-04-25 Helge Hess + + * fixed gcc 4.0 warnings (v4.5.23) + 2005-03-08 Helge Hess * NGLdapConnection.m: fixed not to do unauthenticated binds (related to diff --git a/sope-ldap/NGLdap/NGLdapAttribute.m b/sope-ldap/NGLdap/NGLdapAttribute.m index 4cbd3cfd..2fa4cf12 100644 --- a/sope-ldap/NGLdap/NGLdapAttribute.m +++ b/sope-ldap/NGLdap/NGLdapAttribute.m @@ -104,7 +104,7 @@ return [self->values count]; } -- (void)addValue:(id)_value { +- (void)addValue:(NSData *)_value { self->didChange = YES; if (self->values == nil) diff --git a/sope-ldap/NGLdap/NGLdapURL.m b/sope-ldap/NGLdap/NGLdapURL.m index c989e765..014bbe5a 100644 --- a/sope-ldap/NGLdap/NGLdapURL.m +++ b/sope-ldap/NGLdap/NGLdapURL.m @@ -113,7 +113,7 @@ static void NGEscapeUrlBuffer } else { // any other char is escaped .. *_dest = '%'; _dest++; - sprintf(_dest, "%02X", (unsigned)*src); + sprintf((char *)_dest, "%02X", (unsigned)*src); _dest += 2; } src++; @@ -128,15 +128,16 @@ static NSString *NGEscapeUrlString(NSString *_source) { if ((len = [_source cStringLength]) == 0) return _source; - cstr = malloc(len + 1); + cstr = malloc(len + 3); [_source getCString:cstr]; cstr[len] = '\0'; - if (NGContainsUrlInvalidCharacters(cstr)) { // needs to be escaped ? + if (NGContainsUrlInvalidCharacters((unsigned char *)cstr)) { + // needs to be escaped ? char *buffer = NULL; buffer = NGMallocAtomic([_source cStringLength] * 3 + 2); - NGEscapeUrlBuffer(cstr, buffer); + NGEscapeUrlBuffer((unsigned char *)cstr, (unsigned char *)buffer); s = [[[NSString alloc] initWithCStringNoCopy:buffer diff --git a/sope-ldap/NGLdap/Version b/sope-ldap/NGLdap/Version index 4aced839..9b70b742 100644 --- a/sope-ldap/NGLdap/Version +++ b/sope-ldap/NGLdap/Version @@ -2,4 +2,4 @@ MAJOR_VERSION=4 MINOR_VERSION=5 -SUBMINOR_VERSION:=22 +SUBMINOR_VERSION:=23 -- 2.39.5