Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Suppress warnings from -Wsign-compare
  • Loading branch information
mdickinson committed Feb 5, 2023
commit 1222418575311373ea9d721b202f601998f111e4
4 changes: 2 additions & 2 deletions Modules/_ctypes/stgdict.c
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ MakeAnonFields(PyObject *type)

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

int ret = PyOS_snprintf(buf, sizeof(buf), "%zdx", padding);
assert(0 <= ret && ret < sizeof(buf));
assert(0 <= ret && ret < (Py_ssize_t)sizeof(buf));
return _ctypes_alloc_format_string(prefix, buf);
}

Expand Down