mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
OHOS: Clean up some compile warnings (#38240)
This cleans up some compile warnings about unused functions. Testing: Does not change functionality, OHOS and Linux still compile (hopefully the other builds too). --------- Signed-off-by: Narfinger <Narfinger@users.noreply.github.com> Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com> Co-authored-by: Jonathan Schwender <schwenderjonathan@gmail.com>
This commit is contained in:
parent
bb5cb57099
commit
6ace7ad577
4 changed files with 10 additions and 3 deletions
|
@ -914,7 +914,10 @@ pub struct FontBaseline {
|
|||
/// ];
|
||||
/// let mapped_weight = apply_font_config_to_style_mapping(&mapping, weight as f64);
|
||||
/// ```
|
||||
#[cfg(any(target_os = "linux", target_os = "macos"))]
|
||||
#[cfg(all(
|
||||
any(target_os = "linux", target_os = "macos"),
|
||||
not(target_env = "ohos")
|
||||
))]
|
||||
pub(crate) fn map_platform_values_to_style_values(mapping: &[(f64, f64)], value: f64) -> f64 {
|
||||
if value < mapping[0].0 {
|
||||
return mapping[0].1;
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
use std::convert::TryFrom;
|
||||
use std::ptr::{self, NonNull};
|
||||
use std::{io, slice};
|
||||
use std::slice;
|
||||
|
||||
use devtools_traits::{
|
||||
ConsoleMessage, ConsoleMessageArgument, ConsoleMessageBuilder, LogLevel,
|
||||
|
@ -115,6 +115,7 @@ fn with_stderr_lock<F>(f: F)
|
|||
where
|
||||
F: FnOnce(),
|
||||
{
|
||||
use std::io;
|
||||
let stderr = io::stderr();
|
||||
let _handle = stderr.lock();
|
||||
f()
|
||||
|
@ -343,6 +344,7 @@ fn stringify_handle_values(messages: &[HandleValue]) -> DOMString {
|
|||
/// to the logger. As `Console::method` and `Console::send_string_message`
|
||||
/// already forwards all messages to the logger with appropriate level
|
||||
/// this does not need to do anything for these targets.
|
||||
#[allow(unused_variables)]
|
||||
fn console_message_to_stdout(global: &GlobalScope, message: &DOMString) {
|
||||
#[cfg(not(any(target_os = "android", target_env = "ohos")))]
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue