1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-03-09 15:50:02 +00:00

Get rid of unpleasant cast, it causes SIGSEGV

Having a difficult choice between unplasant
cast to get a void * into an enumeration type
and "Something's wrong here" double cast
I decided for the latter.

At least it does not crash when the legal
value of zero is passed as the argument.
This commit is contained in:
Marcin Cieslak 2012-09-24 13:36:13 +02:00 committed by Jon Trulson
parent 86cb67de90
commit 3a246dfb9b

View file

@ -672,11 +672,8 @@ DmxPrintOptions::isValidMarginSpec(PropUiItem* pui, void* data)
char *marginSpec = NULL;
XtEnum parseError;
Widget text;
#if defined(linux) || defined(CSRG_BASED)
_DtPrintMarginEnum which = *((_DtPrintMarginEnum *) data);
#else
_DtPrintMarginEnum which = (_DtPrintMarginEnum) data;
#endif
_DtPrintMarginEnum which = (_DtPrintMarginEnum)(long)data;
text = pui->getWidget();
if (text)