[ODE] MinGW warning report

David Walters hidden.asbestos at googlemail.com
Mon Jul 24 03:09:43 MST 2006

> I get the following warning when building latest ode with MinGW:
> heightfield.cpp
> ../../ode/src/heightfield.cpp: In destructor
> `dxHeightfieldData::~dxHeightfieldData()':
> ../../ode/src/heightfield.cpp:298: warning: deleting `const void*' is
> undefined

Hi, I don't have MinGW to try this on, but if you cast to a regular
void* does the warning go away?


// dxHeightfieldData destructor
	if ( m_bCopyHeightData )
		// Cast from const void* to plain void* for MinGW warning.
		void* p_nonconst = const_cast< void* >( m_pHeightData );

		dIASSERT( m_pHeightData );
		delete [] p_nonconst;

If this makes MinGW happy, i'll check it in. I'm assuming other GCC
implementations complain about this too?


More information about the ODE mailing list