2010-10-27 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>

Removed unused variable r.
	* src/StringFormat.cc
pull/1/head
Tatsuhiro Tsujikawa 2010-10-27 14:58:47 +00:00
parent 9ff8e55d04
commit 17a0a5baad
2 changed files with 6 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2010-10-27 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Removed unused variable r.
* src/StringFormat.cc
2010-10-27 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net> 2010-10-27 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added printf format check attribute. Added printf format check attribute.

View File

@ -46,8 +46,7 @@ StringFormat::StringFormat(const char* fmt, ...)
va_list ap; va_list ap;
va_start(ap, fmt); va_start(ap, fmt);
char buf[1024]; char buf[1024];
int r; if(vsnprintf(buf, sizeof(buf), fmt, ap) > 0) {
if((r = vsnprintf(buf, sizeof(buf), fmt, ap)) > 0) {
msg_ = buf; msg_ = buf;
} }
va_end(ap); va_end(ap);