Skip to content

Commit 957ea75

Browse files
aescolarcarlescufi
authored andcommitted
test lwm2m/engine: Fix build warning
Fix a build warning that is generated by new enough compilers, when they detect the sprintf() may overflow the destination buffer lenght. The code which was generating the warnig was actually not used, so we just remove it. Signed-off-by: Alberto Escolar Piedras <[email protected]>
1 parent 6d2778e commit 957ea75

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

tests/net/lib/lwm2m/engine/src/lwm2m_observation.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,6 @@ static void run_insertion_test(char const *insert_path_str[], int insertions_cou
228228

229229
/* WHEN: inserting each path */
230230
struct lwm2m_obj_path insert_path;
231-
char name[20];
232231

233232
for (int i = 0; i < insertions_count; ++i) {
234233
ret = lwm2m_string_to_path(insert_path_str[i], &insert_path, '/');
@@ -237,7 +236,6 @@ static void run_insertion_test(char const *insert_path_str[], int insertions_cou
237236
ret = lwm2m_engine_add_path_to_list(&lwm2m_path_list, &lwm2m_path_free_list,
238237
&insert_path);
239238

240-
sprintf(name, "Insertion: %d", i);
241239
zassert_true(ret >= 0, "Insertion #%d failed", i);
242240
/* THEN: path order is maintained */
243241
assert_path_list_order(&lwm2m_path_list);

0 commit comments

Comments
 (0)