Skip to content

Cleanup and fix warnings on example #89

New issue

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

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

Already on GitHub? # to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sharksforarms
Copy link

Cleanup of some warnings in example

$ cargo +nightly build --release --target wasm32-unknown-unknown

   Compiling wee_alloc_example v0.1.0 (/home/sharks/source/wee_alloc/example)
warning: unnecessary `unsafe` block
  --> example/src/lib.rs:24:5
   |
24 |     unsafe {
   |     ^^^^^^ unnecessary `unsafe` block
   |
   = note: `#[warn(unused_unsafe)]` on by default

warning: unnecessary `unsafe` block
  --> example/src/lib.rs:34:5
   |
34 |     unsafe {
   |     ^^^^^^ unnecessary `unsafe` block

warning: `extern` fn uses type `core::alloc::Layout`, which is not FFI-safe
  --> example/src/lib.rs:33:26
   |
33 | pub extern "C" fn oom(_: ::core::alloc::Layout) -> ! {
   |                          ^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
   |
   = note: `#[warn(improper_ctypes_definitions)]` on by default
   = help: consider adding a `#[repr(C)]` or `#[repr(transparent)]` attribute to this struct
   = note: this struct has unspecified layout

warning: 3 warnings emitted

    Finished release [optimized + debuginfo] target(s) in 0.21s

@sharksforarms
Copy link
Author

CI failing for another reason possibly

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant