On 11/06/2013 11:56, Werner LEMBERG wrote:
Please send me all the warnings.  The removal is of temporary nature
only: I'm going to re-add this pragma as soon as I know what it
exactly suppresses (I don't have MSVC).


Hi Werner, I understand. Here's a good example to get you started. I can find you the other instances, if necessary...

The warnings are typically caused by FT_ASSERT and take the following form:-

       : warning C4127: conditional expression is constant

FT_ASSERT is defined in 'ftdebug.h' and looks like this:-

#define FT_ASSERT( condition ) \
do                                                        \
{                                                         \
if ( !( condition ) ) \ FT_Panic( "assertion failed on line %d of file %s\n", \ __LINE__, __FILE__ ); \
                  } while ( 0 )

It usually gets called something like this:-

          FT_ASSERT( some_var == some_other_var );

and wherever it gets called, I get warning 4127. MSVC is warning that there's no point putting this in a do/while loop, since nothing ever changes. Rather than re-instate the pragma, a better solution would be to remove 'do' and 'while'. At first glance, it doesn't look like there'd be any adverse effects. If you agree that removing 'do' and 'while' is the way forward, I'll find you the other occurrences. Regards,

John

_______________________________________________
Freetype-devel mailing list
Freetype-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/freetype-devel

Reply via email to