freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ft-devel] MSVC build woes !


From: John Emmas
Subject: Re: [ft-devel] MSVC build woes !
Date: Tue, 11 Jun 2013 13:08:42 +0100
User-agent: Mozilla/5.0 (Windows NT 6.1; rv:17.0) Gecko/20130509 Thunderbird/17.0.6

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]