style(hook): clippy -D warnings clean on default + fifa17 features
Modernize manual nul-terminated byte strings to C-string literals (c"...") at all Win32 GetModuleHandleA/GetProcAddress/getaddrinfo call sites (byte-identical), drop two redundant SOL_SOCKET-as-i32 casts, remove a needless return in the fifa17 install path, and add a # Safety section to DllMain. Scope the FIFA-23-path dead-code/unused-import lints (unused only under the fifa17 feature, stripped by the linker) with a documented crate-level cfg_attr allow. Cross-verified: both the default and fifa17 builds now pass clippy -D warnings and compile; probe and capture_baseline still build.
This commit is contained in:
@@ -67,7 +67,7 @@ fn patch_module(module: isize, scan_bytes: usize) -> bool {
|
||||
|
||||
/// Patch ProtoSSL cert-verify in EAWebKit.dll (call when EAWebKit is loaded).
|
||||
pub unsafe fn patch_eawebkit_cert_verify() -> bool {
|
||||
let module = GetModuleHandleA(b"EAWebKit.dll\0".as_ptr()) as isize;
|
||||
let module = GetModuleHandleA(c"EAWebKit.dll".as_ptr().cast()) as isize;
|
||||
// EAWebKit.dll is ~22 MB
|
||||
patch_module(module, 24 * 1024 * 1024)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user