diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 3ba5ebd227..60c20b07c5 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,30 @@ past entries belonging to author(s): Viktor Szakats. */ +2010-04-15 08:16 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + * harbour/src/rtl/gtos2/gtos2.c + * small cleanup in TONE code + + * harbour/include/hbvmpub.h + * removed old and unused macros + + * harbour/external/jpeg/Makefile + ! added Missing HAVE_PROTOTYPES declaration + + * harbour/src/rtl/hbzlib.c + * harbour/contrib/hbbz2/hbbz2.c + * added redundant initialization to pacify MSVC warnings + + * harbour/external/pcre/pcrefinf.c + * casting to pacify warning + + * harbour/src/macro/macro.yyc + * harbour/src/macro/macro.yyh + * harbour/src/compiler/harbour.yyc + * harbour/src/compiler/harbour.yyh + * regenerated using bison with some additional patches to pacify + MSVC warning + 2010-04-14 15:29 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * INSTALL * Updated MSVS 2010 examples. diff --git a/harbour/contrib/hbbz2/hbbz2.c b/harbour/contrib/hbbz2/hbbz2.c index 1958115e42..e74f4b0e2f 100644 --- a/harbour/contrib/hbbz2/hbbz2.c +++ b/harbour/contrib/hbbz2/hbbz2.c @@ -329,7 +329,7 @@ HB_FUNC( HB_BZ2_UNCOMPRESS ) if( ulLen ) { HB_SIZE ulDstLen; - char * pDest; + char * pDest = NULL; int iResult = BZ_OK; if( pBuffer ) diff --git a/harbour/external/jpeg/Makefile b/harbour/external/jpeg/Makefile index 3804d88ee5..66a4eba3e3 100644 --- a/harbour/external/jpeg/Makefile +++ b/harbour/external/jpeg/Makefile @@ -89,7 +89,7 @@ ifeq ($(filter $(HB_COMPILER),<>),) include $(TOP)$(ROOT)config/detfun.mk ifneq ($(HB_HAS_JPEG_LOCAL),) - HB_CFLAGS += -DHAVE_STDLIB_H + HB_CFLAGS += -DHAVE_STDLIB_H -DHAVE_PROTOTYPES ifeq ($(HB_COMPILER),poccarm) HB_CFLAGS += -DNO_GETENV endif diff --git a/harbour/external/pcre/pcrefinf.c b/harbour/external/pcre/pcrefinf.c index 9460c38a42..c2a17ad210 100644 --- a/harbour/external/pcre/pcrefinf.c +++ b/harbour/external/pcre/pcrefinf.c @@ -126,7 +126,7 @@ switch (what) case PCRE_INFO_MINLENGTH: *((int *)where) = (study != NULL && (study->flags & PCRE_STUDY_MINLEN) != 0)? - study->minlength : -1; + (int)study->minlength : -1; break; case PCRE_INFO_LASTLITERAL: diff --git a/harbour/include/hbvmpub.h b/harbour/include/hbvmpub.h index 3c5898af0a..097a7c9b83 100644 --- a/harbour/include/hbvmpub.h +++ b/harbour/include/hbvmpub.h @@ -71,12 +71,6 @@ struct _HB_SYMB; # define HB_OBJ_CLASS( p ) ( ( p )->item.asArray.value->uiClass ) # define HB_ARRAY_OBJ( p ) ( ( p )->item.asArray.value->uiClass != 0 ) -# if defined( __GNUC__ ) -# define HB_ITEM_NIL { HB_IT_NIL, {} } -# else -# define HB_ITEM_NIL { HB_IT_NIL, NULL } -# endif - # define HB_ITEM_GET_NUMINTRAW( p ) ( HB_IS_INTEGER( p ) ? \ ( HB_MAXINT ) (p)->item.asInteger.value : \ ( HB_MAXINT ) (p)->item.asLong.value ) diff --git a/harbour/src/compiler/harbour.yyc b/harbour/src/compiler/harbour.yyc index b29a604956..c583bb0575 100644 --- a/harbour/src/compiler/harbour.yyc +++ b/harbour/src/compiler/harbour.yyc @@ -4135,6 +4135,7 @@ int yynerrs; YYDPRINTF ((stderr, "Starting parse\n")); + memset(&yylval, 0, sizeof (yylval)); yystate = 0; yyerrstatus = 0; yynerrs = 0; @@ -6873,8 +6874,8 @@ yyreduce: break; -/* Line 1268 of yacc.c. */ -#line 6878 "harboury.c" +/* Line 1269 of yacc.c. */ +#line 6879 "harboury.c" default: break; } YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); diff --git a/harbour/src/compiler/harbour.yyh b/harbour/src/compiler/harbour.yyh index d5ab86351b..22252a1548 100644 --- a/harbour/src/compiler/harbour.yyh +++ b/harbour/src/compiler/harbour.yyh @@ -304,7 +304,7 @@ typedef union YYSTYPE } asCodeblock; PHB_VARTYPE asVarType; } -/* Line 1495 of yacc.c. */ +/* Line 1496 of yacc.c. */ #line 309 "harboury.h" YYSTYPE; # define yystype YYSTYPE /* obsolescent; will be withdrawn */ diff --git a/harbour/src/macro/macro.yyc b/harbour/src/macro/macro.yyc index 22dc7d83b7..d8395b88a9 100644 --- a/harbour/src/macro/macro.yyc +++ b/harbour/src/macro/macro.yyc @@ -1873,6 +1873,7 @@ int yynerrs; YYDPRINTF ((stderr, "Starting parse\n")); + memset(&yylval, 0, sizeof (yylval)); yystate = 0; yyerrstatus = 0; yynerrs = 0; @@ -2834,8 +2835,8 @@ yyreduce: break; -/* Line 1268 of yacc.c. */ -#line 2839 "macroy.c" +/* Line 1269 of yacc.c. */ +#line 2840 "macroy.c" default: break; } YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); diff --git a/harbour/src/macro/macro.yyh b/harbour/src/macro/macro.yyh index 97a51042cd..ceb680d6e2 100644 --- a/harbour/src/macro/macro.yyh +++ b/harbour/src/macro/macro.yyh @@ -157,7 +157,7 @@ typedef union YYSTYPE long time; /* to hold milliseconds */ } valTimeStamp; } -/* Line 1495 of yacc.c. */ +/* Line 1496 of yacc.c. */ #line 162 "macroy.h" YYSTYPE; # define yystype YYSTYPE /* obsolescent; will be withdrawn */ diff --git a/harbour/src/rtl/gtos2/gtos2.c b/harbour/src/rtl/gtos2/gtos2.c index fa636066eb..c2c2f5dc78 100644 --- a/harbour/src/rtl/gtos2/gtos2.c +++ b/harbour/src/rtl/gtos2/gtos2.c @@ -664,6 +664,8 @@ static void hb_gt_os2_SetBlink( PHB_GT pGT, HB_BOOL fBlink ) static void hb_gt_os2_Tone( PHB_GT pGT, double dFrequency, double dDuration ) { + ULONG ulDuration; + HB_TRACE(HB_TR_DEBUG, ("hb_gt_os2_Tone(%p,%lf,%lf)", pGT, dFrequency, dDuration)); HB_SYMBOL_UNUSED( pGT ); @@ -671,24 +673,17 @@ static void hb_gt_os2_Tone( PHB_GT pGT, double dFrequency, double dDuration ) /* The conversion from Clipper timer tick units to milliseconds is * 1000.0 / 18.2. */ - dFrequency = HB_MIN( HB_MAX( 0.0, dFrequency ), 32767.0 ); - dDuration = dDuration * 1000.0 / 18.2; /* milliseconds */ + if( dFrequency < 0.0 ) + dFrequency = 0.0; + else if( dFrequency > 32767.0 ) + dFrequency = 32767.0; + ulDuration = ( ULONG ) ( dDuration * 1000.0 / 18.2 ); /* milliseconds */ - while( dDuration > 0.0 ) + while( ulDuration > 0 ) { - USHORT temp = ( USHORT ) HB_MIN( HB_MAX( 0, dDuration ), USHRT_MAX ); - - dDuration -= temp; - if( temp == 0 ) - { - /* Ensure that the loop gets terminated when - only a fraction of the delay time remains. */ - dDuration = -1.0; - } - else - { - DosBeep( ( USHORT ) dFrequency, temp ); - } + USHORT temp = ( USHORT ) HB_MIN( ulDuration, USHRT_MAX ); + ulDuration -= temp; + DosBeep( ( USHORT ) dFrequency, temp ); } } diff --git a/harbour/src/rtl/hbzlib.c b/harbour/src/rtl/hbzlib.c index 59de435076..94462c6c08 100644 --- a/harbour/src/rtl/hbzlib.c +++ b/harbour/src/rtl/hbzlib.c @@ -224,7 +224,7 @@ HB_FUNC( HB_ZUNCOMPRESS ) if( ulLen ) { uLong ulDstLen; - char * pDest; + char * pDest = NULL; int iResult = Z_OK; if( pBuffer )