summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
739b8e1)
Building with GCC 11.2 results in the following warning :
In file included from ../../src/common/tracker.h:18,
from ../../src/bin/lttng-sessiond/trace-ust.h:17,
from test_ust_data.cpp:19:
../../src/common/sessiond-comm/sessiond-comm.h:569:14: note: while referencing ‘lttng_event_exclusion::names’
569 | char names[0][LTTNG_SYMBOL_NAME_LEN];
| ^~~~~
test_ust_data.cpp:209:16: warning: ‘char* strncpy(char*, const char*, size_t)’ specified bound 256 equals destination size [-Wstringop-truncation]
209 | strncpy(LTTNG_EVENT_EXCLUSION_NAME_AT(exclusion, 0),
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
210 | get_random_string(), LTTNG_SYMBOL_NAME_LEN);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
test_ust_data.cpp:211:16: warning: ‘char* strncpy(char*, const char*, size_t)’ specified bound 256 equals destination size [-Wstringop-truncation]
211 | strncpy(LTTNG_EVENT_EXCLUSION_NAME_AT(exclusion, 1),
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
212 | get_random_string(), LTTNG_SYMBOL_NAME_LEN);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Change-Id: I78eea760b4684227ee457c3368c6397d0a767af5
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
exclusion->count = exclusion_count;
random_name = get_random_string();
strncpy(LTTNG_EVENT_EXCLUSION_NAME_AT(exclusion, 0), random_name,
exclusion->count = exclusion_count;
random_name = get_random_string();
strncpy(LTTNG_EVENT_EXCLUSION_NAME_AT(exclusion, 0), random_name,
- LTTNG_SYMBOL_NAME_LEN);
+ LTTNG_SYMBOL_NAME_LEN - 1);
strncpy(LTTNG_EVENT_EXCLUSION_NAME_AT(exclusion, 1), random_name,
strncpy(LTTNG_EVENT_EXCLUSION_NAME_AT(exclusion, 1), random_name,
- LTTNG_SYMBOL_NAME_LEN);
+ LTTNG_SYMBOL_NAME_LEN - 1);
ret = trace_ust_create_event(&ev, NULL, NULL, exclusion, false, &event);
exclusion = NULL;
ret = trace_ust_create_event(&ev, NULL, NULL, exclusion, false, &event);
exclusion = NULL;
exclusion->count = exclusion_count;
strncpy(LTTNG_EVENT_EXCLUSION_NAME_AT(exclusion, 0),
exclusion->count = exclusion_count;
strncpy(LTTNG_EVENT_EXCLUSION_NAME_AT(exclusion, 0),
- get_random_string(), LTTNG_SYMBOL_NAME_LEN);
+ get_random_string(), LTTNG_SYMBOL_NAME_LEN - 1);
strncpy(LTTNG_EVENT_EXCLUSION_NAME_AT(exclusion, 1),
strncpy(LTTNG_EVENT_EXCLUSION_NAME_AT(exclusion, 1),
- get_random_string(), LTTNG_SYMBOL_NAME_LEN);
+ get_random_string(), LTTNG_SYMBOL_NAME_LEN - 1);
exclusion_copy->count = exclusion_count;
strncpy(LTTNG_EVENT_EXCLUSION_NAME_AT(exclusion_copy, 0),
exclusion_copy->count = exclusion_count;
strncpy(LTTNG_EVENT_EXCLUSION_NAME_AT(exclusion_copy, 0),