[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
libobjc2 runtime warning I don't understand why I get it
From: |
Sebastian Reitenbach |
Subject: |
libobjc2 runtime warning I don't understand why I get it |
Date: |
Wed, 26 Jun 2013 09:17:08 +0200 |
User-agent: |
SOGoMail 2.0.6 |
I get the following runtime warning from libobjc2 in debug mode:
Calling [SnifferController -handlePacket:] with incorrect signature. Method
has v12@0:4@8, selector has v12@0:4r*8
- handlePacket is defined in my libpcap wrapper GSPcap.h as a delegate
protocol, the application has to implement:
@protocol GSPcapDelegate
-(void) handlePacket: (NSData *) _packet;
@end
and in GSPcap.m its called like this:
/*
* callback function called from pcap_loop
*/
void
got_packet(u_char *args, const struct pcap_pkthdr *header, const u_char *packet)
{
NSData *pData = [NSData dataWithBytes:packet length:header->len];
if ([[(id)args delegate] conformsToProtocol:@protocol(GSPcapDelegate)])
{
[(id<GSPcapDelegate>)[(id)args delegate] handlePacket:pData];
}
}
The SnifferController, part of my application implements the protocol
SnifferController.h:-(void)handlePacket: (NSData *)_packet;
SnifferController.m:-(void)handlePacket: (NSData *)_packet
and while compiling, I don't get any warnings.
Now, I don't understand why I get the warning from libobjc2, anything I do
wrong?
Before I changed it to use NSData * as parameter, I just passed (const char *)
to it,
and I did not got the warning when running the application.
Sebastian
- libobjc2 runtime warning I don't understand why I get it,
Sebastian Reitenbach <=