diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 98e31cb51d..9523b843a0 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,21 @@ 2008-12-31 13:59 UTC+0100 Foo Bar */ +2008-06-17 23:33 UTC+0200 Viktor Szakats (harbour.01 syenar hu) + * source/rtl/tget.prg + % Minor opt. + + * contrib/hbwhat32/_winkbrd.c + * contrib/hbwhat32/_wintext.c + * contrib/hbwhat32/_windc.c + * contrib/hbwhat32/_winsys.c + * contrib/hbwhat32/_windir.c + * contrib/hbwhat32/_winmsg.c + * contrib/hbwhat32/_winmisc.c + * contrib/hbwhat32/_winfont.c + * contrib/hbwhat32/_winreg.c + ! Potential warning fixes. + 2008-06-17 23:00 UTC+0200 Viktor Szakats (harbour.01 syenar hu) * tests/rto_get.prg * source/rtl/tget.prg diff --git a/harbour/contrib/hbwhat32/_windc.c b/harbour/contrib/hbwhat32/_windc.c index 460b1edb5c..e7de5f1cb3 100644 --- a/harbour/contrib/hbwhat32/_windc.c +++ b/harbour/contrib/hbwhat32/_windc.c @@ -118,7 +118,7 @@ HB_FUNC( GETWINDOWDC ) HB_FUNC( CREATEDC ) { - DEVMODE *lpInitData ; + DEVMODE *lpInitData = NULL; if ( ! ISNIL( 4 ) ) lpInitData = (DEVMODE *) hb_parc( 4 ); //hb_param( 4, HB_IT_STRING)->item.asString.value ; @@ -139,7 +139,7 @@ HB_FUNC( CREATEDC ) HB_FUNC( RESETDC ) { - DEVMODE *lpInitData ; + DEVMODE *lpInitData = NULL; if ( ! ISNIL( 2 ) ) lpInitData = (DEVMODE *) hb_parc( 2 ); //hb_param( 2, HB_IT_STRING)->item.asString.value ; diff --git a/harbour/contrib/hbwhat32/_windir.c b/harbour/contrib/hbwhat32/_windir.c index de71afe0cd..d70276b2df 100644 --- a/harbour/contrib/hbwhat32/_windir.c +++ b/harbour/contrib/hbwhat32/_windir.c @@ -177,7 +177,7 @@ HB_FUNC( SETVOLUMELABEL ) HB_FUNC( CREATEDIRECTORY ) { - SECURITY_ATTRIBUTES *sa ; + SECURITY_ATTRIBUTES *sa = NULL; if (ISCHAR(2)) sa = (SECURITY_ATTRIBUTES *) hb_parc( 2 ); //hb_param(2, HB_IT_STRING)->item.asString.value; diff --git a/harbour/contrib/hbwhat32/_winfont.c b/harbour/contrib/hbwhat32/_winfont.c index a0128a5b46..018205189f 100644 --- a/harbour/contrib/hbwhat32/_winfont.c +++ b/harbour/contrib/hbwhat32/_winfont.c @@ -296,7 +296,7 @@ int CALLBACK GenericCallblockProc( LONG param1, LONG param2, int wParam, LPARAM HB_FUNC( GETFONTDATA ) { - char *cBuffer ; + char *cBuffer == NULL; DWORD dwRet ; if ( ! ISNIL( 5 ) && ( hb_parnl( 5 ) > 0 ) ) cBuffer = (char *) hb_xgrab( hb_parnl(5)); diff --git a/harbour/contrib/hbwhat32/_winkbrd.c b/harbour/contrib/hbwhat32/_winkbrd.c index 27178c6eb7..84a7ea085c 100644 --- a/harbour/contrib/hbwhat32/_winkbrd.c +++ b/harbour/contrib/hbwhat32/_winkbrd.c @@ -250,7 +250,7 @@ HB_FUNC( DESTROYACCELERATORTABLE ) HB_FUNC( COPYACCELERATORTABLE ) { - LPACCEL lpAccelDst ; + LPACCEL lpAccelDst = NULL; int iCount = 0; int iRet ; PHB_ITEM aParam ; diff --git a/harbour/contrib/hbwhat32/_winmisc.c b/harbour/contrib/hbwhat32/_winmisc.c index 9c9739d279..2ea4e00f69 100644 --- a/harbour/contrib/hbwhat32/_winmisc.c +++ b/harbour/contrib/hbwhat32/_winmisc.c @@ -507,7 +507,7 @@ int nCopyAnsiToWideChar (LPWORD lpWCStr, LPSTR lpAnsiIn) HB_FUNC( CREATEMUTEX ) { - SECURITY_ATTRIBUTES *sa; + SECURITY_ATTRIBUTES *sa = NULL; if( ISCHAR(1) ) { diff --git a/harbour/contrib/hbwhat32/_winmsg.c b/harbour/contrib/hbwhat32/_winmsg.c index 76e6574755..29852e3a60 100644 --- a/harbour/contrib/hbwhat32/_winmsg.c +++ b/harbour/contrib/hbwhat32/_winmsg.c @@ -64,7 +64,7 @@ HB_FUNC( POSTQUITMESSAGE ) HB_FUNC( POSTMESSAGE ) { - char *cText ; + char *cText = NULL; if (ISBYREF(4)) { @@ -92,7 +92,7 @@ HB_FUNC( POSTMESSAGE ) HB_FUNC( SENDMESSAGE ) { - char *cText ; + char *cText = NULL; if( ISBYREF(4) ) diff --git a/harbour/contrib/hbwhat32/_winreg.c b/harbour/contrib/hbwhat32/_winreg.c index 553c79689b..ee151dca30 100644 --- a/harbour/contrib/hbwhat32/_winreg.c +++ b/harbour/contrib/hbwhat32/_winreg.c @@ -207,7 +207,7 @@ HB_FUNC( REGCREATEKEYEX ) HKEY hkResult ; DWORD dwDisposition ; LONG nErr ; - SECURITY_ATTRIBUTES *sa ; + SECURITY_ATTRIBUTES *sa = NULL; if (ISCHAR(7)) sa = (SECURITY_ATTRIBUTES *) hb_parc( 7 ); //hb_param(7, HB_IT_STRING)->item.asString.value; diff --git a/harbour/contrib/hbwhat32/_winsys.c b/harbour/contrib/hbwhat32/_winsys.c index 5ba21b2867..c7300f1d3f 100644 --- a/harbour/contrib/hbwhat32/_winsys.c +++ b/harbour/contrib/hbwhat32/_winsys.c @@ -931,7 +931,7 @@ HB_FUNC( HTMLHELP ) HB_FUNC( CREATEFILE ) { - SECURITY_ATTRIBUTES *sa ; + SECURITY_ATTRIBUTES *sa = NULL; if( ISCHAR( 4 ) ) sa = ( SECURITY_ATTRIBUTES *) hb_parc( 4 ); //hb_param( 4, HB_IT_STRING )->item.asString.value ; @@ -972,7 +972,7 @@ HB_FUNC( READFILE ) char * Buffer = ( char * ) hb_xgrab( hb_parnl( 3 ) ) ; DWORD nRead = 0 ; BOOL bRet ; - OVERLAPPED *Overlapped ; + OVERLAPPED *Overlapped = NULL; if( ISCHAR( 5 ) ) Overlapped = ( OVERLAPPED *) hb_parc( 5 ); //hb_param( 5, HB_IT_STRING )->item.asString.value ; @@ -1006,8 +1006,8 @@ BOOL WriteFile( HB_FUNC( WRITEFILE ) { - DWORD nWritten = 0 ; - OVERLAPPED *Overlapped ; + DWORD nWritten = 0; + OVERLAPPED *Overlapped = NULL; if( ISCHAR( 4 )) Overlapped = ( OVERLAPPED *) hb_parc( 4 ); //hb_param( 4, HB_IT_STRING )->item.asString.value ; diff --git a/harbour/contrib/hbwhat32/_wintext.c b/harbour/contrib/hbwhat32/_wintext.c index 1514006279..90298cdddb 100644 --- a/harbour/contrib/hbwhat32/_wintext.c +++ b/harbour/contrib/hbwhat32/_wintext.c @@ -72,7 +72,7 @@ HB_FUNC( POLYTEXTOUTA ) HB_FUNC( EXTTEXTOUT ) { RECT rc ; - INT * lpDx ; + INT * lpDx = NULL; BOOL rcOk ; UINT iCount ; UINT i ; @@ -137,7 +137,7 @@ HB_FUNC( DRAWTEXTEX ) { char *cText = (char *) hb_parcx( 2 ); RECT rc; - DRAWTEXTPARAMS *dtp ; + DRAWTEXTPARAMS *dtp = NULL; if ( ISCHAR( 5 )) dtp = (DRAWTEXTPARAMS *) hb_parc( 5 ); //hb_param( 5, HB_IT_STRING )->item.asString.value; diff --git a/harbour/source/rtl/tget.prg b/harbour/source/rtl/tget.prg index dffe50fda4..22b9f34be8 100644 --- a/harbour/source/rtl/tget.prg +++ b/harbour/source/rtl/tget.prg @@ -972,11 +972,7 @@ METHOD pos( nPos ) CLASS Get DO CASE CASE nPos > ::nMaxLen - IF ::nMaxLen == 0 - ::nPos := 1 - ELSE - ::nPos := ::nMaxLen - ENDIF + ::nPos := iif( ::nMaxLen == 0, 1, ::nMaxLen ) ::typeOut := .T. CASE nPos > 0