зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
2e834f83f4
Коммит
1613b71f2e
|
@ -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();
|
||||
|
|
Загрузка…
Ссылка в новой задаче