On Aug 19, 2009, at 10:48 AM, divya kothapally wrote:

> Iam trying to add a new buffer using tvb_new_real_data but at the  
> time to compiling it is giving me a warning saying ISO C90 forbids  
> mixed declarations & code. Does tvb_new_real_data need ISO C99 ??

No, it doesn't need C99.

That's because it doesn't need C99 features such as mixed declarations  
and code.

Don't do stuff such as:

        char *foo;

                ...

        foo = xxx();

                ...

        tvbuff_t *bar = tvb_new_real_data(...);

Instead, do:

        char *foo;
        tvbuff_t *bar;

                ...

        foo = xxx();

                ...

        bar = tvb_new_real_data(...);

I.e., put all your declarations at the *beginning* of a block.  That's  
what C89/C90 require.
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev@wireshark.org>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-requ...@wireshark.org?subject=unsubscribe

Reply via email to