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 <chrrossman...@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

_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice

Reply via email to