Fix new warnings
This commit is contained in:
parent
0a8da6bff0
commit
c00fae79f8
|
|
@ -16,7 +16,7 @@ RUN apt-get update && \
|
||||||
ln -s $(which ld64.lld-20) /usr/bin/ld64.lld && \
|
ln -s $(which ld64.lld-20) /usr/bin/ld64.lld && \
|
||||||
SDK_VERSION=14.5 UNATTENDED=1 ENABLE_COMPILER_RT_INSTALL=1 TARGET_DIR=/osxcross ./build.sh
|
SDK_VERSION=14.5 UNATTENDED=1 ENABLE_COMPILER_RT_INSTALL=1 TARGET_DIR=/osxcross ./build.sh
|
||||||
|
|
||||||
FROM rust:1.89-bookworm
|
FROM rust:1.90-bookworm
|
||||||
ADD --chmod=644 "https://apt.llvm.org/llvm-snapshot.gpg.key" /etc/apt/trusted.gpg.d/apt.llvm.org.asc
|
ADD --chmod=644 "https://apt.llvm.org/llvm-snapshot.gpg.key" /etc/apt/trusted.gpg.d/apt.llvm.org.asc
|
||||||
COPY llvm.sources /etc/apt/sources.list.d/llvm.sources
|
COPY llvm.sources /etc/apt/sources.list.d/llvm.sources
|
||||||
RUN rustup target add x86_64-pc-windows-msvc && \
|
RUN rustup target add x86_64-pc-windows-msvc && \
|
||||||
|
|
|
||||||
1
build.rs
1
build.rs
|
|
@ -21,6 +21,7 @@ fn main() -> Result<(), Box<dyn Error>> {
|
||||||
.include(Path::new("shrooms-vb-core/util"))
|
.include(Path::new("shrooms-vb-core/util"))
|
||||||
.opt_level(opt_level)
|
.opt_level(opt_level)
|
||||||
.flag_if_supported("-fno-strict-aliasing")
|
.flag_if_supported("-fno-strict-aliasing")
|
||||||
|
.define("_CRT_SECURE_NO_WARNINGS", None)
|
||||||
.define("VB_LITTLE_ENDIAN", None)
|
.define("VB_LITTLE_ENDIAN", None)
|
||||||
.define("VB_SIGNED_PROPAGATE", None)
|
.define("VB_SIGNED_PROPAGATE", None)
|
||||||
.define("VB_DIV_GENERIC", None)
|
.define("VB_DIV_GENERIC", None)
|
||||||
|
|
|
||||||
|
|
@ -457,12 +457,6 @@ struct PersistedGamepadMapping {
|
||||||
default_axes: Vec<(Code, (VBKey, VBKey))>,
|
default_axes: Vec<(Code, (VBKey, VBKey))>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Serialize, Deserialize)]
|
|
||||||
pub struct Shortcut {
|
|
||||||
pub shortcut: KeyboardShortcut,
|
|
||||||
pub command: Command,
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(Clone, Copy, Serialize, Deserialize, PartialEq, Eq, Hash)]
|
#[derive(Clone, Copy, Serialize, Deserialize, PartialEq, Eq, Hash)]
|
||||||
pub enum Command {
|
pub enum Command {
|
||||||
OpenRom,
|
OpenRom,
|
||||||
|
|
|
||||||
|
|
@ -50,11 +50,11 @@ impl MemoryClient {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn aligned_memory(start: u32, length: usize) -> BoxBytes {
|
fn aligned_memory(start: u32, length: usize) -> BoxBytes {
|
||||||
if start % 4 == 0 && length % 4 == 0 {
|
if start.is_multiple_of(4) && length.is_multiple_of(4) {
|
||||||
let memory = vec![0u32; length / 4].into_boxed_slice();
|
let memory = vec![0u32; length / 4].into_boxed_slice();
|
||||||
return bytemuck::box_bytes_of(memory);
|
return bytemuck::box_bytes_of(memory);
|
||||||
}
|
}
|
||||||
if start % 2 == 0 && length % 2 == 0 {
|
if start.is_multiple_of(2) && length.is_multiple_of(2) {
|
||||||
let memory = vec![0u16; length / 2].into_boxed_slice();
|
let memory = vec![0u16; length / 2].into_boxed_slice();
|
||||||
return bytemuck::box_bytes_of(memory);
|
return bytemuck::box_bytes_of(memory);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -274,12 +274,6 @@ impl AppWindow for CharacterDataWindow {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Serialize, Deserialize, Clone, PartialEq, Eq, Hash)]
|
|
||||||
enum CharDataResource {
|
|
||||||
Character { palette: Palette, index: usize },
|
|
||||||
CharacterData { palette: Palette },
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(Clone, Default, PartialEq, Eq)]
|
#[derive(Clone, Default, PartialEq, Eq)]
|
||||||
struct CharDataParams {
|
struct CharDataParams {
|
||||||
palette: Palette,
|
palette: Palette,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue