You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by pa...@apache.org on 2012/09/27 19:45:10 UTC
svn commit: r1391138 - /incubator/ooo/trunk/main/cppu/source/uno/data.cxx
Author: paveljanik
Date: Thu Sep 27 17:45:09 2012
New Revision: 1391138
URL: http://svn.apache.org/viewvc?rev=1391138&view=rev
Log:
Use proper print format modifier for sizeof() - can be long on some
platforms.
Modified:
incubator/ooo/trunk/main/cppu/source/uno/data.cxx
Modified: incubator/ooo/trunk/main/cppu/source/uno/data.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/cppu/source/uno/data.cxx?rev=1391138&r1=1391137&r2=1391138&view=diff
==============================================================================
--- incubator/ooo/trunk/main/cppu/source/uno/data.cxx (original)
+++ incubator/ooo/trunk/main/cppu/source/uno/data.cxx Thu Sep 27 17:45:09 2012
@@ -366,7 +366,7 @@ sal_Bool SAL_CALL uno_type_isAssignableF
#define BINTEST_VERIFY( c ) \
if (! (c)) { fprintf( stderr, "### binary compatibility test failed: %s [line %d]!!!\n", #c, __LINE__ ); abort(); }
#define BINTEST_VERIFYOFFSET( s, m, n ) \
- if (OFFSET_OF(s, m) != n) { fprintf( stderr, "### OFFSET_OF(" #s ", " #m ") = %" SAL_PRI_SIZET "u instead of expected %d!!!\n", OFFSET_OF(s, m), n ); abort(); }
+ if (OFFSET_OF(s, m) != n) { fprintf( stderr, "### OFFSET_OF(" #s ", " #m ") = %" SAL_PRI_SIZET "u instead of expected %d!!!\n", OFFSET_OF(s, m), static_cast<int>(n) ); abort(); }
#if OSL_DEBUG_LEVEL > 1
#if defined(__GNUC__) && (defined(LINUX) || defined(FREEBSD)) && (defined(INTEL) || defined(POWERPC) || defined(X86_64) || defined(S390))
@@ -375,8 +375,8 @@ sal_Bool SAL_CALL uno_type_isAssignableF
if (sizeof(s) != n) { fprintf( stderr, "### sizeof(" #s ") = %d instead of expected %d!!!\n", sizeof(s), n ); abort(); }
#else // ! GNUC
#define BINTEST_VERIFYSIZE( s, n ) \
- fprintf( stderr, "> sizeof(" #s ") = %d\n", sizeof(s) ); \
- if (sizeof(s) != n) { fprintf( stderr, "### sizeof(" #s ") = %d instead of expected %d!!!\n", sizeof(s), n ); abort(); }
+ fprintf( stderr, "> sizeof(" #s ") = %" SAL_PRI_SIZET "d\n", sizeof(s) ); \
+ if (sizeof(s) != n) { fprintf( stderr, "### sizeof(" #s ") = %" SAL_PRI_SIZET "d instead of expected %d!!!\n", sizeof(s), n ); abort(); }
#endif
#else // ! OSL_DEBUG_LEVEL
#define BINTEST_VERIFYSIZE( s, n ) \