Hi Przemek,

I do not know what exactly newest POCC does but for 4.50 we should
rather intorduce:
  #if defined( __POCC__ )
     #define HB_VALUE_UNUSED( symbol )  do if( symbol ) {;} while( 0 )
  #else
     #define HB_VALUE_UNUSED( symbol )  do {;} while( 0 )
  #endif

Not many, about the same amount, but I didn't want
to add the complexity of having two different macros,
as most ppl (including myself) would never be able
to choose the correct one. So it would be just a new
source of mistake.

I'd rather revert this, because it's overall not such
a big problem.

I didn't check the generated source code in all compilers
(only Pelles C 5), so what I know that after the change,
no tested compilers complained, and that it didn't
generate any code with Pelles C 5 when optimizations
(Harbour defaults) were turned on.

and use it in places where it generates warnings.
Does it has many of them? POCC4.5 has ~5 for such warnings.
If newest versions reports too much of them for code updating
then I suggest to make:

  #if defined( __POCC__ ) && __POCC__ >= ...
#define HB_SYMBOL_UNUSED( symbol ) do if( symbol ) {;} while( 0 )
  #else
     #define HB_SYMBOL_UNUSED( symbol )  ( void ) symbol
  #endif

Okay, this seems to be the best way to go.

    ! Fix to PFLL, although it didn't fix all GCC 4.3.1 warnings.
      These remained:
../../genc.c:1582: warning: unknown conversion type character 'l' in format
      ../../genc.c:1582: warning: too many arguments for format

Strange. It shouldn't. Is it the only one warning with above and
other were cleaned or all still exist?

No it didn't clear anything, neither did it create any
new warnings.

On what platform does it happen?

MinGW 4.30 and 4.31, which is a test release BTW, so
it might easily be a compiler problem.

  * contrib/gtwvg/wvgutils.c
    ! Reverted some wrong fixes from previous commit.

If you want to avoid warnings with number<->pointer conversions
on different platforms (32/64bit) then use casting to HB_PTRDIFF
or LONG_PTR in windows only code, f.e.:

  ( HWND ) ( LONG_PTR ) hb_parnint( 1 )

or create macro like:
#define HB_PARNVOID( n ) ( ( void * ) ( LONG_PTR ) hb_parnint( n ) )
and use:
  ( HWND ) HB_PARNVOID( 1 )

Thanks for the tip! I was wondering about this. Maybe it
would be even better to use hb_parptr()/hb_retptr() for
the offending functions, since these are pointers (Windows
handles) in most cases.

I'm not planning to touch GTWVG any deeper than this, as it
has many problems, and I don't use it.

Brgds,
Viktor

_______________________________________________
Harbour mailing list
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to