Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


Hi,

if I remember correctly cppcheck complained about some statements in the context of OSL_FILE_TRACE. This patch simplifies the definition of OSL_FILE_TRACE ( => code better readable) and facilitates compiling without warnings. Please review in case there was some magic behind the original definition...

Thank you,
Christina
From dca0c130a360481eaae32d863c0fca77bd0941fb Mon Sep 17 00:00:00 2001
From: Christina Rossmanith <ChrRossmanith@web.de>
Date: Fri, 13 May 2011 21:36:25 +0200
Subject: [PATCH] Simplified #define OSL_FILE_TRACE

---
 sal/osl/unx/file.cxx |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/sal/osl/unx/file.cxx b/sal/osl/unx/file.cxx
index 24f6311..6507d9c 100644
--- a/sal/osl/unx/file.cxx
+++ b/sal/osl/unx/file.cxx
@@ -59,13 +59,15 @@
 #endif /* MACOSX */
 
 #ifdef DEBUG_OSL_FILE
-#   define OSL_FILE_TRACE 0 ? (void)(0) : osl_trace
+#   define OSL_FILE_TRACE osl_trace
 #      define PERROR( a, b ) perror( a ); fprintf( stderr, b )
 #else
-#   define OSL_FILE_TRACE 1 ? (void)(0) : osl_trace
+#   define OSL_FILE_TRACE(fmt, ...)
 #      define PERROR( a, b )
 #endif
 
+
+
 /*******************************************************************
  *
  * FileHandle_Impl interface
-- 
1.7.0.4


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.