Skip to content

parentheses error should be fixed. #6

@fnclovers

Description

@fnclovers

I got this error while compiling raytrace, using riscv-toolchain.

src/raytrace.c:102:76: error: suggest parentheses around arithmetic in operand of '^' [-Werror=parentheses]
  102 |     h->c = s2v(to_fixed( (((h->p.x>>(FP-3)) + g_time) ^ ((h->p.z>>(FP-3))) + g_time) &255));

Must be corrected to
h->c = s2v(to_fixed( ((((h->p.x >> (FP-3)) + g_time) ^ ((h->p.z >> (FP-3)) + g_time)) & 255)));.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions