Skip to content

Avoid type collision by renaming callback variable #12

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

Closed
wants to merge 1 commit into from

Conversation

artokin
Copy link

@artokin artokin commented Sep 13, 2016

Build error "arm_hal_timer.cpp:50:5: error: reference to 'callback'
is ambiguous".

Fix the build error by renaming callback to arm_hal_callback to
avoid collision with callback defined in ./mbed-os/hal/api/Callback.h

Build error "arm_hal_timer.cpp:50:5: error: reference to 'callback'
is ambiguous".

Fix the build error by renaming callback to arm_hal_callback to
avoid collision with callback defined in ./mbed-os/hal/api/Callback.h
@artokin
Copy link
Author

artokin commented Sep 13, 2016

@kjbracey-arm , @mikter would you please review?

@kjbracey
Copy link
Contributor

I'd say that having "mbed.h" add "callback" to the global namespace is the primary sin here. We won't be the only component broken by that.

And fixing it here for mbed-os requires actually an extra step over changing mbed-os. This is fine as-is though.

See how to actually get it in...

@kjbracey
Copy link
Contributor

Actually, this repository may as well be retired - make it straight to mbed-os.

@artokin
Copy link
Author

artokin commented Sep 14, 2016

Created this PR to mbed-os: ARMmbed/mbed-os#2688
Closing this PR.

@artokin artokin closed this Sep 14, 2016
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.

2 participants