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


On 08/06/2012 08:32 PM, Ivan Timofeev wrote:
commit 770f581623ed0c7d31b9751ee789a72272b07c6c
Author: Ivan Timofeev <timofeev.i.s@gmail.com>
Date:   Mon Aug 6 22:31:16 2012 +0400

     -Werror=format-security

     Change-Id: Idb1267108a9eb8d08e1a14685a2f5c9a6263b46d

diff --git a/sd/source/ui/remotecontrol/ImagePreparer.cxx 
b/sd/source/ui/remotecontrol/ImagePreparer.cxx
index 3555aee..06a8c6d 100644
--- a/sd/source/ui/remotecontrol/ImagePreparer.cxx
+++ b/sd/source/ui/remotecontrol/ImagePreparer.cxx
@@ -229,7 +229,7 @@ OString ImagePreparer::notesToHtml( sal_uInt32 aSlideNumber )

      OUString aFileURL;
      FileBase::createTempFile( 0, 0, &aFileURL );
-    fprintf( stderr, OUStringToOString( aFileURL, RTL_TEXTENCODING_UTF8).getStr() );
+    fprintf( stderr, "%s", OUStringToOString( aFileURL, RTL_TEXTENCODING_UTF8).getStr() );

Folks, please do not pollute the sources with fprintf in the first place. Use SAL_INFO/SAL_WARN for permanent warning code (see <http://wiki.documentfoundation.org/Development#Assertions_and_Logging>), and use SAL_DEBUG for temporary debug output (that the LO git commit hooks will prevent from accidentally becoming permanent).

Thanks,
Stephan

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.