From 6fbd940a2f94f6e184303d5ba26c98199557ec60 Mon Sep 17 00:00:00 2001 From: Lukasz Gromanowski Date: Sat, 4 May 2013 07:31:54 +0200 Subject: [PATCH] Fix warning issued by GCC 4.8 in oics/tinyxml.cpp MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix warning issued by GCC 4.8 (and as far I remember 4.7 too) about not supported "%lf" format string: openmw/extern/oics/tinyxml.cpp: In member function ‘void TiXmlAttribute::SetDoubleValue(double)’: openmw/extern/oics/tinyxml.cpp:1269:50: warning: ISO C++98 does not support the ‘%lf’ gnu_printf format [-Wformat=] TIXML_SNPRINTF( buf, sizeof(buf), "%lf", _value); ^ Signed-off-by: Lukasz Gromanowski --- extern/oics/tinyxml.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/extern/oics/tinyxml.cpp b/extern/oics/tinyxml.cpp index 841a41cd3..29a4768aa 100644 --- a/extern/oics/tinyxml.cpp +++ b/extern/oics/tinyxml.cpp @@ -706,9 +706,9 @@ void TiXmlElement::SetDoubleAttribute( const char * name, double val ) { char buf[256]; #if defined(TIXML_SNPRINTF) - TIXML_SNPRINTF( buf, sizeof(buf), "%f", val ); + TIXML_SNPRINTF( buf, sizeof(buf), "%f", val ); #else - sprintf( buf, "%f", val ); + sprintf( buf, "%f", val ); #endif SetAttribute( name, buf ); } @@ -1266,9 +1266,9 @@ void TiXmlAttribute::SetDoubleValue( double _value ) { char buf [256]; #if defined(TIXML_SNPRINTF) - TIXML_SNPRINTF( buf, sizeof(buf), "%lf", _value); + TIXML_SNPRINTF( buf, sizeof(buf), "%f", _value); #else - sprintf (buf, "%lf", _value); + sprintf (buf, "%f", _value); #endif SetValue (buf); }