[patch] fix aicasm build with clang.

Pawel Worach pawel.worach at gmail.com
Wed Jul 14 10:09:55 UTC 2010


Hi,

llvm/clang as of r108260 doesn't like aicasm_gram.[c,y]

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 ?

Index: sys/dev/aic7xxx/aicasm/aicasm_gram.y
===================================================================
--- sys/dev/aic7xxx/aicasm/aicasm_gram.y	(revision 210025)
+++ sys/dev/aic7xxx/aicasm/aicasm_gram.y	(working copy)
@@ -1823,7 +1823,7 @@
 	int and_op;
 
 	and_op = FALSE;
-	if (opcode == AIC_OP_AND || opcode == AIC_OP_JNZ || AIC_OP_JZ)
+	if (opcode == AIC_OP_AND || opcode == AIC_OP_JNZ || opcode == AIC_OP_JZ)
 		and_op = TRUE;
 
 	/*

-- 
Pawel



More information about the freebsd-scsi mailing list