Fix build errors in Windows unwind information.

This commit is contained in:
Peter Huene
2020-04-03 15:25:49 -07:00
parent 09a3f10a48
commit 5dba941180

View File

@@ -37,7 +37,7 @@ impl UnwindRegistry {
// The unwind information should be immediately following the function // The unwind information should be immediately following the function
// with padding for 4 byte alignment // with padding for 4 byte alignment
unsafe { unsafe {
*entry.u.UnwindInfoAddress_mut() = ((entry.EndAddress + 3) & !3); *entry.u.UnwindInfoAddress_mut() = (entry.EndAddress + 3) & !3;
} }
self.functions.push(entry); self.functions.push(entry);
@@ -49,7 +49,7 @@ impl UnwindRegistry {
} }
/// Publishes all registered functions. /// Publishes all registered functions.
pub fn publish(&mut self, isa: &dyn TargetIsa) -> Result<()> { pub fn publish(&mut self, _isa: &dyn TargetIsa) -> Result<()> {
if self.published { if self.published {
bail!("unwind registry has already been published"); bail!("unwind registry has already been published");
} }
@@ -68,7 +68,7 @@ impl UnwindRegistry {
if winnt::RtlAddFunctionTable( if winnt::RtlAddFunctionTable(
self.functions.as_mut_ptr(), self.functions.as_mut_ptr(),
self.functions.len() as u32, self.functions.len() as u32,
base_address as u64, self.base_address as u64,
) == 0 ) == 0
{ {
bail!("failed to register function table"); bail!("failed to register function table");