commit | d88fd2d877f8ba341187603e31c4a5c8b6c2de59 | [log] [tgz] |
---|---|---|
author | Pierre-Clément Tosi <ptosi@google.com> | Fri Jul 07 15:54:33 2023 +0000 |
committer | Pierre-Clément Tosi <ptosi@google.com> | Fri Jul 07 16:38:43 2023 +0000 |
tree | c97ab78d7ecc1790c3e097de9819acb375fb62d4 | |
parent | 70b580c0c15e315e87ec0ac1939a66f8a6e1868b [diff] |
pvmfw: Make the NonZeroUsize FDT_SIZE non-const There seems to be a bug with clippy::undocumented_unsafe_blocks (in whichever version Soong uses, AOSP ships 1.68, 1.69, and 1.70), where the SAFETY comment preceding the definition of the const is ignored: error: unsafe block missing a safety comment --> packages/modules/Virtualization/pvmfw/src/entry.rs:89:40 | 89 | const FDT_SIZE: NonZeroUsize = unsafe { NonZeroUsize::new_unchecked(FDT_MAX_SIZE) }; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: consider adding a safety comment on the preceding line So please Clippy by replacing the unsafe with a (safe) runtime check. Test: m pvmfw_bin Change-Id: Iaf390027ec8be9f06c7a26928dfa5936736e26f2
This repository contains userspace services related to running virtual machines on Android, especially protected virtual machines. See the getting started documentation and Microdroid README for more information.