Benninghoff, John (RBC Dain) wrote:
There is a bug in plugins/mate/mate.h that prevents ethereal from
compiling (at least on my system). This fixes the problem (prototypes
don't match).
...
--- plugins/mate/mate.h.orig Mon Jan 17 20:39:21 2005
+++ plugins/mate/mate.h Wed Jan 26 12:59:48 2005
@@ -324,7 +324,7 @@ struct _mate_item {
extern void initialize_mate_runtime(void);
extern mate_pdu* mate_get_pdus(guint32 framenum);
extern void mate_analyze_frame(packet_info *pinfo, proto_tree* tree);
-extern int mate_packet(void* _U_, packet_info* _U_, epan_dissect_t* _U_,const void* _U_);
+extern int mate_packet(void *prs _U_, packet_info* tree _U_, epan_dissect_t *edt _U_, const void *dummy _U_);
"__attribute__((unused))", which is what _U_ expands to with GCC, isn't,
as far as I know, necessary in function declarations, only in function
definitions (and it's only necessary in order to suppress compiler
warnings). I think it has to be associated with a variable, so "void
*_U_" won't work with GCC (or, at least, with versions of GCC that
require it to be associated with a variable) - only "void *prs _U" (or
the same with some other variable name), will work.
However, just "void *" will work, too, in a function declaration, even
if the parameter is declared with "_U_" in the function definition, so
the right fix is to remove the _U_'s.
This bug won't show up with other compilers, as _U_ is defined as
nothing for other compilers. (If there are other compilers that warn
about unused function parameters and that have something that works
syntactically similar to "__attribute__()", it should be defined as that
something.)
Yoshihiro Oyama contributed (in ethereal-users) a patch to remove the
_U_'s; I'll check that in.