Skip to content

callback - Fixed parameter misname #2817

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

Merged
merged 1 commit into from
Sep 26, 2016
Merged

Conversation

geky
Copy link
Contributor

@geky geky commented Sep 26, 2016

Problematic line:

memcpy(&_func, obj, sizeof obj);

Should be:

memcpy(&_func, method, sizeof method);

Introduced during renaming of callback arguments for clarity: #2794

Unfortunately, the type is hidden by the memcpy since method is shoved into an opaque member-function-pointer type. A generic template solution may have avoided this slip up.

This is a quick patch to fix master, I will look into why the tests did not catch this mistake.

Thanks to @kjbracey-arm for tracking this down.

Problematic line:
memcpy(&_func, obj, sizeof obj);

Should be:
memcpy(&_func, method, sizeof method);

Introduced during renaming of callback arguments for clarity:
ARMmbed#2794
@geky
Copy link
Contributor Author

geky commented Sep 26, 2016

/morph test

@bogdanm
Copy link
Contributor

bogdanm commented Sep 26, 2016

👍
We need this in!

@sg- sg- added the needs: CI label Sep 26, 2016
@mbed-bot
Copy link

Result: SUCCESS

Your command has finished executing! Here's what you wrote!

/morph test

Output

mbed Build Number: 953

All builds and test passed!

@geky
Copy link
Contributor Author

geky commented Sep 26, 2016

LGTM?

@sg- sg- merged commit 7a3594c into ARMmbed:master Sep 26, 2016
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.

4 participants