Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: Re: [Wireshark-dev] Compile warnings using CFLAGS '-Wshadow -Wpointer-arith -Wca

From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Mon, 23 Jun 2008 21:46:08 -0700

On Jun 23, 2008, at 3:22 PM, Anders Broman wrote:

Most of those come from the ASN.1 dissector generator, which, for some reason, seems to generate a lot of unused routines (is that an error in the
ASN.1, or an error in asn2wrs?).

Most come from unused routines in ASN.1 I believe - perhaps left in from
earlier (draft)versions.

I.e., from earlier drafts of the particular ASN.1-based protocols in question?

Does that mean that the ASN.1 files for those protocols are some mix of current and draft stuff, rather than being up-to-date?

Others need to be looked at ;-)

An example:

The FTAM dissector gets:

	ftam.cnf:199: warning: 'dissect_ftam_OR_Set' defined but not used
ftam.cnf:171: warning: 'dissect_ftam_F_CHECK_request' defined but not used ftam.cnf:186: warning: 'dissect_ftam_F_CHECK_response' defined but not used ftam.cnf:209: warning: 'dissect_ftam_Other_Pattern' defined but not used

And the FTAM ASN.1 file has:

OR-Set ::= SEQUENCE OF AND-Set

AND-Set ::=
  SEQUENCE OF
    CHOICE {-- Kernel group
            pathname-Pattern
              [0] IMPLICIT Pathname-Pattern,

			...

            attribute-extensions-pattern
              [22] IMPLICIT Attribute-Extensions-Pattern}

	...f

--
-- XXX Bug in asn2wrs that can not handle tagged assignements
-- XXX woraround implemented in the conformance file
--
Attribute-Value-Assertions ::= [APPLICATION 26] IMPLICIT SEQUENCE OF AND-Set

The ASN.1 file contains no references to OR-Set. Is that because the ASN.1 file is incomplete, or because OR-Set is an unnecessary element of the ASN.1 specification for FTAM, or because the ASN.1 file differs from the official ASN.1 specification (perhaps due to the aforementioned bug) and the official specification *does* use OR-Set?