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

remove unnecessary extern C on panic handler to fix not-ffi-safe warning #85

Merged
merged 1 commit into from
Nov 20, 2019

Conversation

cmsd2
Copy link
Contributor

@cmsd2 cmsd2 commented Nov 18, 2019

1.40.0-nightly has added a warning about extern functions that are not ffi-safe.
the panic handler is unnecessarily marked as extern and trips this warning.
this pull request removes the extern decleration to fix the warning.

Building bootloader
   Compiling bootloader v0.8.2 (/Users/cmsd2/.cargo/registry/src/github.com-1ecc6299db9ec823/bootloader-0.8.2)
warning: `extern` fn uses type `core::panic::PanicInfo`, which is not FFI-safe
   --> src/main.rs:368:31
    |
368 | pub extern "C" fn panic(info: &PanicInfo) -> ! {
    |                               ^^^^^^^^^^ not FFI-safe

Fixes #84

@phil-opp
Copy link
Member

Thanks a lot for the pull request!

There seems to be a small problem with the "Check Formatting" CI job, but this has nothing to do with your changes. I will fix it and merge this PR afterwards.

@phil-opp
Copy link
Member

CI should be fixed now.

bors r+

@phil-opp
Copy link
Member

There seems to be a problem with the bors bot: bors-ng/bors-ng#806

Merging manually

@phil-opp phil-opp merged commit 9801293 into rust-osdev:master Nov 20, 2019
phil-opp added a commit that referenced this pull request Nov 20, 2019
@phil-opp
Copy link
Member

Released as version 0.8.3. Thanks again for the pull request!

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.

extern fn uses type core::panic::PanicInfo, which is not FFI-safe
2 participants