Skip to content

Commit 1222418

Browse files
committed
Suppress warnings from -Wsign-compare
1 parent aed7122 commit 1222418

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Modules/_ctypes/stgdict.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ MakeAnonFields(PyObject *type)
339339

340340
/*
341341
Allocate a memory block for a pep3118 format string, copy prefix (if
342-
non-null) into it and append `{padding}x` to the end.
342+
non-null) into it and append `{padding}x` to the end.
343343
Returns NULL on failure, with the error indicator set.
344344
*/
345345
char *
@@ -356,7 +356,7 @@ _ctypes_alloc_format_padding(const char *prefix, Py_ssize_t padding)
356356
}
357357

358358
int ret = PyOS_snprintf(buf, sizeof(buf), "%zdx", padding);
359-
assert(0 <= ret && ret < sizeof(buf));
359+
assert(0 <= ret && ret < (Py_ssize_t)sizeof(buf));
360360
return _ctypes_alloc_format_string(prefix, buf);
361361
}
362362

0 commit comments

Comments
 (0)