Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=57711
-- v3: wpcap: Fix callback signature.
From: Hans Leidekker hans@codeweavers.com
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=57711 --- dlls/wpcap/tests/wpcap.c | 8 ++++---- dlls/wpcap/wpcap.c | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/dlls/wpcap/tests/wpcap.c b/dlls/wpcap/tests/wpcap.c index 33a45ef066b..4977f785a7c 100644 --- a/dlls/wpcap/tests/wpcap.c +++ b/dlls/wpcap/tests/wpcap.c @@ -86,7 +86,7 @@ static int (CDECL *ppcap_datalink_name_to_val)( const char * ); static const char * (CDECL *ppcap_datalink_val_to_description)( int ); static const char * (CDECL *ppcap_datalink_val_to_name)( int ); static int (CDECL *ppcap_dispatch)( pcap_t *, int, - void (CALLBACK *)(unsigned char *, const struct pcap_pkthdr *, const unsigned char *), + void (CDECL *)(unsigned char *, const struct pcap_pkthdr *, const unsigned char *), unsigned char * ); static pcap_dumper_t * (CDECL *ppcap_dump_open)( pcap_t *, const char * ); static void (CDECL *ppcap_dump)( unsigned char *, const struct pcap_pkthdr *, const unsigned char * ); @@ -107,7 +107,7 @@ static int (CDECL *ppcap_list_tstamp_types)( pcap_t *, int ** ); static char * (CDECL *ppcap_lookupdev)( char * ); static int (CDECL *ppcap_lookupnet)( const char *, unsigned int *, unsigned int *, char * ); static int (CDECL *ppcap_loop)( pcap_t *, int, - void (CALLBACK *)(unsigned char *, const struct pcap_pkthdr *, const unsigned char *), + void (CDECL *)(unsigned char *, const struct pcap_pkthdr *, const unsigned char *), unsigned char * ); static int (CDECL *ppcap_set_buffer_size)( pcap_t *, int ); static int (CDECL *ppcap_set_datalink)( pcap_t *, int ); @@ -121,7 +121,7 @@ static int CDECL (*ppcap_tstamp_type_name_to_val)( const char * ); static const char * (CDECL *ppcap_tstamp_type_val_to_description)( int ); static const char * (CDECL *ppcap_tstamp_type_val_to_name)( int );
-static void CALLBACK capture_callback( unsigned char *user, const struct pcap_pkthdr *hdr, const unsigned char *bytes ) +static void CDECL capture_callback( unsigned char *user, const struct pcap_pkthdr *hdr, const unsigned char *bytes ) { trace( "user %p hdr %p byte %p\n", user, hdr, bytes ); } @@ -266,7 +266,7 @@ static void test_datalink( void ) ok( !strcmp(str, "Ethernet"), "got %s\n", wine_dbgstr_a(str) ); }
-static void CALLBACK dump_callback( unsigned char *user, const struct pcap_pkthdr *hdr, const unsigned char *bytes ) +static void CDECL dump_callback( unsigned char *user, const struct pcap_pkthdr *hdr, const unsigned char *bytes ) { trace( "user %p hdr %p bytes %p\n", user, hdr, bytes ); ppcap_dump( user, hdr, bytes ); diff --git a/dlls/wpcap/wpcap.c b/dlls/wpcap/wpcap.c index de4bac33871..4274e9c90eb 100644 --- a/dlls/wpcap/wpcap.c +++ b/dlls/wpcap/wpcap.c @@ -963,7 +963,7 @@ const unsigned char * CDECL pcap_next( struct pcap *pcap, struct pcap_pkthdr_win }
int CDECL pcap_dispatch( struct pcap *pcap, int count, - void (CALLBACK *callback)(unsigned char *, const struct pcap_pkthdr_win32 *, const unsigned char *), + void (CDECL *callback)(unsigned char *, const struct pcap_pkthdr_win32 *, const unsigned char *), unsigned char *user ) { int processed = 0; @@ -996,7 +996,7 @@ int CDECL pcap_dispatch( struct pcap *pcap, int count, }
int CDECL pcap_loop( struct pcap *pcap, int count, - void (CALLBACK *callback)(unsigned char *, const struct pcap_pkthdr_win32 *, const unsigned char *), + void (CDECL *callback)(unsigned char *, const struct pcap_pkthdr_win32 *, const unsigned char *), unsigned char *user) { int processed = 0;
Hi,
It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated.
The tests also ran into some preexisting test failures. If you know how to fix them that would be helpful. See the TestBot job for the details:
The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=150999
Your paranoid android.
=== debian11b (64 bit WoW report) ===
user32: input.c:4305: Test succeeded inside todo block: button_down_hwnd_todo 1: got MSG_TEST_WIN hwnd 0000000001FF0104, msg WM_LBUTTONDOWN, wparam 0x1, lparam 0x320032
v3: fix tests as well
Thanks.