Wireshark-dev: Re: [Wireshark-dev] [Patch] pragma warning
From: "Luis Ontanon" <luis.ontanon@xxxxxxxxx>
Date: Wed, 28 Mar 2007 16:39:58 +0200
On 3/28/07, Sebastien Tandel <sebastien@xxxxxxxxx> wrote:

>>> I dont think it is really realistic to have all autogenerated files
>>> always compile without any warnings.
>>> Maybe we should instead split Makefile.common up into three parts :
>>>
>>> First part : normal dissectors
>>>
>>> Second part : ANS2WRS generated dissectors  which take extra compile
>>> time flags and definitions to suppress artefacts from the compiler.
>>>
>>> Third part : PIDL generated dissectors that once again take extra
>>> compile parameters and definitions.
>>>
>>>
>> Sounds like a reasonable solution. It would also have the advantage that
>> we get a list of generated dissectors, which we currently don't have.
>>
>> But: Is there a "makefile magic", so you can have different CFLAGS
>> settings for the different lists? Remember that we are using implicit
>> rules here.
>>
>> Having three lists shouldn't be difficult to add, but I don't know how
>> to get the "compile logic" for it - however, I'm really not an expert on
>> this.
>>
>> If there's a solution for this makefile problem, I think it's the way to
>> go ...
>>
>
> When it comes to the ANS2WRS dissectors are concerned  I think that
> ANS2WRS is so mature now that maybe what we should do for those
> dissectors would instead be to
> remove them completely from epan/dissectors and make asn part of the
> build process.
> All these dissectors have their own makefile down in asn/* where one
> can set additional or different compiler flags compared to those used
> by the normal epan/dissectors.
> These asn dissectors could even be linked to a separate dll :
> libwireshark-asn.dll
>
Wouldn't be the register_all_protocols() function problematic?

We could create a plugin directory with all its paraphernalia and have
the asn1 dissectors be loaded like a plugin.

But still the best thing would be to have the asn1 generated
dissectors inepan/dissectors and have them built from the Makefile.

For the warnings we could have asn2wrs.py prepend the #pragma for
unused static function  right bellow the signature to the generated
code (that's an ugly fix but I do not find a feasible way to have
asn2wrs not creating the unused functions).

The rest is monkey business: just to add the generated targets to the
Makefile[s] like this:

packet-h248.c: ../../asn1/h248/packet-h248-template.c \
          ../../asn1/h248/packet-h248-template.h \
          ../../asn1/h248/h248.cnf \
          ../../asn1/h248/h248v3.asn
[TAB](cd ../../asn1/h248 && make copy_files )

packet-h248.h: packet-h248.c


Luis

Regards,
Sebastien Tandel
_______________________________________________
Wireshark-dev mailing list
Wireshark-dev@xxxxxxxxxxxxx
http://www.wireshark.org/mailman/listinfo/wireshark-dev



--
This information is top security. When you have read it, destroy yourself.
-- Marshall McLuhan