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
parent
db27ad3ef5
commit
1a801a924e
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue