sal/cppunittester/cppunittester.cxx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
New commits: commit ef8b17930977c5a8141386839e9d4c1dfe3e2d65 Author: Tor Lillqvist <[email protected]> Date: Thu Oct 11 11:14:54 2012 +0300 Be consistent with surrounding code Change-Id: Ice88c3912c2fd0d99156acaa8e15518acab3b55b diff --git a/sal/cppunittester/cppunittester.cxx b/sal/cppunittester/cppunittester.cxx index 3d4dadc..81cf9bf 100644 --- a/sal/cppunittester/cppunittester.cxx +++ b/sal/cppunittester/cppunittester.cxx @@ -231,8 +231,10 @@ SAL_IMPLEMENT_MAIN() { fn = (oslGenericFunction) unobootstrapprotector; else { - fprintf(stderr, "Only unoexceptionprotector or unobootstrapprotector protectors allowed\n"); - assert(!"unrecognized protector"); + std::cerr + << "Only unoexceptionprotector or unobootstrapprotector protectors allowed" + << std::endl; + std::exit(EXIT_FAILURE); } #endif CppUnit::Protector *protector = fn == 0 commit 62fddc0c00c8e960642d2c2a426852f77147ce2e Author: Tor Lillqvist <[email protected]> Date: Thu Oct 11 11:13:03 2012 +0300 WaE: 'fn' may be used uninitialized in this function Change-Id: Ib918bd537b30fe5dc48396fc7e952147003e3b19 diff --git a/sal/cppunittester/cppunittester.cxx b/sal/cppunittester/cppunittester.cxx index 346373f..3d4dadc 100644 --- a/sal/cppunittester/cppunittester.cxx +++ b/sal/cppunittester/cppunittester.cxx @@ -224,7 +224,7 @@ SAL_IMPLEMENT_MAIN() { modules.push_back(new osl::Module(lib, SAL_LOADMODULE_GLOBAL)); oslGenericFunction fn = modules.back().getFunctionSymbol(sym); #else - oslGenericFunction fn; + oslGenericFunction fn = 0; if (sym == "unoexceptionprotector") fn = (oslGenericFunction) unoexceptionprotector; else if (sym == "unobootstrapprotector") _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
