From cc37512243ebed75b73dcee42abf4e6ce5fd127c Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Wed, 21 Feb 2007 21:40:35 +0000 Subject: [PATCH] 2007-02-21 22:37 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * harbour/include/common.ch + Changed HB_SYMBOL_UNUSED() to also work in codeblock. Thanks to Przemek. --- harbour/ChangeLog | 5 +++++ harbour/include/common.ch | 7 ++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 1fa20649ed..118baadec6 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,11 @@ 2002-12-01 13:30 UTC+0100 Foo Bar */ +2007-02-21 22:37 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) + * harbour/include/common.ch + + Changed HB_SYMBOL_UNUSED() to also work in codeblock. + Thanks to Przemek. + 2007-02-18 12:40 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/common.mak * harbour/source/compiler/Makefile diff --git a/harbour/include/common.ch b/harbour/include/common.ch index e6ee61c003..5c78d91304 100644 --- a/harbour/include/common.ch +++ b/harbour/include/common.ch @@ -78,8 +78,9 @@ #command UPDATE IF TO => ; IF ; := ; END -/* To suppress unused variable /w2 warnings. The code snippet will be optimized - out by the compiler, so it won't cause any overhead. */ -#define HB_SYMBOL_UNUSED( symbol ) IF .F. ; symbol := symbol ; END +/* To suppress unused variable -w2 warnings. The code snippet will be + optimized out by the compiler, so it won't cause any overhead. + It can be used in codeblocks, too. Don't remove any parentheses. */ +#define HB_SYMBOL_UNUSED( symbol ) iif( !((.T.)), symbol, .T. ) #endif /* HB_COMMON_CH_ */