Skip to content

Commit d7255c3

Browse files
author
Pavel Siska
committed
ipfixprobe - fix build warnings
1 parent 4546ff6 commit d7255c3

File tree

4 files changed

+5
-7
lines changed

4 files changed

+5
-7
lines changed

include/ipfixprobe/outputPlugin.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ namespace ipxp {
3333
class IPXP_API OutputPlugin : public Plugin {
3434
public:
3535
using ProcessPlugins = std::vector<std::pair<std::string, std::shared_ptr<ProcessPlugin>>>;
36+
using Plugin::init;
3637
uint64_t m_flows_seen; /**< Number of flows received to export. */
3738
uint64_t m_flows_dropped; /**< Number of flows that could not be exported. */
3839

src/core/ipfixprobe.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,8 @@
2626
*
2727
*/
2828

29-
#include "ipfixprobe.hpp"
30-
3129
#include "buildConfig.hpp"
30+
#include "ipfixprobe.hpp"
3231
#include "stacktrace.hpp"
3332
#include "stats.hpp"
3433

@@ -145,7 +144,7 @@ static void printRegisteredPlugins(
145144
std::cout << "#####################\n";
146145
}
147146

148-
static void printPlugins()
147+
[[maybe_unused]] static void printPlugins()
149148
{
150149
auto& inputPluginFactory = InputPluginFactory::getInstance();
151150
auto& storagePluginFactory = StoragePluginFactory::getInstance();

src/plugins/input/nfb/src/ndp.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
*/
1212

1313
#include "ndp.hpp"
14-
1514
#include "parser.hpp"
1615

1716
#include <algorithm>
@@ -125,7 +124,6 @@ InputPlugin::Result NdpPacketReader::get(PacketBlock& packets)
125124
parser_opt_t opt = {&packets, false, false, 0};
126125
struct ndp_packet* ndp_packet;
127126
struct timeval timestamp;
128-
int ret = -1;
129127

130128
packets.cnt = 0;
131129
constexpr size_t maxBurstSize = 64;
@@ -148,7 +146,7 @@ InputPlugin::Result NdpPacketReader::get(PacketBlock& packets)
148146
received += reader.get_packets(packetSpan, timestampSpan);
149147
}
150148

151-
for (unsigned i = 0; i < received; ++i) {
149+
for (unsigned i = 0; i < static_cast<unsigned>(received); ++i) {
152150
ndp_packet = &ndp_packet_burst[i];
153151
timestamp = timestamps[i];
154152

src/plugins/output/ipfix/src/ipfix.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ static const PluginManifest ipfixPluginManifest = {
100100
*
101101
* name enterprise-number element-id length
102102
*/
103-
template_file_record_t ipfix_fields[][1] = {IPFIX_ENABLED_TEMPLATES(X) nullptr};
103+
template_file_record_t ipfix_fields[][1] = {IPFIX_ENABLED_TEMPLATES(X) {}};
104104

105105
/* Basic IPv4 template. */
106106
const char* basic_tmplt_v4[] = {BASIC_TMPLT_V4(IPFIX_FIELD_NAMES) nullptr};

0 commit comments

Comments
 (0)