diff -x CVS -x wntmsci3 -x wntmsci7 -x wntmsci8 -urN ooo_SRC680_m236_src.orig/basegfx/source/matrix/b2dhommatrix.cxx ooo_SRC680_m236_src.pj87/basegfx/source/matrix/b2dhommatrix.cxx --- ooo_SRC680_m236_src.orig/basegfx/source/matrix/b2dhommatrix.cxx 2007-05-09 15:21:53.000000000 +0200 +++ ooo_SRC680_m236_src.pj87/basegfx/source/matrix/b2dhommatrix.cxx 2007-10-22 12:18:02.000000000 +0200 @@ -236,8 +236,8 @@ { if(!fTools::equalZero(fRadiant)) { - double fSin; - double fCos; + double fSin(0.0); + double fCos(0.0); // is the rotation angle an approximate multiple of pi/2? // If yes, force fSin/fCos to -1/0/1, to maintain diff -x CVS -x wntmsci3 -x wntmsci7 -x wntmsci8 -urN ooo_SRC680_m236_src.orig/bridges/source/cpp_uno/gcc3_linux_x86-64/abi.cxx ooo_SRC680_m236_src.pj87/bridges/source/cpp_uno/gcc3_linux_x86-64/abi.cxx --- ooo_SRC680_m236_src.orig/bridges/source/cpp_uno/gcc3_linux_x86-64/abi.cxx 2006-09-16 17:50:11.000000000 +0200 +++ ooo_SRC680_m236_src.pj87/bridges/source/cpp_uno/gcc3_linux_x86-64/abi.cxx 2007-10-29 12:20:36.000000000 +0100 @@ -358,6 +358,8 @@ case X86_64_SSEDF_CLASS: *pStructAlign++ = *reinterpret_cast( *pSSE++ ); break; + default: + break; } } diff -x CVS -x wntmsci3 -x wntmsci7 -x wntmsci8 -urN ooo_SRC680_m236_src.orig/bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx ooo_SRC680_m236_src.pj87/bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx --- ooo_SRC680_m236_src.orig/bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx 2006-09-16 17:50:25.000000000 +0200 +++ ooo_SRC680_m236_src.pj87/bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx 2007-10-29 12:20:36.000000000 +0100 @@ -82,8 +82,8 @@ void ** gpreg, void ** fpreg, void ** ovrflw, sal_uInt64 * pRegisterReturn /* space for register return */ ) { - int nr_gpr = 0; //number of gpr registers used - int nr_fpr = 0; //number of fpr regsiters used + unsigned int nr_gpr = 0; //number of gpr registers used + unsigned int nr_fpr = 0; //number of fpr registers used // return typelib_TypeDescription * pReturnTypeDescr = 0; @@ -492,7 +492,7 @@ unsigned char * bridges::cpp_uno::shared::VtableFactory::addLocalFunctions( void ** slots, unsigned char * code, typelib_InterfaceTypeDescription const * type, sal_Int32 nFunctionOffset, - sal_Int32 functionCount, sal_Int32 nVtableOffset ) + sal_Int32 /* functionCount */, sal_Int32 nVtableOffset ) { for ( sal_Int32 nPos = 0; nPos < type->nMembers; ++nPos ) { diff -x CVS -x wntmsci3 -x wntmsci7 -x wntmsci8 -urN ooo_SRC680_m236_src.orig/bridges/source/cpp_uno/gcc3_linux_x86-64/except.cxx ooo_SRC680_m236_src.pj87/bridges/source/cpp_uno/gcc3_linux_x86-64/except.cxx --- ooo_SRC680_m236_src.orig/bridges/source/cpp_uno/gcc3_linux_x86-64/except.cxx 2006-09-16 17:50:39.000000000 +0200 +++ ooo_SRC680_m236_src.pj87/bridges/source/cpp_uno/gcc3_linux_x86-64/except.cxx 2007-10-29 12:20:36.000000000 +0100 @@ -171,8 +171,8 @@ else { // try to lookup the symbol in the generated rtti map - t_rtti_map::const_iterator iFind( m_generatedRttis.find( unoName ) ); - if (iFind == m_generatedRttis.end()) + t_rtti_map::const_iterator iFind2( m_generatedRttis.find( unoName ) ); + if (iFind2 == m_generatedRttis.end()) { // we must generate it ! // symbol and rtti-name is nearly identical, @@ -201,7 +201,7 @@ } else // taking already generated rtti { - rtti = iFind->second; + rtti = iFind2->second; } } } diff -x CVS -x wntmsci3 -x wntmsci7 -x wntmsci8 -urN ooo_SRC680_m236_src.orig/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx ooo_SRC680_m236_src.pj87/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx --- ooo_SRC680_m236_src.orig/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx 2007-04-25 16:57:33.000000000 +0200 +++ ooo_SRC680_m236_src.pj87/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx 2007-10-29 12:20:36.000000000 +0100 @@ -73,13 +73,13 @@ // Let's figure out what is really going on here { fprintf( stderr, "= callVirtualMethod() =\nGPR's (%d): ", nGPR ); - for ( int i = 0; i < nGPR; ++i ) + for ( unsigned int i = 0; i < nGPR; ++i ) fprintf( stderr, "0x%lx, ", pGPR[i] ); fprintf( stderr, "\nFPR's (%d): ", nFPR ); - for ( int i = 0; i < nFPR; ++i ) + for ( unsigned int i = 0; i < nFPR; ++i ) fprintf( stderr, "%f, ", pFPR[i] ); fprintf( stderr, "\nStack (%d): ", nStack ); - for ( int i = 0; i < nStack; ++i ) + for ( unsigned int i = 0; i < nStack; ++i ) fprintf( stderr, "0x%lx, ", pStack[i] ); fprintf( stderr, "\n" ); } @@ -328,6 +328,8 @@ case typelib_TypeClass_DOUBLE: INSERT_FLOAT_DOUBLE( pCppArgs[nPos], nFPR, pFPR, pStack ); break; + default: + break; } // no longer needed @@ -440,16 +442,19 @@ // is my surrogate bridges::cpp_uno::shared::UnoInterfaceProxy * pThis = static_cast< bridges::cpp_uno::shared::UnoInterfaceProxy * >(pUnoI); +#if OSL_DEBUG_LEVEL > 0 typelib_InterfaceTypeDescription * pTypeDescr = pThis->pTypeDescr; +#endif switch (pMemberDescr->eTypeClass) { case typelib_TypeClass_INTERFACE_ATTRIBUTE: { +#if OSL_DEBUG_LEVEL > 0 // determine vtable call index sal_Int32 nMemberPos = ((typelib_InterfaceMemberTypeDescription *)pMemberDescr)->nPosition; OSL_ENSURE( nMemberPos < pTypeDescr->nAllMembers, "### member pos out of range!" ); - +#endif VtableSlot aVtableSlot( getVtableSlot( reinterpret_cast< @@ -494,10 +499,11 @@ } case typelib_TypeClass_INTERFACE_METHOD: { +#if OSL_DEBUG_LEVEL > 0 // determine vtable call index sal_Int32 nMemberPos = ((typelib_InterfaceMemberTypeDescription *)pMemberDescr)->nPosition; OSL_ENSURE( nMemberPos < pTypeDescr->nAllMembers, "### member pos out of range!" ); - +#endif VtableSlot aVtableSlot( getVtableSlot( reinterpret_cast< diff -x CVS -x wntmsci3 -x wntmsci7 -x wntmsci8 -urN ooo_SRC680_m236_src.orig/idlc/source/preproc/tokens.c ooo_SRC680_m236_src.pj87/idlc/source/preproc/tokens.c --- ooo_SRC680_m236_src.orig/idlc/source/preproc/tokens.c 2006-06-20 05:51:59.000000000 +0200 +++ ooo_SRC680_m236_src.pj87/idlc/source/preproc/tokens.c 2007-10-29 12:24:22.000000000 +0100 @@ -398,7 +398,7 @@ if (str) fprintf(stderr, "%s ", str); if (tp < trp->bp || tp > trp->lp) - fprintf(stderr, "(tp offset %d) ", tp - trp->bp); + fprintf(stderr, "(tp offset %ld) ", (long)(tp - trp->bp)); for (tp = trp->bp; tp < trp->lp && tp < trp->bp + 32; tp++) { if (tp->type != NL) diff -x CVS -x wntmsci3 -x wntmsci7 -x wntmsci8 -urN ooo_SRC680_m236_src.orig/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx ooo_SRC680_m236_src.pj87/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx --- ooo_SRC680_m236_src.orig/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx 2007-06-13 09:57:06.000000000 +0200 +++ ooo_SRC680_m236_src.pj87/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx 2007-10-26 18:28:42.000000000 +0200 @@ -450,7 +450,9 @@ JavaVM ** ppVm, JNIEnv ** ppEnv) { - osl::MutexGuard guard(PluginMutex::get()); + // unless guard is volatile the following warning occurs on gcc: + // warning: variable 't' might be clobbered by `longjmp' or `vfork' + volatile osl::MutexGuard guard(PluginMutex::get()); // unless errcode is volatile the following warning occurs on gcc: // warning: variable 'errcode' might be clobbered by `longjmp' or `vfork' volatile javaPluginError errcode = JFW_PLUGIN_E_NONE; diff -x CVS -x wntmsci3 -x wntmsci7 -x wntmsci8 -urN ooo_SRC680_m236_src.orig/lingucomponent/source/spellcheck/hunspell/csutil.cxx ooo_SRC680_m236_src.pj87/lingucomponent/source/spellcheck/hunspell/csutil.cxx --- ooo_SRC680_m236_src.orig/lingucomponent/source/spellcheck/hunspell/csutil.cxx 2006-09-16 18:08:38.000000000 +0200 +++ ooo_SRC680_m236_src.pj87/lingucomponent/source/spellcheck/hunspell/csutil.cxx 2007-10-26 17:40:48.000000000 +0200 @@ -123,7 +123,7 @@ case 0x90: case 0xa0: case 0xb0: { - fprintf(stderr, "UTF-8 encoding error. Unexpected continuation bytes in %d. character position\n%s\n", u8 - src, src); + fprintf(stderr, "UTF-8 encoding error. Unexpected continuation bytes in %ld. character position\n%s\n", static_cast(u8 - src), src); u2->h = 0xff; u2->l = 0xfd; break; @@ -135,7 +135,7 @@ u2->l = (*u8 << 6) + (*(u8+1) & 0x3f); u8++; } else { - fprintf(stderr, "UTF-8 encoding error. Missing continuation byte in %d. character position:\n%s\n", u8 - src, src); + fprintf(stderr, "UTF-8 encoding error. Missing continuation byte in %ld. character position:\n%s\n", static_cast(u8 - src), src); u2->h = 0xff; u2->l = 0xfd; } @@ -149,12 +149,12 @@ u2->l = (*u8 << 6) + (*(u8+1) & 0x3f); u8++; } else { - fprintf(stderr, "UTF-8 encoding error. Missing continuation byte in %d. character position:\n%s\n", u8 - src, src); + fprintf(stderr, "UTF-8 encoding error. Missing continuation byte in %ld. character position:\n%s\n", static_cast(u8 - src), src); u2->h = 0xff; u2->l = 0xfd; } } else { - fprintf(stderr, "UTF-8 encoding error. Missing continuation byte in %d. character position:\n%s\n", u8 - src, src); + fprintf(stderr, "UTF-8 encoding error. Missing continuation byte in %ld. character position:\n%s\n", static_cast(u8 - src), src); u2->h = 0xff; u2->l = 0xfd; } diff -x CVS -x wntmsci3 -x wntmsci7 -x wntmsci8 -urN ooo_SRC680_m236_src.orig/rsc/source/res/makefile.mk ooo_SRC680_m236_src.pj87/rsc/source/res/makefile.mk --- ooo_SRC680_m236_src.orig/rsc/source/res/makefile.mk 2007-02-06 15:32:11.000000000 +0100 +++ ooo_SRC680_m236_src.pj87/rsc/source/res/makefile.mk 2007-10-20 21:27:10.000000000 +0200 @@ -35,7 +35,7 @@ PRJ=..$/.. -PRJNAME=RSC +PRJNAME=rsc TARGET=rscres # --- Settings ------------------------------------------------------ diff -x CVS -x wntmsci3 -x wntmsci7 -x wntmsci8 -urN ooo_SRC680_m236_src.orig/solenv/inc/unxlngx6.mk ooo_SRC680_m236_src.pj87/solenv/inc/unxlngx6.mk --- ooo_SRC680_m236_src.orig/solenv/inc/unxlngx6.mk 2007-10-15 14:41:38.000000000 +0200 +++ ooo_SRC680_m236_src.pj87/solenv/inc/unxlngx6.mk 2007-11-01 14:05:53.000000000 +0100 @@ -129,10 +129,25 @@ CFLAGSNOOPT=-O0 # Compiler flags for describing the output path CFLAGSOUTOBJ=-o -# Enable all warnings -CFLAGSWALL=-Wall -# Set default warn level -CFLAGSDFLTWARN= + +# -Wshadow does not work for C with nested uses of pthread_cleanup_push: +CFLAGSWARNCC=-Wall -Wextra -Wendif-labels +CFLAGSWARNCXX=$(CFLAGSWARNCC) -Wshadow -Wno-ctor-dtor-privacy \ + -Wno-non-virtual-dtor +CFLAGSWALLCC=$(CFLAGSWARNCC) +CFLAGSWALLCXX=$(CFLAGSWARNCXX) +CFLAGSWERRCC=-Werror + +# Once all modules on this platform compile without warnings, set +# COMPILER_WARN_ERRORS=TRUE here instead of setting MODULES_WITH_WARNINGS (see +# settings.mk): + +MODULES_WITH_WARNINGS := \ + extensions \ + soldep \ + slideshow \ + svtools \ + svx # switches for dynamic and static linking STATIC = -Wl,-Bstatic @@ -182,11 +197,11 @@ STDSLOCUI= # libraries for linking applications -STDLIBGUIMT=-lX11 -ldl -lpthread -lm -STDLIBCUIMT=-ldl -lpthread -lm +STDLIBGUIMT+=-lX11 -ldl -lpthread -lm +STDLIBCUIMT+=-ldl -lpthread -lm # libraries for linking shared libraries -STDSHLGUIMT=-lX11 -lXext -ldl -lpthread -lm -STDSHLCUIMT=-ldl -lpthread -lm +STDSHLGUIMT+=-lX11 -lXext -ldl -lpthread -lm +STDSHLCUIMT+=-ldl -lpthread -lm LIBSALCPPRT*=-Wl,--whole-archive -lsalcpprt -Wl,--no-whole-archive @@ -221,4 +236,5 @@ DLLPOSTFIX=lx DLLPRE=lib DLLPOST=.so +PCHPOST=.gch diff -x CVS -x wntmsci3 -x wntmsci7 -x wntmsci8 -urN ooo_SRC680_m236_src.orig/svtools/bmpmaker/makefile.mk ooo_SRC680_m236_src.pj87/svtools/bmpmaker/makefile.mk --- ooo_SRC680_m236_src.orig/svtools/bmpmaker/makefile.mk 2007-03-09 10:25:11.000000000 +0100 +++ ooo_SRC680_m236_src.pj87/svtools/bmpmaker/makefile.mk 2007-10-20 21:50:28.000000000 +0200 @@ -34,7 +34,7 @@ #************************************************************************* PRJ=.. -PRJNAME=bmpmaker +PRJNAME=svtools TARGET=bmp LIBTARGET=NO diff -x CVS -x wntmsci3 -x wntmsci7 -x wntmsci8 -urN ooo_SRC680_m236_src.orig/svtools/unx/source/svdde/makefile.mk ooo_SRC680_m236_src.pj87/svtools/unx/source/svdde/makefile.mk --- ooo_SRC680_m236_src.orig/svtools/unx/source/svdde/makefile.mk 2007-09-20 18:31:22.000000000 +0200 +++ ooo_SRC680_m236_src.pj87/svtools/unx/source/svdde/makefile.mk 2007-10-20 21:50:41.000000000 +0200 @@ -35,7 +35,7 @@ PRJ=..$/..$/.. -PRJNAME=SVTOOLS +PRJNAME=svtools TARGET=svdde # --- Settings ----------------------------------------------------- diff -x CVS -x wntmsci3 -x wntmsci7 -x wntmsci8 -urN ooo_SRC680_m236_src.orig/svtools/workben/treecontrol/makefile.mk ooo_SRC680_m236_src.pj87/svtools/workben/treecontrol/makefile.mk --- ooo_SRC680_m236_src.orig/svtools/workben/treecontrol/makefile.mk 2007-06-27 14:19:18.000000000 +0200 +++ ooo_SRC680_m236_src.pj87/svtools/workben/treecontrol/makefile.mk 2007-10-20 21:50:54.000000000 +0200 @@ -35,7 +35,7 @@ PRJ=..$/.. -PRJNAME=toolkit +PRJNAME=svtools TARGET=treetest LIBTARGET=NO ENABLE_EXCEPTIONS=TRUE diff -x CVS -x wntmsci3 -x wntmsci7 -x wntmsci8 -urN ooo_SRC680_m236_src.orig/uui/source/iahndl.cxx ooo_SRC680_m236_src.pj87/uui/source/iahndl.cxx --- ooo_SRC680_m236_src.orig/uui/source/iahndl.cxx 2007-07-06 16:29:22.000000000 +0200 +++ ooo_SRC680_m236_src.pj87/uui/source/iahndl.cxx 2007-10-27 17:58:44.000000000 +0200 @@ -2405,7 +2405,7 @@ ErrCode nError = (ErrCode)nErrorCode; sal_Bool bWarning = !ERRCODE_TOERROR(nError); - if ( (ErrCode)nErrorCode == ERRCODE_SFX_BROKENSIGNATURE ) + if ( nError == ERRCODE_SFX_BROKENSIGNATURE ) { // the broken signature warning needs a special title String aErrorString; diff -x CVS -x wntmsci3 -x wntmsci7 -x wntmsci8 -urN ooo_SRC680_m236_src.orig/xmlhelp/source/cxxhelp/qe/XmlIndex.cxx ooo_SRC680_m236_src.pj87/xmlhelp/source/cxxhelp/qe/XmlIndex.cxx --- ooo_SRC680_m236_src.orig/xmlhelp/source/cxxhelp/qe/XmlIndex.cxx 2007-08-03 11:57:10.000000000 +0200 +++ ooo_SRC680_m236_src.pj87/xmlhelp/source/cxxhelp/qe/XmlIndex.cxx 2007-11-01 09:23:01.000000000 +0100 @@ -338,7 +338,7 @@ void XmlIndex::reset() { - maxDocNumberInCache_ = ( allInCache_ ? ( microIndexOffsets_.size() - 1 ) : sal_Int32( -1 ) ); + maxDocNumberInCache_ = allInCache_ ? static_cast(microIndexOffsets_.size()) - 1 : -1; }