Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
beeb
· 1y ago · 0 comments
Rust would warn you of an unused variable: "warning: value assigned to `psize` is never read"
Comments
[–]
bloak
1y ago
And so would GCC: warning: variable psize set but not used [-Wunused-but-set-variable]
[–]
beeb
OP
1y ago
The fact that the bug slipped through the cracks highlights the importance of sane defaults.
[–]
flohofwoe
1y ago
The warning is in the -Wall warning set, which tbh should be the bare minimum each C/C++ project enables (along with -Wextra, and -Werror).