Skip to content

Commit ecfabb3

Browse files
committed
Fix warning about empty statements (";") after macro calls.
1 parent c7ae4a5 commit ecfabb3

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

pytox/av.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -727,7 +727,7 @@ void ToxAVCore_install_dict(void)
727727
#define SET(name) \
728728
PyObject* obj_##name = PyLong_FromLong(TOXAV_##name); \
729729
PyDict_SetItemString(dict, #name, obj_##name); \
730-
Py_DECREF(obj_##name);
730+
Py_DECREF(obj_##name)
731731

732732
PyObject* dict = PyDict_New();
733733
SET(FRIEND_CALL_STATE_ERROR);

pytox/util.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@
2828

2929
extern PyObject* ToxOpError;
3030

31-
#define CHECK_TOX(self) \
32-
if ((self)->tox == NULL) { \
31+
#define CHECK_TOX(SELF) \
32+
do { if ((SELF)->tox == NULL) { \
3333
PyErr_SetString(ToxOpError, "toxcore object not initialised."); \
3434
return NULL; \
35-
}
35+
} } while (0)
3636

3737
#if PY_MAJOR_VERSION < 3
3838
#define PYSTRING_FromString PyString_FromString

0 commit comments

Comments
 (0)