[patch] fix aicasm build with clang.

Andrew Reilly areilly at bigpond.net.au
Wed Jul 14 14:00:19 UTC 2010


On Wed, Jul 14, 2010 at 11:44:57AM +0200, Pawel Worach wrote:
> sys/dev/aic7xxx/aicasm/aicasm_gram.y:1826:51: error: use of logical || with constant operand; switch to bitwise | or remove constant [-Wlogical-bitwise-confusion]
>         if (opcode == AIC_OP_AND || opcode == AIC_OP_JNZ || AIC_OP_JZ)
>                                                          ^  ~~~~~~~~~
> 
> Bug ?

Looks like one to me.  There's no constant value of AIC_OP_JZ
that can make its inclusion in that line interesting, as is (it
is probably non-zero, which means that the if-body is always
executed.  I think that your patch is almost certainly correct.

[What down-stream effect does this bug have on the SCSI
controller microcode in question?]

Cheers,

-- 
Andrew


More information about the freebsd-scsi mailing list