You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficserver.apache.org by "James Peach (JIRA)" <ji...@apache.org> on 2016/08/18 21:45:20 UTC
[jira] [Resolved] (TS-4668) Coverity 1021677, 1021676 :
Uninitialized members in traffic_top/stats.h
[ https://issues.apache.org/jira/browse/TS-4668?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
James Peach resolved TS-4668.
-----------------------------
Resolution: Fixed
> Coverity 1021677, 1021676 : Uninitialized members in traffic_top/stats.h
> ------------------------------------------------------------------------
>
> Key: TS-4668
> URL: https://issues.apache.org/jira/browse/TS-4668
> Project: Traffic Server
> Issue Type: Bug
> Components: Tools
> Reporter: Leif Hedstrom
> Assignee: Tyler Stroh
> Fix For: 7.0.0
>
> Time Spent: 50m
> Remaining Estimate: 0h
>
> Not sure why it discovered these now, but filing this regardless :).
> {code}
> ** CID 1021677: Uninitialized members (UNINIT_CTOR)
> /cmd/traffic_top/stats.h: 36 in LookupItem::LookupItem(const char *, const char *, int)()
> ________________________________________________________________________________________________________
> *** CID 1021677: Uninitialized members (UNINIT_CTOR)
> /cmd/traffic_top/stats.h: 36 in LookupItem::LookupItem(const char *, const char *, int)()
> 30 #include <inttypes.h>
> 31 #include "mgmtapi.h"
> 32
> 33 using namespace std;
> 34
> 35 struct LookupItem {
> CID 1021677: Uninitialized members (UNINIT_CTOR)
> Non-static class member "denominator" is not initialized in this constructor nor in any functions that it calls.
> 36 LookupItem(const char *s, const char *n, const int t) : pretty(s), name(n), type(t) {}
> 37 LookupItem(const char *s, const char *n, const char *d, const int t) : pretty(s), name(n), numerator(n), denominator(d), type(t)
> 38 {
> 39 }
> 40 const char *pretty;
> 41 const char *name;
> ** CID 1021676: Uninitialized members (UNINIT_CTOR)
> /cmd/traffic_top/stats.h: 237 in Stats::Stats(const std::basic_string<char, std::char_traits<char>, std::allocator<char>>&)()
> ________________________________________________________________________________________________________
> *** CID 1021676: Uninitialized members (UNINIT_CTOR)
> /cmd/traffic_top/stats.h: 237 in Stats::Stats(const std::basic_string<char, std::char_traits<char>, std::allocator<char>>&)()
> 231
> 232 lookup_table.insert(make_pair("total_time", LookupItem("Total Time", "proxy.process.http.total_transactions_time", 2)));
> 233
> 234 // ratio
> 235 lookup_table.insert(make_pair("client_req_time", LookupItem("Resp (ms)", "total_time", "client_req", 3)));
> 236 lookup_table.insert(make_pair("client_dyn_ka", LookupItem("Dynamic KA", "ka_total", "ka_count", 3)));
> CID 1021676: Uninitialized members (UNINIT_CTOR)
> Non-static class member field "_time.tv_usec" is not initialized in this constructor nor in any functions that it calls.
> 237 }
> 238
> 239 void
> 240 getStats()
> 241 {
> 242 if (_url == "") {
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)