Skip to content

Conversation

skrah
Copy link
Contributor

@skrah skrah commented Aug 25, 2017

}
memcpy(sval, PyByteArray_AS_STRING(self),
Py_MIN(requested_size, Py_SIZE(self)));
Py_MIN((size_t)requested_size, (size_t)Py_SIZE(self)));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can use size instead of (size_t)requested_size.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but I'd prefer to use const size_t size = (size_t) requested_size; then. It would be one more change.

GadgetSteve pushed a commit to GadgetSteve/cpython that referenced this pull request Sep 10, 2017
vstinner added a commit that referenced this pull request Nov 29, 2017
* bpo-30923: Silence fall-through warnings in libexpat build. (#3205)

(cherry picked from commit 9e1e6f5)

* bpo-31279: Silence -Wstringop-overflow warning. (#3207)

(cherry picked from commit dce6502)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants