Skip to content

test: remove no_mangle from extern "c" #180

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
Jul 13, 2021

Conversation

mathetake
Copy link
Contributor

@mathetake mathetake commented Jul 13, 2021

This PR suppresses the warning by rustc:

warning: attribute should be applied to a function or static
  --> test/test_data/env.rs:15:1
   |
15 |   #[no_mangle]
   |   ^^^^^^^^^^^^
16 | / extern "C" {
17 | |     fn __wasilibc_initialize_environ();
18 | | }
   | |_- not a function or static
   |
   = note: `#[warn(unused_attributes)]` on by default
   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!

warning: 1 warning emitted

extern "c" already guarantee that the symbol remains un-mangled, so it is safe to remove it. Will make the same change to rust-sdk and Envoy tests.

Signed-off-by: Takeshi Yoneda [email protected]

Copy link
Member

@PiotrSikora PiotrSikora left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@mathetake mathetake merged commit 82633e3 into proxy-wasm:master Jul 13, 2021
@mathetake mathetake deleted the rust-warning branch July 13, 2021 05:44
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