-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Closed
Labels
Description
What happens?
*** CID 509099: Incorrect expression (UNUSED_VALUE)
/test/api/capi/test_capi_data_chunk.cpp: 419 in ____C_A_T_C_H____T_E_S_T____102()()
413 REQUIRE(duckdb_list_vector_get_size(list_vector) == 123);
414
415 #if STANDARD_VECTOR_SIZE > 2
416 auto entries = (duckdb_list_entry *)duckdb_vector_get_data(list_vector);
417 entries[0].offset = 0;
418 entries[0].length = 20;
>>> CID 509099: Incorrect expression (UNUSED_VALUE)
>>> Assigning value "20UL" to "entries[1].offset" here, but that stored value is overwritten before it can be used.
419 entries[1].offset = 20;
420 entries[1].offset = 80;
421 entries[2].offset = 100;
422 entries[2].length = 23;
423
424 auto vector = (Vector &)(*list_vector);
entries[1].offset
is set twice
entries[1].length
is left uninitialized