Wireshark-dev: Re: [Wireshark-dev] ASN.1 generating unused code warnings ( was:Compile warnings

From: "Anders Broman" <a.broman@xxxxxxxxx>
Date: Tue, 24 Jun 2008 22:52:04 +0200

-----Ursprungligt meddelande-----
Från: wireshark-dev-bounces@xxxxxxxxxxxxx
[mailto:wireshark-dev-bounces@xxxxxxxxxxxxx] För Guy Harris
Skickat: den 24 juni 2008 06:46
Till: Developer support list for Wireshark
Ämne: Re: [Wireshark-dev] Compile warnings using CFLAGS
'-Wshadow-Wpointer-arith -Wcast-qual -W -Wall'


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?


No, that was just speculation on my part. I think the ASN.1 files were all
current at the time they were added, but the may not be now.

>> 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?

Not sure I have to check later, but it may well be in the original ASN.1
file. I seem to remember looking at some of those warnings before and being
undecided whether we should comment out unused ASN.1 code in *our* ASN.1
file or keep the original ones as far as possible.

Regards
Anders
_______________________________________________
Wireshark-dev mailing list
Wireshark-dev@xxxxxxxxxxxxx
https://wireshark.org/mailman/listinfo/wireshark-dev