From 4f3c6e53b40c79dc51187fed9b29177576ae2cdd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Przemys=C5=82aw=20Czerpak?= Date: Tue, 4 Mar 2014 19:12:14 +0100 Subject: [PATCH] =?UTF-8?q?2014-03-04=2019:12=20UTC+0100=20Przemyslaw=20Cz?= =?UTF-8?q?erpak=20(druzus/at/poczta.onet.pl)=20=20=20*=20contrib/xhb/hbse?= =?UTF-8?q?rv.c=20=20=20=20=20*=20pacified=20CLANG=20warning=20reported=20?= =?UTF-8?q?by=20Fran=C4=8Dek?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ChangeLog.txt | 4 ++++ contrib/xhb/hbserv.c | 17 ++++++++++------- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index 210ed2e742..663a6bd1e9 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -10,6 +10,10 @@ * Change, ! Fix, % Optimization, + Addition, - Removal, ; Comment */ +2014-03-04 19:12 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) + * contrib/xhb/hbserv.c + * pacified CLANG warning reported by FranĨek + 2014-03-04 18:15 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) * src/debug/debugger.prg * minor cleanup diff --git a/contrib/xhb/hbserv.c b/contrib/xhb/hbserv.c index 93d64dc7a7..02689e583e 100644 --- a/contrib/xhb/hbserv.c +++ b/contrib/xhb/hbserv.c @@ -935,12 +935,11 @@ HB_FUNC( HB_POPSIGNALHANDLER ) */ HB_FUNC( HB_SIGNALDESC ) { +#if defined( HB_OS_UNIX ) || defined( HB_OS_OS2_GCC ) + int iSig = hb_parni( 1 ); int iSubSig = hb_parni( 2 ); - /* UNIX MESSGES */ - #if defined( HB_OS_UNIX ) || defined( HB_OS_OS2_GCC ) - switch( iSig ) { case SIGSEGV: switch( iSubSig ) @@ -1019,12 +1018,16 @@ HB_FUNC( HB_SIGNALDESC ) hb_retc_const( "User defined (secondary)" ); return; } - #endif - #ifdef HB_OS_WIN +#elif defined( HB_OS_WIN ) + + int iSig = hb_parni( 1 ); + if( iSig == 0 ) /* exception */ { - switch( iSubSig ) + DWORD dwSubSig = ( DWORD ) hb_parnl( 2 ); + + switch( dwSubSig ) { case EXCEPTION_ACCESS_VIOLATION: hb_retc_const( "Memory read/write access violation" ); return; @@ -1076,7 +1079,7 @@ HB_FUNC( HB_SIGNALDESC ) } } - #endif +#endif hb_retc_const( "Unrecognized signal" ); }