fix: 5 dead-code warnings in main.c (expression generates no code) #18
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
question
wait-to-fix
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
daru/PICsense#18
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
XC8 reports 5 expression-generates-no-code warnings at lines 171, 185, 340, 350, 359 in main.c. These are standalone side-effect-free expressions that should either be removed or have a comment explaining why they are there.
Those lines should do something, but they are being optimized out. Not sure why pin_write calls would be getting dropped, though.
Fixed in PR #19: replaced ternary
pin_writemacro with directLATAx = valwrites to XC8'svolatile __bitvariables, which the compiler cannot optimize away.Verified