THIS IS A TEST INSTANCE. Feel free to ask and answer questions, but take care to avoid triggering too many notifications.
0

Wireshark build error

  • retag add tags

I'm getting the following error while trying to build a plugin for wireshark 3.2.1 on my PC (windows 10)

C:\Users\ravishas\Desktop\wsnew\plugins\epan\expand\packet-expand.c(778,43): warning C4113: 'void (__cdecl *)(tvbuff_t *,packet_info *,proto_tree *)' differs in parameter lists from 'dissector_t' [C:\Development\build_try\plugins\epan\expand\expand.vcxproj]

C:\Users\ravishas\Desktop\wsnew\plugins\epan\expand\packet-expand.c(778,43): warning C4133: 'function': incompatible types - from 'void (__cdecl *)(tvbuff_t *,packet_info *,proto_tree *)' to 'dissector_t' [C:\Development\build_try\plugins\epan\expand\expand.vcxproj]

I have looked into the function and there is an additional " void * " parameter in the dissector_t function. Should that parameter be retained or is there any other workaround?

Thanks in advance

Sriram R's avatar
5
Sriram R
asked 2020-03-05 04:59:47 +0000, updated 2020-03-05 06:13:00 +0000
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

1 Answer

0

I have looked into the function and there is an additional " void * " parameter in the dissector_t function.

Yes, there is. A dissector is handed, as its last argument, a void *, which is a pointer to private data being passed to the dissector. Most dissectors are just passed a null pointer; what it gets passed depends on what's calling it.

Should that parameter be retained

Yes. It has to be there, even if the dissector ignores it.

Guy Harris's avatar
19.9k
Guy Harris
answered 2020-03-05 18:43:45 +0000
edit flag offensive 0 remove flag delete link

Comments

But it still gives me the same error. How do I rectify it?

Sriram R's avatar Sriram R (2020-03-16 08:50:53 +0000) edit
add a comment see more comments

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss.

Add Answer