Skip to content
This repository was archived by the owner on Sep 26, 2023. It is now read-only.

Fix warnings emitted by bindgen while building#22

Merged
expressvpn-pang-t merged 5 commits intomainfrom
feat/do-not-ffi-variadic-functions
Mar 2, 2023
Merged

Fix warnings emitted by bindgen while building#22
expressvpn-pang-t merged 5 commits intomainfrom
feat/do-not-ffi-variadic-functions

Conversation

@expressvpn-pang-t
Copy link
Copy Markdown
Contributor

No description provided.

`wrapper.h`, while the definitive version of the symbols we want to
generate bindings for, pulls in numerous other symbols that we don't
really care for (for example various `*printf` methods from
`stdio.h`).

An attempt was made to resolve this by blocking `stdlib.h` (now no
longer necessary), but in this case it's likely better to more tightly
control the list of allowed headers via the `allowlist_file`
mechanism instead.

We don't build for openssl compatibility support, so don't expose the
`openssl/` headers. Except for `compat_types.h`, which is required by
other wolfssl bits.
It was generating the following warning on
`aarch64-unknown-linux-gnu`:
```
warning: `extern` block uses type `[u64; 4]`, which is not FFI-safe
     --> /wolfssl-sys/target/debug/build/wolfssl-sys-effcdb54711168e1/out/bindings.rs:10676:15
      |
10676 |         args: va_list,
      |               ^^^^^^^ not FFI-safe
      |
      = help: consider passing a pointer to the array
      = note: passing raw arrays by value is not FFI-safe
      = note: `#[warn(improper_ctypes)]` on by default
```

It might be the case that there are other unnecessary binding
generation that we missed, but the aim is to make the project build
cleanly first.
Base automatically changed from nit/dependency-update to main March 2, 2023 07:13
@expressvpn-pang-t expressvpn-pang-t merged commit e23732e into main Mar 2, 2023
@expressvpn-pang-t expressvpn-pang-t deleted the feat/do-not-ffi-variadic-functions branch March 2, 2023 07:16
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants