Fix c_void_returns lint warning#5240
Conversation
|
cc: @folkertdev |
|
there is one more at --- a/src/teeos/mod.rs
+++ b/src/teeos/mod.rs
@@ -49,7 +49,7 @@ pub type clockid_t = c_int;
pub type suseconds_t = c_long;
-pub type once_fn = extern "C" fn() -> c_void;
+pub type once_fn = extern "C" fn();
pub type pthread_once_t = c_int;
|
|
also this is technically a breaking change? but the old signature was incorrect so idk. |
Technically yes, but the relevant platforms are all T3 and the return type is kind of useless so this will be fine. |
I wasn't sure about that one, as opposed to the other places, this is a function pointer type. The compiler doesn't seem to be complaining about it: https://rust.godbolt.org/z/3xTezqxrY |
|
I assume the lint just doesn't catch function pointer types (yet), it would be good to make that change here as well |
41f93df to
8b2a533
Compare
|
It's odd, based on the tests the lint should fire So maybe that file does not get run in CI? Anyhow, further evidence that we should make the change there too. |
|
Done now, thank you. |
Description
Nightly added a lint warning on
c_voidreturns this patch removes the return type to implicitly return().See a sample failing job here: https://github.com/rust-lang/libc/actions/runs/28580626120/job/84739740809?pr=5065#step:9:2195
Checklist
libc-test/semverhave been updated*LASTor*MAXareincluded (see #3131)
cd libc-test && cargo test --target mytarget);especially relevant for platforms that may not be checked in CI