Skip to content

Commit

Permalink
fix(libsinsp/tests): explicit const char* on string literal
Browse files Browse the repository at this point in the history
Signed-off-by: Luca Guerra <[email protected]>
  • Loading branch information
LucaGuerra authored and poiana committed Aug 21, 2024
1 parent 5724d78 commit c8dfe45
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions userspace/libsinsp/test/plugins.ut.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -581,12 +581,12 @@ TEST_F(sinsp_with_test_input, plugin_tables)
// we open a capture and iterate, so that we make sure that all
// the state operations keep working at every round of the loop
open_inspector();
auto asyncname = "sampleasync";
auto sample_plugin_evtdata = "hello world";
const char* asyncname = "sampleasync";
const char* sample_plugin_evtdata = "hello world";
uint64_t max_iterations = 10000;
for (uint64_t i = 0; i < max_iterations; i++)
{
auto evt = add_event_advance_ts(increasing_ts(), 1, PPME_ASYNCEVENT_E, 3, (uint32_t) 0, asyncname, scap_const_sized_buffer{&sample_plugin_evtdata, strlen(sample_plugin_evtdata) + 1});
auto evt = add_event_advance_ts(increasing_ts(), 1, PPME_ASYNCEVENT_E, 3, (uint32_t) 0, asyncname, scap_const_sized_buffer{sample_plugin_evtdata, strlen(sample_plugin_evtdata) + 1});
ASSERT_EQ(evt->get_type(), PPME_ASYNCEVENT_E);
ASSERT_EQ(evt->get_source_idx(), 0);
}
Expand Down

0 comments on commit c8dfe45

Please sign in to comment.