On 9/21/19 2:17 AM, Thomas Huth wrote:
> Coverity currently complains that the "if (0x00 & (0x80 >> (phase - 8))"
> in next-cube.c can never be true. Right it is. The "0x00" is meant as value
> of the control register of the RTC, which is currently not implemented yet.
> Thus, let's add a register variable for this now. However, the RTC
> registers are currently defined as static variables in nextscr2_write(),
> which is quite ugly. Thus let's also move the RTC variables to the main
> machine state instead. In the long run, we should likely even refactor
> the whole RTC code into a separate device in a separate file, but that's
> something for calm winter nights later... as a first step, cleaning up
> the static variables and shutting up the warning from Coverity should
> be sufficient.
> 
> Signed-off-by: Thomas Huth <h...@tuxfamily.org>

Reviewed-by: Richard Henderson <richard.hender...@linaro.org>

>                      /* for now 0x00 */
> -                    if (0x00 & (0x80 >> (phase - 8))) {
> +                    if (rtc->control & (0x80 >> (phase - 8))) {

You might kill the comment too.


r~

Reply via email to