From 4aed30bd2b56f9567112540edf77abc94f19ed00 Mon Sep 17 00:00:00 2001 From: Przemyslaw Czerpak Date: Thu, 18 Nov 2010 11:22:11 +0000 Subject: [PATCH] 2010-11-18 12:21 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/contrib/hbct/bitnum.c ! fixed && operator wrongly used instead of & in function NumMirr() * harbour/contrib/rddads/ads1.c * removed variable declaration which was hiding other one with the same name * harbour/src/rtl/hbdyn.c * harbour/src/rtl/gtsln/mousesln.c * harbour/src/rtl/gtsln/kbsln.c * harbour/tests/bldtest/bldtest.c ! aded mising ( void ) to declarations of functions without parameters () --- harbour/ChangeLog | 15 +++++++++++++++ harbour/contrib/hbct/bitnum.c | 2 +- harbour/contrib/rddads/ads1.c | 5 +---- harbour/src/rtl/gtsln/kbsln.c | 12 ++++++------ harbour/src/rtl/gtsln/mousesln.c | 2 +- harbour/src/rtl/hbdyn.c | 2 +- harbour/tests/bldtest/bldtest.c | 2 +- 7 files changed, 26 insertions(+), 14 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 10edf00522..5ed3b1714b 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,21 @@ The license applies to all entries newer than 2009-04-28. */ +2010-11-18 12:21 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + * harbour/contrib/hbct/bitnum.c + ! fixed && operator wrongly used instead of & in function NumMirr() + + * harbour/contrib/rddads/ads1.c + * removed variable declaration which was hiding other one + with the same name + + * harbour/src/rtl/hbdyn.c + * harbour/src/rtl/gtsln/mousesln.c + * harbour/src/rtl/gtsln/kbsln.c + * harbour/tests/bldtest/bldtest.c + ! aded mising ( void ) to declarations of functions + without parameters () + 2010-11-18 10:43 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * contrib/sddpg/sddpg.c * contrib/hbpgsql/postgres.c diff --git a/harbour/contrib/hbct/bitnum.c b/harbour/contrib/hbct/bitnum.c index fcaf535862..2acc271aa8 100644 --- a/harbour/contrib/hbct/bitnum.c +++ b/harbour/contrib/hbct/bitnum.c @@ -207,7 +207,7 @@ HB_FUNC( NUMMIRR ) do { usResult <<= 1; - if( lValue && 1 ) + if( lValue & 1 ) usResult |= 1; lValue >>= 1; } diff --git a/harbour/contrib/rddads/ads1.c b/harbour/contrib/rddads/ads1.c index 9d919926be..2d79c7c140 100644 --- a/harbour/contrib/rddads/ads1.c +++ b/harbour/contrib/rddads/ads1.c @@ -1155,13 +1155,10 @@ static HB_ERRCODE adsSeek( ADSAREAP pArea, HB_BOOL bSoftSeek, PHB_ITEM pKey, HB_ * fFound after SKIPFILTER. Also get its extracted key to simplify * that comparison */ - UNSIGNED32 u32RetVal; pucSavedKey = ( UNSIGNED8 * ) hb_xgrab( ADS_MAX_KEY_LENGTH + 1 ); AdsGetRecordNum( pArea->hTable, ADS_IGNOREFILTERS, &u32RecNo ); - u32RetVal = AdsExtractKey( pArea->hOrdCurrent, pucSavedKey, &u16SavedKeyLen ); - - if( u32RetVal != AE_SUCCESS ) + if( AdsExtractKey( pArea->hOrdCurrent, pucSavedKey, &u16SavedKeyLen ) != AE_SUCCESS ) { u16SavedKeyLen = 0; } diff --git a/harbour/src/rtl/gtsln/kbsln.c b/harbour/src/rtl/gtsln/kbsln.c index 8b3ae86f0d..0b617da384 100644 --- a/harbour/src/rtl/gtsln/kbsln.c +++ b/harbour/src/rtl/gtsln/kbsln.c @@ -135,7 +135,7 @@ static int hb_sln_try_get_Kbd_State( void ); /* *********************************************************************** */ -static void hb_sln_Init_TermType() +static void hb_sln_Init_TermType( void ) { char * Env; @@ -158,7 +158,7 @@ static void hb_sln_Init_TermType() /* *********************************************************************** */ -static void hb_sln_Init_KeyTranslations() +static void hb_sln_Init_KeyTranslations( void ) { char ch, keyname[ SLANG_MAX_KEYMAP_KEY_SEQ + 1 ]; int keynum, i; @@ -510,28 +510,28 @@ static int hb_sln_try_get_Kbd_State( void ) /* *********************************************************************** */ -int hb_sln_Shft_Pressed() +int hb_sln_Shft_Pressed( void ) { return ( hb_sln_try_get_Kbd_State() & SHIFT_PRESSED ) != 0; } /* *********************************************************************** */ -int hb_sln_Ctrl_Pressed() +int hb_sln_Ctrl_Pressed( void ) { return ( hb_sln_try_get_Kbd_State() & CONTROL_PRESSED ) != 0; } /* *********************************************************************** */ -int hb_sln_Alt_Pressed() +int hb_sln_Alt_Pressed( void ) { return ( hb_sln_try_get_Kbd_State() & ALT_PRESSED ) != 0; } /* *********************************************************************** */ -int hb_sln_Kbd_State() +int hb_sln_Kbd_State( void ) { return hb_sln_try_get_Kbd_State(); } diff --git a/harbour/src/rtl/gtsln/mousesln.c b/harbour/src/rtl/gtsln/mousesln.c index f39088032c..493fbfdaea 100644 --- a/harbour/src/rtl/gtsln/mousesln.c +++ b/harbour/src/rtl/gtsln/mousesln.c @@ -125,7 +125,7 @@ static HB_BOOL GetXtermEvent( int *Btn, int *Col, int *Row ) /* *********************************************************************** */ -static void hb_sln_CheckDoubleClick() +static void hb_sln_CheckDoubleClick( void ) { HB_USHORT usNewButtons = ( s_usMouseState & ~s_usLastMouseState ) & M_BUTTON_KEYMASK; diff --git a/harbour/src/rtl/hbdyn.c b/harbour/src/rtl/hbdyn.c index 31125776d2..b2032fa659 100644 --- a/harbour/src/rtl/hbdyn.c +++ b/harbour/src/rtl/hbdyn.c @@ -72,7 +72,7 @@ #define _DYNEXEC_MAXPARAM 15 -typedef void ( * PHB_DYNADDR )(); +typedef void ( * PHB_DYNADDR )( void ); static int hb_hbtoctype( int iHarbourType ) { diff --git a/harbour/tests/bldtest/bldtest.c b/harbour/tests/bldtest/bldtest.c index 4003c7f543..a0fc892916 100644 --- a/harbour/tests/bldtest/bldtest.c +++ b/harbour/tests/bldtest/bldtest.c @@ -4,7 +4,7 @@ #include "hbdefs.h" -int main() +int main( void ) { char buf[ 16 ]; int n, i, l, f, iRet = 0;