ohos/android: Fix some compiler warnings (#34178)

* ohos: Remove unnecessary library links

`ohos-sys` now correctly links all required libraries, so we
don't need to specify them here again.
We still specify `ace_napi.z`, since we use napi via `napi-ohos`, which currently does not add the required link.

Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>

* Disable some unused functions on ohos/android

- get_default_url()
- parse_url_or_filename()
- add_noto_fallback_families

Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>

* ohos: Remove unneeded import

Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>

---------

Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
This commit is contained in:
Jonathan Schwender 2024-11-07 20:53:57 +01:00 committed by GitHub
parent 219d3c9cd5
commit 4f6283d7fe
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 23 additions and 10 deletions

View file

@ -2,9 +2,17 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
#[cfg(any(target_os = "linux", target_os = "macos"))]
#[cfg(all(
any(target_os = "linux", target_os = "macos"),
not(target_os = "android"),
not(target_env = "ohos")
))]
use base::text::{UnicodeBlock, UnicodeBlockMethod};
#[cfg(any(target_os = "linux", target_os = "macos"))]
#[cfg(all(
any(target_os = "linux", target_os = "macos"),
not(target_os = "android"),
not(target_env = "ohos")
))]
use unicode_script::Script;
#[cfg(any(target_os = "linux", target_os = "android"))]
@ -15,7 +23,11 @@ pub use crate::platform::macos::{
};
#[cfg(target_os = "windows")]
pub use crate::platform::windows::{font, font_list, font_list::LocalFontIdentifier};
#[cfg(any(target_os = "linux", target_os = "macos"))]
#[cfg(all(
any(target_os = "linux", target_os = "macos"),
not(target_os = "android"),
not(target_env = "ohos")
))]
use crate::FallbackFontSelectionOptions;
#[cfg(any(target_os = "linux", target_os = "android"))]
@ -34,7 +46,11 @@ mod windows {
pub mod font_list;
}
#[cfg(any(target_os = "linux", target_os = "macos"))]
#[cfg(all(
any(target_os = "linux", target_os = "macos"),
not(target_os = "android"),
not(target_env = "ohos")
))]
pub(crate) fn add_noto_fallback_families(
options: FallbackFontSelectionOptions,
families: &mut Vec<&'static str>,