Added default values for some variables in the IpfixDbWriter

This commit adds default values for two variables, ipfixId and
enterpriseId, in the IpfixDbWriterSQL. Usually, these variables will
always be set or an exception will be thrown, but gcc (tested with
gcc 8.3.0 on debian) doesn't see this and will fail to compile due
to -Werror. This commit fixes the issue by setting both variables to
zero at initialization.
master
Sebastian 2020-05-11 02:06:01 +02:00
parent db27ad3ef5
commit 1a801a924e
No known key found for this signature in database
GPG Key ID: 980FF725301CB4AE
1 changed files with 2 additions and 2 deletions

View File

@ -777,8 +777,8 @@ IpfixDbWriterSQL::IpfixDbWriterSQL(const char* dbtype, const char* host, const c
for(vector<string>::const_iterator col = columns.begin(); col != columns.end(); col++) {
std::string columnName = *col;
std::string dataType = "";
uint16_t ipfixId;
uint32_t enterpriseId;
uint16_t ipfixId = 0;
uint32_t enterpriseId = 0;
if (useLegacyNames) {
bool found = false;
int i = 0;