Skip to content

Commit

Permalink
Enable debug-asserts in hil-test, qa-test and examples
Browse files Browse the repository at this point in the history
  • Loading branch information
bjoernQ committed Nov 27, 2024
1 parent 2e197ba commit 60ea3ed
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 9 deletions.
12 changes: 5 additions & 7 deletions esp-wifi/src/wifi/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,13 +180,11 @@ pub(crate) unsafe fn handle_raw<Event: EventExt>(
event_data: *mut crate::binary::c_types::c_void,
event_data_size: usize,
) -> bool {
if event_data_size != core::mem::size_of::<Event>() {
warn!(
"event data size doesn't match {} != {}",
event_data_size,
core::mem::size_of::<Event>()
);
}
debug_assert_eq!(
event_data_size,
core::mem::size_of::<Event>(),
"wrong size event data"
);

handle::<Event>(unsafe { &Event::from_raw_event_data(event_data) })
}
Expand Down
2 changes: 1 addition & 1 deletion examples/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ embassy-generic-timers = ["embassy-time/generic-queue-8"]
[profile.release]
codegen-units = 1
debug = 2
debug-assertions = false
debug-assertions = true
incremental = false
opt-level = 3
lto = 'fat'
Expand Down
2 changes: 1 addition & 1 deletion hil-test/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ overflow-checks = true
[profile.release]
codegen-units = 1
debug = 2
debug-assertions = false
debug-assertions = true
incremental = false
opt-level = 3
lto = false # LTO (thin or fat) miscompiles some tests on RISC-V
Expand Down
1 change: 1 addition & 0 deletions qa-test/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,6 @@ embassy-generic-timers = ["embassy-time/generic-queue-8"]

[profile.release]
debug = 2
debug-assertions = true
lto = "fat"
codegen-units = 1

0 comments on commit 60ea3ed

Please sign in to comment.