From: genete Date: Wed, 12 Nov 2008 19:01:34 +0000 (+0000) Subject: Stop a bunch of compile warnings about not used returned value from vasprintf functio... X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=5fcd703aaea3794acfcaee35f91265d7ad2247ac;p=synfig.git Stop a bunch of compile warnings about not used returned value from vasprintf function in _string.h file. git-svn-id: https://synfig.svn.sourceforge.net/svnroot/synfig@2190 1f10aa63-cdf2-0310-b900-c93c546f37ac --- diff --git a/ETL/trunk/ETL/_stringf.h b/ETL/trunk/ETL/_stringf.h index 6962799..f91cfca 100644 --- a/ETL/trunk/ETL/_stringf.h +++ b/ETL/trunk/ETL/_stringf.h @@ -91,9 +91,12 @@ vstrprintf(const char *format, va_list args) #ifdef HAVE_VASPRINTF // This is the preferred method (and safest) char *buffer; std::string ret; - vasprintf(&buffer,format,args); - ret=buffer; - free(buffer); + int i=vasprintf(&buffer,format,args); + if (i>-1) + { + ret=buffer; + free(buffer); + } return ret; #else #ifdef HAVE_VSNPRINTF // This is the secondary method (Safe, but bulky)