Skip to content

Add asserts in trace - #51

Open
Foxpunk wants to merge 9 commits into
masterfrom
add_asserts_in_trace
Open

Foxpunk wants to merge 9 commits into
masterfrom
add_asserts_in_trace

Conversation

@Foxpunk

@Foxpunk Foxpunk commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

Problem

Several switch statements over enum-like fields, and return values of
time(), fseek() and snprintf(), were not checked, which could lead to
silent incorrect behavior.

Fix

Added explicit default: fb_assert(false) branches to switch
statements to catch unexpected values early.
Saved the return values of time(), fseek() and snprintf() into
[[maybe_unused]] variables and added fb_assert checks on them.

@craftmaster1231

Copy link
Copy Markdown
Owner

Approved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants