Bug 1789505 - Silence rustc 1.65 warning about mem::uninitialized. r=emilio

Differential Revision: https://phabricator.services.mozilla.com/D156768
This commit is contained in:
Mike Hommey 2022-09-08 22:02:32 +00:00
Родитель 2e834f83f4
Коммит 1613b71f2e
1 изменённых файлов: 2 добавлений и 0 удалений

Просмотреть файл

@ -50,6 +50,8 @@ unsafe fn sockaddr_un(path: &Path)
}
fn sun_path_offset() -> usize {
// Silence rustc 1.65 warning about mem::uninitialized.
#[allow(invalid_value)]
unsafe {
// Work with an actual instance of the type since using a null pointer is UB
let addr: libc::sockaddr_un = mem::uninitialized();