From 17a0a5baadc1abe011825d883faaf501f2c75ed0 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Wed, 27 Oct 2010 14:58:47 +0000 Subject: [PATCH] 2010-10-27 Tatsuhiro Tsujikawa Removed unused variable r. * src/StringFormat.cc --- ChangeLog | 5 +++++ src/StringFormat.cc | 3 +-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 28c5c886..f5b990ce 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2010-10-27 Tatsuhiro Tsujikawa + + Removed unused variable r. + * src/StringFormat.cc + 2010-10-27 Tatsuhiro Tsujikawa Added printf format check attribute. diff --git a/src/StringFormat.cc b/src/StringFormat.cc index 88724636..a39eb929 100644 --- a/src/StringFormat.cc +++ b/src/StringFormat.cc @@ -46,8 +46,7 @@ StringFormat::StringFormat(const char* fmt, ...) va_list ap; va_start(ap, fmt); char buf[1024]; - int r; - if((r = vsnprintf(buf, sizeof(buf), fmt, ap)) > 0) { + if(vsnprintf(buf, sizeof(buf), fmt, ap) > 0) { msg_ = buf; } va_end(ap);