chore: fix compiler warnings
Browse files
crates/openwa-core/src/registry.rs
CHANGED
|
@@ -523,6 +523,7 @@ mod tests {
|
|
| 523 |
assert_eq!(TEST_CTOR, 0x0050_0000);
|
| 524 |
assert_eq!(TEST_FUNC, 0x0053_0000);
|
| 525 |
assert_eq!(TEST_GLOBAL, 0x007A_0000);
|
|
|
|
| 526 |
}
|
| 527 |
|
| 528 |
#[test]
|
|
|
|
| 523 |
assert_eq!(TEST_CTOR, 0x0050_0000);
|
| 524 |
assert_eq!(TEST_FUNC, 0x0053_0000);
|
| 525 |
assert_eq!(TEST_GLOBAL, 0x007A_0000);
|
| 526 |
+
assert_eq!(TEST_VMETHOD, 0x0050_1000);
|
| 527 |
}
|
| 528 |
|
| 529 |
#[test]
|
crates/openwa-wormkit/src/replacements/debug_utils.rs
CHANGED
|
@@ -10,6 +10,7 @@ use openwa_core::rebase::rb;
|
|
| 10 |
/// Dump a memory region as DWORDs with automatic pointer classification.
|
| 11 |
///
|
| 12 |
/// Uses `openwa_core::mem::classify_pointer` for pointer detection.
|
|
|
|
| 13 |
pub unsafe fn dump_region(base_ptr: *const u8, offset: usize, size: usize, struct_name: &str) {
|
| 14 |
use openwa_core::mem;
|
| 15 |
use openwa_debug_proto::PointerKind;
|
|
|
|
| 10 |
/// Dump a memory region as DWORDs with automatic pointer classification.
|
| 11 |
///
|
| 12 |
/// Uses `openwa_core::mem::classify_pointer` for pointer detection.
|
| 13 |
+
#[allow(dead_code)]
|
| 14 |
pub unsafe fn dump_region(base_ptr: *const u8, offset: usize, size: usize, struct_name: &str) {
|
| 15 |
use openwa_core::mem;
|
| 16 |
use openwa_debug_proto::PointerKind;
|
crates/openwa-wormkit/src/replacements/file_isolation.rs
CHANGED
|
@@ -41,11 +41,6 @@ fn errorlog_redirect() -> Option<&'static str> {
|
|
| 41 |
.as_deref()
|
| 42 |
}
|
| 43 |
|
| 44 |
-
/// Returns the per-PID temp directory path, if file isolation is active.
|
| 45 |
-
pub fn temp_dir_path() -> Option<&'static str> {
|
| 46 |
-
TEMP_DIR.get().and_then(|o| o.as_deref())
|
| 47 |
-
}
|
| 48 |
-
|
| 49 |
/// Get (and lazily create) a per-PID temp directory under the game folder.
|
| 50 |
fn temp_dir() -> Option<&'static str> {
|
| 51 |
TEMP_DIR
|
|
@@ -169,9 +164,7 @@ pub fn install() -> Result<(), String> {
|
|
| 169 |
ORIG_CREATE_FILE_A.store(trampoline as u32, Ordering::Relaxed);
|
| 170 |
|
| 171 |
let pid = std::process::id();
|
| 172 |
-
let tmp_msg = temp_dir()
|
| 173 |
-
.map(|d| format!(" → {d}"))
|
| 174 |
-
.unwrap_or_default();
|
| 175 |
let errorlog_msg = errorlog_redirect()
|
| 176 |
.map(|t| format!(", ERRORLOG.TXT → {t}"))
|
| 177 |
.unwrap_or_default();
|
|
|
|
| 41 |
.as_deref()
|
| 42 |
}
|
| 43 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 44 |
/// Get (and lazily create) a per-PID temp directory under the game folder.
|
| 45 |
fn temp_dir() -> Option<&'static str> {
|
| 46 |
TEMP_DIR
|
|
|
|
| 164 |
ORIG_CREATE_FILE_A.store(trampoline as u32, Ordering::Relaxed);
|
| 165 |
|
| 166 |
let pid = std::process::id();
|
| 167 |
+
let tmp_msg = temp_dir().map(|d| format!(" → {d}")).unwrap_or_default();
|
|
|
|
|
|
|
| 168 |
let errorlog_msg = errorlog_redirect()
|
| 169 |
.map(|t| format!(", ERRORLOG.TXT → {t}"))
|
| 170 |
.unwrap_or_default();
|