Skip to content

Commit c9b62fa

Browse files
committed
fix -Wdefault-const-init-field-unsafe with clang
1 parent 4d252b6 commit c9b62fa

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

test/unit-testing/dxf_test.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ test_subclass (const Dwg_Data *restrict dwg, const void *restrict ptr,
5858
const char *restrict subclass, const char *restrict fieldname,
5959
const char *restrict key, int index)
6060
{
61-
Dwg_DYNAPI_field field;
61+
Dwg_DYNAPI_field field = { 0 };
6262
enum RESBUF_VALUE_TYPE vtype;
6363
Dwg_Version_Type dwg_version = dwg->header.version;
6464

@@ -407,7 +407,7 @@ test_object (const Dwg_Data *restrict dwg, const Dwg_Object *restrict obj,
407407
// check all fields against dxf->fields
408408
for (; f->value; f++)
409409
{
410-
Dwg_DYNAPI_field field;
410+
Dwg_DYNAPI_field field = { 0 };
411411
const Dwg_DYNAPI_field *fp, *fp1;
412412
enum RESBUF_VALUE_TYPE vtype;
413413
if (!f->name || !*f->name)

0 commit comments

Comments
 (0)