Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[C++] Cast memcpy argument to size_t #730

Merged
merged 1 commit into from
Oct 15, 2019

Conversation

trozen
Copy link
Contributor

@trozen trozen commented Oct 15, 2019

memcpy is expecting a size_t argument, 32-bit builds fail with the following message:

error: conversion to ‘size_t {aka unsigned int}’ from ‘uint64_t {aka long long unsigned int}’ may alter its value [-Werror=conversion]

Adding explicit cast to silence these errors/warnings.

(IMO it would be better to use size_t where byte arrays and offsets are referenced. However this would change the public interface, so didn't want to to this as part of this PR.)

@mjpt777 mjpt777 merged commit 353b6c5 into real-logic:master Oct 15, 2019
@trozen trozen deleted the memcpy-sizet-cast branch October 15, 2019 11:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants