immunant / c2rust

Migrate C code to Rust
https://c2rust.com/
Other
3.81k stars 220 forks source link

analyze: handle casts between pointers to primitive types and/or void* #984

Open spernsteiner opened 1 year ago

spernsteiner commented 1 year ago

Lighttpd sometimes casts between void and a pointer to some primitive type, or between two different primitive types. We could implement such conversions using a safe wrapper similar to bytemuck::cast_slice and treating void as equivalent to char* or *mut u8.