On Jul 10, 2013, at 12:08 PM, [email protected] wrote:

> http://anonsvn.wireshark.org/viewvc/viewvc.cgi?view=rev&revision=50489
> 
> User: darkjames
> Date: 2013/07/10 12:08 PM
> 
> Log:
> tvbuff: allow tvb-implementations using their own structure (it's fine as 
> long as first member of struct is tvbuff)
> 
> Move some stuff outside tvbuff struct.

The current version of the code is getting warnings such as

../../epan/tvbuff.c:54:29: error: uninitialized const 'tvb_real_ops' is invalid 
in C++ [-Werror=c++-compat]
../../epan/tvbuff.c:55:29: error: uninitialized const 'tvb_subset_ops' is 
invalid in C++ [-Werror=c++-compat]
../../epan/tvbuff.c:56:29: error: uninitialized const 'tvb_composite_ops' is 
invalid in C++ [-Werror=c++-compat]
../../epan/tvbuff.c:3666:29: error: duplicate declaration of 'tvb_real_ops' is 
invalid in C++ [-Werror=c++-compat]
../../epan/tvbuff.c:54:29: note: previous declaration of 'tvb_real_ops' was here
../../epan/tvbuff.c:3676:29: error: duplicate declaration of 'tvb_subset_ops' 
is invalid in C++ [-Werror=c++-compat]
../../epan/tvbuff.c:55:29: note: previous declaration of 'tvb_subset_ops' was 
here
../../epan/tvbuff.c:3686:29: error: duplicate declaration of 
'tvb_composite_ops' is invalid in C++ [-Werror=c++-compat]
../../epan/tvbuff.c:56:29: note: previous declaration of 'tvb_composite_ops' 
was here

I assume the intent of the lines around line 54-56 is that they be forward 
declarations of the structures in question, but, apparently, you can't do that 
in C++:

        
http://stackoverflow.com/questions/598369/forward-declaring-static-c-struct-instances-in-c

___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <[email protected]>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:[email protected]?subject=unsubscribe

Reply via email to