[Libreoffice-commits] .: 4 commits - avmedia/source cli_ure/source desktop/source vcl/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Wed Oct 24 13:08:40 PDT 2012
avmedia/source/win/player.cxx | 2 +-
cli_ure/source/uno_bridge/cli_proxy.cxx | 2 +-
desktop/source/deployment/dp_persmap.cxx | 18 ++++++++++++------
vcl/source/uipreviewer/previewer.cxx | 1 -
4 files changed, 14 insertions(+), 9 deletions(-)
New commits:
commit 8be8bcf76de7fcc5c91480583a79a565c7693733
Author: Michael Stahl <mstahl at redhat.com>
Date: Wed Oct 24 22:04:45 2012 +0200
desktop: try to cope with MSVC being silly with C4702 and C4715
Change-Id: I9812079bd9987c841dd1856573de768d7192873b
diff --git a/desktop/source/deployment/dp_persmap.cxx b/desktop/source/deployment/dp_persmap.cxx
index fb7aeca..047ad53 100644
--- a/desktop/source/deployment/dp_persmap.cxx
+++ b/desktop/source/deployment/dp_persmap.cxx
@@ -122,6 +122,14 @@ bool PersistentMap::has( OString const & key ) const
return get( 0, key );
}
+// for 3 functions here MSVC gives C4702 "unreachable code" if optimization
+// is enabled and return is there and C4715 "not all control paths return
+// a value" if optimization disabled and no return...
+#ifdef _MSC_VER
+#pragma warning( push )
+#pragma warning( disable: 4702 )
+#endif
+
//______________________________________________________________________________
bool PersistentMap::get( OString * value, OString const & key ) const
{
@@ -144,9 +152,7 @@ bool PersistentMap::get( OString * value, OString const & key ) const
catch (DbException & exc) {
throw_rtexc( exc.get_errno(), exc.what() );
}
-#ifndef _MSC_VER
return false; // avoiding warning
-#endif
}
//______________________________________________________________________________
@@ -194,9 +200,7 @@ bool PersistentMap::erase( OString const & key, bool flush_immediately )
catch (DbException & exc) {
throw_rtexc( exc.get_errno(), exc.what() );
}
-#ifndef _MSC_VER
return false; // avoiding warning
-#endif
}
//______________________________________________________________________________
@@ -235,11 +239,13 @@ t_string2string_map PersistentMap::getEntries() const
catch (DbException & exc) {
throw_rtexc( exc.get_errno(), exc.what() );
}
-#ifndef _MSC_VER
return t_string2string_map(); // avoiding warning
-#endif
}
+#ifdef _MSC_VER
+#pragma warning( pop )
+#endif
+
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit f260c656da4457c5d87c161bdd43ad3023d07472
Author: Michael Stahl <mstahl at redhat.com>
Date: Wed Oct 24 21:29:00 2012 +0200
vcl: uipreviewer: remove spurious "return false"
Change-Id: Ie853d55f78f27a7249b8e960587c8d2bd833d1a7
diff --git a/vcl/source/uipreviewer/previewer.cxx b/vcl/source/uipreviewer/previewer.cxx
index 0fd77ae..7abb9de 100644
--- a/vcl/source/uipreviewer/previewer.cxx
+++ b/vcl/source/uipreviewer/previewer.cxx
@@ -84,7 +84,6 @@ int UIPreviewApp::Main()
{
fprintf(stderr, "fatal error: %s\n", rtl::OUStringToOString(e.Message, osl_getThreadTextEncoding()).getStr());
}
- return false;
return EXIT_SUCCESS;
}
commit d59379a70ab4d7b43237bfce6e526fc09c94ec8b
Author: Michael Stahl <mstahl at redhat.com>
Date: Wed Oct 24 21:08:42 2012 +0200
cli_ure: warning C4965: implicit box of integer 0
Change-Id: I0ccc91ea686e599171845ff2cff5e536bbdb7b77
diff --git a/cli_ure/source/uno_bridge/cli_proxy.cxx b/cli_ure/source/uno_bridge/cli_proxy.cxx
index 808e5fe..aaa59e9 100644
--- a/cli_ure/source/uno_bridge/cli_proxy.cxx
+++ b/cli_ure/source/uno_bridge/cli_proxy.cxx
@@ -261,7 +261,7 @@ bool UnoInterfaceProxy::CanCastTo(System::Type^ fromType,
// handle regular exception from target
OSL_ENSURE(
- 0 == pException,
+ nullptr == pException,
OUStringToOString(
mapCliString( pException->ToString()),
RTL_TEXTENCODING_UTF8 ).getStr() );
commit 4a2bfe3d223e08d6dc7b7fef812625652eec19fc
Author: Michael Stahl <mstahl at redhat.com>
Date: Wed Oct 24 20:42:57 2012 +0200
warning C4805: '!=': unsafe mix of bool and sal_Bool
Change-Id: I7607ddc9e207c87d6126715c43970ac22d3aed62
diff --git a/avmedia/source/win/player.cxx b/avmedia/source/win/player.cxx
index dfe6e55..f91c906 100644
--- a/avmedia/source/win/player.cxx
+++ b/avmedia/source/win/player.cxx
@@ -414,7 +414,7 @@ void SAL_CALL Player::setMute( sal_Bool bSet )
{
::osl::MutexGuard aGuard(m_aMutex);
- if( mpBA && ( mbMuted != bSet ) )
+ if (mpBA && (mbMuted != static_cast<bool>(bSet)))
{
mbMuted = bSet;
mpBA->put_Volume( mbMuted ? -10000 : mnUnmutedVolume );
More information about the Libreoffice-commits
mailing list