Skip to content

Ownership analysis may mark local mut as ref #163

Open
@TheDan64

Description

@TheDan64
#[no_mangle]
pub unsafe extern "C" fn mymemset(mut s: *mut wchar_t, mut c: wchar_t,
                                  n: size_t) {
    let mut i: size_t = 0;
    let mut p: *mut wchar_t = 0 as *mut wchar_t;
    p = s;
    i = 0i32 as size_t;
    while i < n { *p = c; p = p.offset(1isize); i = i.wrapping_add(1) }
    return;
}

p will be marked as "ref" by OA even though it gets assigned *p = c;

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingrefactorerThis issue relates to the refactoring tool

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions