Open aneksteind opened 1 year ago
Lack of rewriting of field types is a major source of compilation errors on lighttpd. For example:
error[E0608]: cannot index into a value of type `*mut i8`
--> ../src/main.new.rs:5992:12
|
5992 | &(&(((*hdr).buf))[(((*hdr).name_offset as libc::c_int as isize) as usize) ..])[0]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The problem here is that the buf
field hasn't been rewritten into a slice.
I'm working on this
_Originally posted by @spernsteiner in https://github.com/immunant/c2rust/pull/815#discussion_r1119219040_