[Libreoffice-bugs] [Bug 48391] New: Remove TEST_ENSHURE

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Fri Apr 6 18:47:08 CEST 2012


https://bugs.freedesktop.org/show_bug.cgi?id=48391

             Bug #: 48391
           Summary: Remove TEST_ENSHURE
    Classification: Unclassified
           Product: LibreOffice
           Version: unspecified
          Platform: Other
        OS/Version: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Libreoffice
        AssignedTo: libreoffice-bugs at lists.freedesktop.org
        ReportedBy: kendy at suse.cz


git grep TEST_ENSHURE

gives quite some uses of this misspelled macro that is defined here and there
as:

#if OSL_DEBUG_LEVEL > 0
#define TEST_ENSHURE(c, m)   OSL_ENSURE(c, m)
#else
#define TEST_ENSHURE(c, m)   OSL_VERIFY(c)
#endif

These definitions should be removed, and most of the uses of TEST_ENSHURE
should be changed directly to OSL_ENSURE(), like:

-    TEST_ENSHURE( xSMgr.is(), "excomp error 0" );
+    OSL_ENSURE( xSMgr.is(), "excomp error 0" );

There is a small catch - OSL_VERIFY() evaluates the condition _always_,
regardless of the debug level, so in case the condition is something more
advanced than xSMgr.is(), you might need to use OSL_VERIFY() instead of
OSL_ENSURE().  If in doubt, please consult the
libreoffice at lists.freedesktop.org mailing list :-)

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the Libreoffice-bugs mailing list