From 8146e914b27f78bba2bf18b8f8ce1500c3bd8baa Mon Sep 17 00:00:00 2001 From: Przemyslaw Czerpak Date: Fri, 30 Mar 2012 15:21:49 +0000 Subject: [PATCH] 2012-03-30 17:21 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) * harbour/include/hbwinuni.h * added explicit casting to HB_FSNAMECONV() macro to force compile time warnings when wrongly used also in UNICODE builds --- harbour/ChangeLog | 5 +++++ harbour/include/hbwinuni.h | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index bd37ff203d..929e2effb6 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,11 @@ The license applies to all entries newer than 2009-04-28. */ +2012-03-30 17:21 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) + * harbour/include/hbwinuni.h + * added explicit casting to HB_FSNAMECONV() macro to force compile + time warnings when wrongly used also in UNICODE builds + 2012-03-30 15:53 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) * harbour/include/hbwinuni.h ! fixed typos in HB_FSNAMECONV() definition diff --git a/harbour/include/hbwinuni.h b/harbour/include/hbwinuni.h index ae1ab5a74a..cbcc9187a5 100644 --- a/harbour/include/hbwinuni.h +++ b/harbour/include/hbwinuni.h @@ -84,7 +84,7 @@ #define HB_STRNCAT( dst, src, len ) hb_wstrncat( dst, src, len ) #define HB_STRCMP( s1, s2 ) hb_wstrcmp( s1, s2 ) #define HB_STRNCMP( s1, s2, len ) hb_wstrncmp( s1, s2, len ) - #define HB_FSNAMECONV( fname, pfree ) ( *(pfree) = hb_fsNameConvU16( fname ) ) + #define HB_FSNAMECONV( fname, pfree ) ( ( LPCTSTR ) ( *(pfree) = hb_fsNameConvU16( fname ) ) ) #else #define HB_PARSTR( n, h, len ) hb_parstr( n, hb_setGetOSCP(), h, len ) #define HB_PARSTRDEF( n, h, len ) hb_strnull( hb_parstr( n, hb_setGetOSCP(), h, len ) )