THRIFT-3067 C++ cppcheck performance related warnings
Patch: Arijit Chattopadhyay <arijitnit06@gmail.com>
This closes #444
diff --git a/contrib/fb303/TClientInfo.cpp b/contrib/fb303/TClientInfo.cpp
index 5959fb1..1fc6612 100644
--- a/contrib/fb303/TClientInfo.cpp
+++ b/contrib/fb303/TClientInfo.cpp
@@ -154,9 +154,8 @@
}
timespec start;
- double secs = 0.0;
info->getTime(&start);
- secs = (double)(now.tv_sec - start.tv_sec) + (now.tv_nsec - start.tv_nsec)*0.000000001;
+ double secs = (double)(now.tv_sec - start.tv_sec) + (now.tv_nsec - start.tv_nsec)*0.000000001;
char buf[256];
snprintf(buf, sizeof buf, "%d %s %s %.3f %llu", i, addrStr, callStr, secs,