URL:
<http://savannah.gnu.org/bugs/?24995>
Summary: NSURLProtocol uses wrong alloc prototype
Project: GNUstep
Submitted by: FredKiefer
Submitted on: Mi 03 Dez 2008 07:45:52 GMT
Category: Base/Foundation
Severity: 3 - Normal
Item Group: Bug
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
_______________________________________________________
Details:
When compiling base I get this warning:
NSURLProtocol.m: In function ‘-[_NSHTTPURLProtocol _got:]’:
NSURLProtocol.m:740: warning: assignment from incompatible pointer type
Looking into the code I see that this line asigns the zalloc function for the
libz. in libz.h (version 1.2.3, July 18th, 2005) the prototype for this
function looks like this:
typedef voidpf (*alloc_func) OF((voidpf opaque, uInt items, uInt size));
and the function we declare to be used is
static void*
zalloc(void *opaque, size_t size)
Clearly there is a mismatch and even a dangerous one, as we might allocate
the wrong amount of data due to this mismatch.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?24995>
_______________________________________________
Nachricht geschickt von/durch Savannah
http://savannah.gnu.org/
_______________________________________________
Bug-gnustep mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-gnustep