summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorLinus Färnstrand <linus@mullvad.net>2018-02-19 16:06:05 +0100
committerLinus Färnstrand <linus@mullvad.net>2018-02-19 16:06:05 +0100
commit9840bf447347fecf90415fca4c33b6be575daa6a (patch)
tree96c749044092a70d3c6d5b2a9b616f4c74f08fa9
parent33a2edadad1c3b5fe7ea667f6b7ad4dd97c69ec3 (diff)
parent08f6eb436f03ba0c68d2a1e460e6ca42048124d6 (diff)
downloadmullvadvpn-9840bf447347fecf90415fca4c33b6be575daa6a.tar.xz
mullvadvpn-9840bf447347fecf90415fca4c33b6be575daa6a.zip
Merge branch 'fix-windows-warnings'
-rw-r--r--mullvad-cli/src/rpc.rs6
-rw-r--r--mullvad-daemon/src/bin/problem-report.rs1
-rw-r--r--talpid-core/src/tunnel/openvpn.rs1
3 files changed, 6 insertions, 2 deletions
diff --git a/mullvad-cli/src/rpc.rs b/mullvad-cli/src/rpc.rs
index 5e14cdf195..00c3a53b48 100644
--- a/mullvad-cli/src/rpc.rs
+++ b/mullvad-cli/src/rpc.rs
@@ -3,7 +3,9 @@ use serde;
use std::fs::{File, Metadata};
use std::io::{self, BufRead, BufReader};
-use std::path::{Path, PathBuf};
+#[cfg(unix)]
+use std::path::Path;
+use std::path::PathBuf;
use talpid_ipc::WsIpcClient;
@@ -73,7 +75,7 @@ fn is_rpc_file_trusted(metadata: Metadata) -> bool {
}
#[cfg(windows)]
-fn is_rpc_file_trusted(metadata: Metadata) -> bool {
+fn is_rpc_file_trusted(_metadata: Metadata) -> bool {
// TODO: Check permissions correctly
true
}
diff --git a/mullvad-daemon/src/bin/problem-report.rs b/mullvad-daemon/src/bin/problem-report.rs
index 51c10ca20d..5ae9c27351 100644
--- a/mullvad-daemon/src/bin/problem-report.rs
+++ b/mullvad-daemon/src/bin/problem-report.rs
@@ -365,6 +365,7 @@ fn os_version() -> String {
}
/// Helper for getting stdout of some command as a String. Ignores the exit code of the command.
+#[cfg(any(target_os = "linux", target_os = "macos"))]
fn command_stdout_lossy(cmd: &str, args: &[&str]) -> Option<String> {
Command::new(cmd)
.args(args)
diff --git a/talpid-core/src/tunnel/openvpn.rs b/talpid-core/src/tunnel/openvpn.rs
index f52240a3af..ded4ff2d34 100644
--- a/talpid-core/src/tunnel/openvpn.rs
+++ b/talpid-core/src/tunnel/openvpn.rs
@@ -31,6 +31,7 @@ mod errors {
pub use self::errors::*;
+#[cfg(unix)]
lazy_static!{
static ref OPENVPN_DIE_TIMEOUT: Duration = Duration::from_secs(2);
}