Skip to content

Commit 2977abf

Browse files
committed
Ignore return value of _PyOnceFlag_CallOnce
Silence compiler warning about the unused result; the init cannot fail.
1 parent f4d24ff commit 2977abf

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Modules/_struct.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2758,7 +2758,8 @@ _structmodule_exec(PyObject *m)
27582758
return -1;
27592759
}
27602760

2761-
_PyOnceFlag_CallOnce(&endian_tables_init_once, init_endian_tables, NULL);
2761+
/* init cannot fail */
2762+
(void)_PyOnceFlag_CallOnce(&endian_tables_init_once, init_endian_tables, NULL);
27622763

27632764
/* Add some symbolic constants to the module */
27642765
state->StructError = PyErr_NewException("struct.error", NULL, NULL);

0 commit comments

Comments
 (0)