Wireshark-bugs: [Wireshark-bugs] [Bug 8416] remove C++ incompatibilities

Date: Mon, 18 Mar 2013 22:35:59 +0000

Comment # 145 on bug 8416 from
(In reply to comment #78)
> Created attachment 10296 [details]
> patch to remove C++ incompatibilities from uat_new calls from several files
> 
> the fifth argument to uat_new is "void** data_ptr" but many files cast it to
> "void *" on invocation.  This patch changes those files to use a "void **"
> cast to remove a C++ incompatibility.

With this patch I cannot compile anymore with gcc (GCC) 4.1.3 20080704
(prerelease) (Debian 4.1.2-25). I get the following warning:
dereferencing type-punned pointer will break strict-aliasing rules

Maybe that's why the initial code was using void* instead of void**.

I'm running out of idea on how to nicely handle this. Replacing (void**) by
(void**)(void*) does work but is really ugly.
Any thought?


You are receiving this mail because:
  • You are watching all bug changes.