1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
|
Description: Cast to intptr_t to avoid compiler warnings.
Author: Yavor Doganov <yavor@gnu.org>
Forwarded: http://savannah.nongnu.org/bugs/?42496
Bug-Debian: https://bugs.debian.org/749748
Last-Update: 2014-06-03
---
--- gnustep-netclasses.orig/Source/NetBase.m
+++ gnustep-netclasses/Source/NetBase.m
@@ -367,13 +367,13 @@
if ([anObject conformsToProtocol: @protocol(NetPort)])
{
- desc = (void *)[anObject desc];
+ desc = (void *)(intptr_t)[anObject desc];
[portArray addObject: anObject];
}
else if ([anObject conformsToProtocol: @protocol(NetObject)])
{
- desc = (void *)[[anObject transport] desc];
+ desc = (void *)(intptr_t)[[anObject transport] desc];
[netObjectArray addObject: anObject];
}
@@ -404,13 +404,13 @@
{
whichOne = portArray;
- desc = (void *)[anObject desc];
+ desc = (void *)(intptr_t)[anObject desc];
}
else if ([netObjectArray containsObject: anObject])
{
whichOne = netObjectArray;
- desc = (void *)[[anObject transport] desc];
+ desc = (void *)(intptr_t)[[anObject transport] desc];
[[NSRunLoop currentRunLoop] removeEvent: desc
type: ET_WDESC forMode: NSDefaultRunLoopMode all: YES];
@@ -456,10 +456,10 @@
{
int desc = [aTransport desc];
- if ((id)NSMapGet(descTable, (void *)desc))
+ if ((id)NSMapGet(descTable, (void *)(intptr_t)desc))
{
[[NSRunLoop currentRunLoop] addEvent:
- (void *)desc type: ET_WDESC watcher: self
+ (void *)(intptr_t)desc type: ET_WDESC watcher: self
forMode: NSDefaultRunLoopMode];
}
return self;
|