When I build for this target with GitHub action, I get this error:
error[E0793]: reference to packed field is unaligned
--> C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\battery-0.7.8\src\platform\windows\ffi\mod.rs:113:36
|
113 | let device_path = unsafe { (***pdidd).DevicePath.as_ptr() };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
= help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
error[E0793]: reference to packed field is unaligned
--> C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\battery-0.7.8\src\platform\windows\ffi\mod.rs:143:17
|
143 | &mut query.BatteryTag as *mut _ as minwindef::LPVOID,
| ^^^^^^^^^^^^^^^^^^^^^
|
= note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
= help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
Hello!
When I build for this target with GitHub action, I get this error: