If we look at the debug macros in tools, e.g.

#ifdef DBG_UTIL

#define DBG_ASSERT( sCon, aError )                  \
    if ( DbgIsAssert() )                            \
    {                                               \
        if ( !( sCon ) )                            \
        {                                           \
            DbgError( aError,                       \
                      __FILE__, __LINE__ );         \
        }                                           \
    }

#else

#define DBG_ASSERT( sCon, aError )

#endif

It's clear that the original intent was that they were to be used
without any trailing ";"

e.g. 

DBG_ASSERT (something)
not
DBG_ASSERT (something);

but the OSL set of assert *is* intended to be followed with a trailing ;

e.g.

#define OSL_ASSERT(c)       _OSL_ASSERT(c, OSL_THIS_FILE, __LINE__)
#if OSL_DEBUG_LEVEL > 0

#define _OSL_ASSERT(c, f, l) \
        do \
        {  \
            if (!(c) && _OSL_GLOBAL osl_assertFailedLine(f, l, 0)) \
                    _OSL_GLOBAL osl_breakDebug(); \
        } while (0)

#else

#define _OSL_ASSERT(c, f, l)            ((void)0)

#endif

Needless to say there's a mix of usages in OOo of the DBG_ASSERT and
friends, with a trailing ";" the most commonplace, giving us loads of
bare ";" about the place which gives the "empty body in an else
statement" etc. warnings.

Do we want to fix this, or ignore it entirely :-). If it gets fixed,
which do we want, change the DBG_ set of macros to follow what people
are generally doing with them, i.e. make them expect a trailing ";", or
fix the usages to remove the ";". 

C.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to