User Activity

  • Posted a comment on discussion General Discussion on cppcheck

    Here's a simplified example of the issue. Whist creating this I noticed that using read-modify-write (&= |=) avoids the error or inserting a nop between the assignments also avoids the error. That's probably a hint that I should tidy up the old code although skipping a read where it's unecessary for a hardware register is fairly common #include <stdint.h> #define DISP_CTL_RESET_LSB 0 void display_reset(void) { volatile uint32_t *disp_ctl = (volatile uint32_t*) 0xffff1234; // Assert reset *disp_ctl...

  • Posted a comment on discussion General Discussion on cppcheck

    Thanks, moving the decrement outside of the loop condition resolved the knownConditionTrueFalse warnings

  • Posted a comment on discussion General Discussion on cppcheck

    Is there a method or hint to indicate that "volatile uint32_t pointer" variables correspond to MMIO hardware registers so that certain checks can be skipped? This causes a knownConditionTrueFalse error in the if statement after the loop volatile uint32_t *reg = (volatile uint32_t *) 0xffff1234; int retries = 1000; while ((*reg & 0x1) && retries-- > 0) ; if (retries <= 0) return -1; Also, if when there are multiple writes to the same hardware register in sequence cause redundantAssignment errors but...

View All

Personal Data

Username:
timgover
Joined:
2009-09-24 11:04:41

Projects

This is a list of open source software projects that Tim Gover is associated with:

Personal Tools

MongoDB Logo MongoDB