fixed some of the issues reported by coverity scan (mainly uninitialised class members)

This commit is contained in:
csoler 2016-01-01 22:36:07 -05:00
parent ab3939cd9a
commit b6b5f9cd17
5 changed files with 416 additions and 389 deletions

View File

@ -51,7 +51,7 @@ class PgpAuxUtils;
class RsGroupNetworkStatsRecord class RsGroupNetworkStatsRecord
{ {
public: public:
RsGroupNetworkStatsRecord() { max_visible_count= 0 ; } RsGroupNetworkStatsRecord() { max_visible_count= 0 ; update_TS=0; }
std::set<RsPeerId> suppliers ; std::set<RsPeerId> suppliers ;
uint32_t max_visible_count ; uint32_t max_visible_count ;

View File

@ -73,7 +73,7 @@ class RsGxsTunnelItem: public RsItem
class RsGxsTunnelDataItem: public RsGxsTunnelItem class RsGxsTunnelDataItem: public RsGxsTunnelItem
{ {
public: public:
RsGxsTunnelDataItem() :RsGxsTunnelItem(RS_PKT_SUBTYPE_GXS_TUNNEL_DATA) { data=NULL ;data_size=0; } RsGxsTunnelDataItem() :RsGxsTunnelItem(RS_PKT_SUBTYPE_GXS_TUNNEL_DATA) { data=NULL ;data_size=0;service_id=0;unique_item_counter=0; }
RsGxsTunnelDataItem(uint8_t subtype) :RsGxsTunnelItem(subtype) { data=NULL ;data_size=0; } RsGxsTunnelDataItem(uint8_t subtype) :RsGxsTunnelItem(subtype) { data=NULL ;data_size=0; }
virtual ~RsGxsTunnelDataItem() {} virtual ~RsGxsTunnelDataItem() {}
@ -96,7 +96,7 @@ public:
class RsGxsTunnelStatusItem: public RsGxsTunnelItem class RsGxsTunnelStatusItem: public RsGxsTunnelItem
{ {
public: public:
RsGxsTunnelStatusItem() :RsGxsTunnelItem(RS_PKT_SUBTYPE_GXS_TUNNEL_STATUS) {} RsGxsTunnelStatusItem() :RsGxsTunnelItem(RS_PKT_SUBTYPE_GXS_TUNNEL_STATUS) , status(0) {}
RsGxsTunnelStatusItem(void *data,uint32_t size) ; // deserialization RsGxsTunnelStatusItem(void *data,uint32_t size) ; // deserialization
virtual ~RsGxsTunnelStatusItem() {} virtual ~RsGxsTunnelStatusItem() {}

View File

@ -87,7 +87,7 @@ class GxsReputation
class RsGxsIdGroup class RsGxsIdGroup
{ {
public: public:
RsGxsIdGroup(): mLastUsageTS(0), mPgpKnown(false) { return; } RsGxsIdGroup(): mLastUsageTS(0), mPgpKnown(false),mIsAContact(false) { return; }
~RsGxsIdGroup() { return; } ~RsGxsIdGroup() { return; }

View File

@ -41,6 +41,8 @@ public:
struct ReputationInfo struct ReputationInfo
{ {
ReputationInfo() : mOwnOpinion(OPINION_NEUTRAL), mOverallReputationScore(REPUTATION_THRESHOLD_DEFAULT), mFriendAverage(REPUTATION_THRESHOLD_DEFAULT),mAssessment(ASSESSMENT_OK){}
RsReputations::Opinion mOwnOpinion ; RsReputations::Opinion mOwnOpinion ;
float mOverallReputationScore ; float mOverallReputationScore ;
float mFriendAverage ; float mFriendAverage ;

View File

@ -6,8 +6,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>826</width> <width>1484</width>
<height>630</height> <height>791</height>
</rect> </rect>
</property> </property>
<property name="sizePolicy"> <property name="sizePolicy">
@ -20,18 +20,6 @@
<string/> <string/>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_6"> <layout class="QVBoxLayout" name="verticalLayout_6">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item> <item>
<widget class="QFrame" name="titleBarFrame"> <widget class="QFrame" name="titleBarFrame">
<property name="sizePolicy"> <property name="sizePolicy">
@ -46,19 +34,7 @@
<property name="frameShadow"> <property name="frameShadow">
<enum>QFrame::Sunken</enum> <enum>QFrame::Sunken</enum>
</property> </property>
<layout class="QHBoxLayout" name="horizontalLayout_3"> <layout class="QHBoxLayout" name="horizontalLayout">
<property name="leftMargin">
<number>2</number>
</property>
<property name="topMargin">
<number>2</number>
</property>
<property name="rightMargin">
<number>2</number>
</property>
<property name="bottomMargin">
<number>2</number>
</property>
<item> <item>
<widget class="QLabel" name="titleBarPixmap"> <widget class="QLabel" name="titleBarPixmap">
<property name="minimumSize"> <property name="minimumSize">
@ -147,16 +123,7 @@
<enum>QFrame::Sunken</enum> <enum>QFrame::Sunken</enum>
</property> </property>
<layout class="QHBoxLayout" name="horizontalLayout_2"> <layout class="QHBoxLayout" name="horizontalLayout_2">
<property name="leftMargin"> <property name="margin">
<number>2</number>
</property>
<property name="topMargin">
<number>2</number>
</property>
<property name="rightMargin">
<number>2</number>
</property>
<property name="bottomMargin">
<number>2</number> <number>2</number>
</property> </property>
<item> <item>
@ -252,14 +219,23 @@
<string>Reputation</string> <string>Reputation</string>
</property> </property>
<property name="textAlignment"> <property name="textAlignment">
<set>AlignLeading|AlignVCenter</set> <set>AlignLeft|AlignVCenter</set>
</property> </property>
</column> </column>
</widget> </widget>
</item> </item>
</layout> </layout>
</widget> </widget>
<widget class="QWidget" name="layoutWidget1"> <widget class="QTabWidget" name="tabWidget1">
<property name="currentIndex">
<number>0</number>
</property>
<widget class="QWidget" name="tab_2">
<attribute name="title">
<string>Person</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QVBoxLayout" name="verticalLayout_4"> <layout class="QVBoxLayout" name="verticalLayout_4">
<item> <item>
<widget class="QFrame" name="headerFrame"> <widget class="QFrame" name="headerFrame">
@ -316,16 +292,7 @@
<layout class="QGridLayout" name="gridLayout_3"> <layout class="QGridLayout" name="gridLayout_3">
<item row="0" column="0"> <item row="0" column="0">
<layout class="QGridLayout" name="gridLayout"> <layout class="QGridLayout" name="gridLayout">
<property name="leftMargin"> <property name="margin">
<number>6</number>
</property>
<property name="topMargin">
<number>6</number>
</property>
<property name="rightMargin">
<number>6</number>
</property>
<property name="bottomMargin">
<number>6</number> <number>6</number>
</property> </property>
<property name="spacing"> <property name="spacing">
@ -499,16 +466,7 @@
<layout class="QVBoxLayout" name="verticalLayout_2"> <layout class="QVBoxLayout" name="verticalLayout_2">
<item> <item>
<layout class="QGridLayout" name="gridLayout_2"> <layout class="QGridLayout" name="gridLayout_2">
<property name="leftMargin"> <property name="margin">
<number>6</number>
</property>
<property name="topMargin">
<number>6</number>
</property>
<property name="rightMargin">
<number>6</number>
</property>
<property name="bottomMargin">
<number>6</number> <number>6</number>
</property> </property>
<item row="2" column="1"> <item row="2" column="1">
@ -629,6 +587,77 @@ p, li { white-space: pre-wrap; }
</spacer> </spacer>
</item> </item>
</layout> </layout>
</item>
</layout>
</widget>
<widget class="QWidget" name="tab">
<attribute name="title">
<string>Circles</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_5">
<item row="0" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_7">
<item>
<widget class="QPushButton" name="pushButton_extCircle">
<property name="text">
<string>Create Circle</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButton_editCircle">
<property name="text">
<string>Edit Circle</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item row="1" column="0">
<widget class="QTreeWidget" name="treeWidget_membership">
<property name="contextMenuPolicy">
<enum>Qt::CustomContextMenu</enum>
</property>
<property name="sortingEnabled">
<bool>true</bool>
</property>
<column>
<property name="text">
<string>Name</string>
</property>
</column>
<column>
<property name="text">
<string>IDs</string>
</property>
</column>
<item>
<property name="text">
<string>Public Circles</string>
</property>
</item>
<item>
<property name="text">
<string>Personal Circles</string>
</property>
</item>
</widget>
</item>
</layout>
</widget>
</widget> </widget>
</widget> </widget>
</item> </item>
@ -691,10 +720,6 @@ p, li { white-space: pre-wrap; }
</customwidgets> </customwidgets>
<tabstops> <tabstops>
<tabstop>idTreeWidget</tabstop> <tabstop>idTreeWidget</tabstop>
<tabstop>lineEdit_Nickname</tabstop>
<tabstop>lineEdit_KeyId</tabstop>
<tabstop>lineEdit_GpgId</tabstop>
<tabstop>lineEdit_GpgName</tabstop>
</tabstops> </tabstops>
<resources> <resources>
<include location="../images.qrc"/> <include location="../images.qrc"/>