[Libreoffice-commits] core.git: framework/source
Tor Lillqvist
tml at collabora.com
Mon Sep 9 12:26:26 PDT 2013
framework/source/helper/ocomponentenumeration.cxx | 1 +
framework/source/services/frame.cxx | 4 ++++
2 files changed, 5 insertions(+)
New commits:
commit 7323bc340501c2600944193df54295c28de5482c
Author: Tor Lillqvist <tml at collabora.com>
Date: Mon Sep 9 22:24:49 2013 +0300
WaE: warning C4100: 'aEvent' : unreferenced formal parameter
I thought SAL_WARN_IF etc worked in such a way that any variables used
in the condition would be "used" from the compiler's point of view,
even in an optimising build case where SAL_DETAIL_ENABLE_LOG_WARN is
false and SAL_WARN_IF should optimise away?
Change-Id: I728e1eeb8559e1299abf403afceb0e2748d08857
diff --git a/framework/source/helper/ocomponentenumeration.cxx b/framework/source/helper/ocomponentenumeration.cxx
index 1c65873..2a3de3b 100644
--- a/framework/source/helper/ocomponentenumeration.cxx
+++ b/framework/source/helper/ocomponentenumeration.cxx
@@ -71,6 +71,7 @@ void SAL_CALL OComponentEnumeration::disposing( const EventObject& aEvent ) thro
// Safe impossible cases
// This method is not specified for all incoming parameters.
+ (void) aEvent;
SAL_WARN_IF( !impldbg_checkParameter_disposing( aEvent ), "fwk", "OComponentEnumeration::disposing(): Invalid parameter detected!" );
// Reset instance to defaults, release references and free memory.
diff --git a/framework/source/services/frame.cxx b/framework/source/services/frame.cxx
index 6c06d50..0a4eefc 100644
--- a/framework/source/services/frame.cxx
+++ b/framework/source/services/frame.cxx
@@ -2174,6 +2174,7 @@ void SAL_CALL Frame::windowResized( const css::awt::WindowEvent& aEvent ) throw(
{
/* UNSAFE AREA --------------------------------------------------------------------------------------------- */
// Check incoming parameter.
+ (void) aEvent;
SAL_WARN_IF( implcp_windowResized( aEvent ), "fwk", "Frame::windowResized(): Invalid parameter detected." );
// Look for rejected calls.
// Part of dispose-mechanism => soft exceptions
@@ -2190,6 +2191,7 @@ void SAL_CALL Frame::focusGained( const css::awt::FocusEvent& aEvent ) throw( cs
{
/* UNSAFE AREA --------------------------------------------------------------------------------------------- */
// Check incoming parameter.
+ (void) aEvent;
SAL_WARN_IF( implcp_focusGained( aEvent ), "fwk", "Frame::focusGained(): Invalid parameter detected." );
// Look for rejected calls.
// Part of dispose() mechanism ... => soft exceptions!
@@ -2226,6 +2228,7 @@ void SAL_CALL Frame::windowActivated( const css::lang::EventObject& aEvent ) thr
{
/* UNSAFE AREA --------------------------------------------------------------------------------------------- */
// Check incoming parameter.
+ (void) aEvent;
SAL_WARN_IF( implcp_windowActivated( aEvent ), "fwk", "Frame::windowActivated(): Invalid parameter detected." );
// Look for rejected calls.
TransactionGuard aTransaction( m_aTransactionManager, E_HARDEXCEPTIONS );
@@ -2249,6 +2252,7 @@ void SAL_CALL Frame::windowDeactivated( const css::lang::EventObject& aEvent ) t
{
/* UNSAFE AREA --------------------------------------------------------------------------------------------- */
// Check incoming parameter.
+ (void) aEvent;
SAL_WARN_IF( implcp_windowDeactivated( aEvent ), "fwk", "Frame::windowDeactivated(): Invalid parameter detected." );
// Look for rejected calls.
// Sometimes called during dispose() => soft exceptions
More information about the Libreoffice-commits
mailing list