On Thu, Jul 31, 2003 at 01:00:54AM -0400, Terletsky Oleg wrote:
> Attached zip file includes everything you need to build it as plugin
> library.
Some compiler warnings:
packet-lwres.c: In function `dissect_getnamebyaddr_request':
packet-lwres.c:434: warning: unused parameter `pinfo'
packet-lwres.c: In function `dissect_getnamebyaddr_response':
packet-lwres.c:486: warning: unused parameter `pinfo'
packet-lwres.c: In function `dissect_getaddrsbyname_request':
packet-lwres.c:571: warning: unused parameter `pinfo'
packet-lwres.c: In function `dissect_getaddrsbyname_response':
packet-lwres.c:731: warning: assignment discards `const' from pointer
target type
packet-lwres.c:627: warning: unused parameter `pinfo'
packet-lwres.c: In function `dissect_a_records':
packet-lwres.c:785: warning: comparison between signed and unsigned
packet-lwres.c:765: warning: unused parameter `pinfo'
packet-lwres.c: In function `dissect_srv_records':
packet-lwres.c:839: warning: comparison between signed and unsigned
packet-lwres.c:819: warning: unused parameter `pinfo'
packet-lwres.c: In function `dissect_mx_records':
packet-lwres.c:918: warning: comparison between signed and unsigned
packet-lwres.c:897: warning: unused parameter `pinfo'
packet-lwres.c: In function `dissect_ns_records':
packet-lwres.c:974: warning: comparison between signed and unsigned
packet-lwres.c:959: warning: unused variable `nsname'
packet-lwres.c:955: warning: unused parameter `pinfo'
packet-lwres.c: In function `dissect_rdata_request':
packet-lwres.c:1000: warning: unused parameter `pinfo'
packet-lwres.c: In function `dissect_rdata_response':
packet-lwres.c:1065: warning: unused variable `siglen'
packet-lwres.c: In function `dissect_noop':
packet-lwres.c:1170: warning: unused parameter `tvb'
packet-lwres.c:1170: warning: unused parameter `pinfo'
packet-lwres.c:1170: warning: unused parameter `lwres_tree'
packet-lwres.c:1170: warning: unused parameter `type'
packet-lwres.c: In function `dissect_lwres':
packet-lwres.c:1207: warning: unused variable `data_tvb'
packet-lwres.c: At top level:
packet-lwres.c:148: warning: `hf_srv_dname' defined but not used
packet-lwres.c:198: warning: `lwres_handle' defined but not used
The "unused parameter" warnings are probably best eliminated by getting
rid of the function parameter in question, as those functions aren't
called through pointers that force them to take those arguments.
The "discards `const'" warnings can be eliminated by making "addr" a
"const guint8 *".
The "unused variable" warnings look as if they're probably best
eliminated by getting rid of the variables in question.
The "defined but not used" warning for "lwres_handle" is best eliminated
by getting rid of the static "lwres_handle" variable at the beginning of
"packet-lwres.c".
"hf_srv_dname", however, might be intended for a field that really
should exist - does it, or should that variable just be eliminated?
Also, C++-style // comments are used - some C compilers (e.g., IBM's
XLC) don't like them, so C89-style comments should be used instead.