[Pcsclite-cvs-commit] r6878 - trunk/Drivers/ccid/src

ludovic.rousseau at free.fr ludovic.rousseau at free.fr
Sun Mar 23 12:15:03 UTC 2014


Author: rousseau
Date: 2014-03-23 12:15:03 +0000 (Sun, 23 Mar 2014)
New Revision: 6878

Modified:
   trunk/Drivers/ccid/src/commands.c
Log:
Fix compiler warning

commands.c:511:19: warning: | has lower precedence than ==; == will be evaluated first [-Wparentheses]
                        if (T1_S_BLOCK | T1_S_WTX == RxBuffer[PCB])
                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~
commands.c:511:19: note: place parentheses around the '==' expression to silence this warning
                        if (T1_S_BLOCK | T1_S_WTX == RxBuffer[PCB])
                                       ^ ~~~~~~~~~~~~~~~~~~~~~~~~~
commands.c:511:19: note: place parentheses around the | expression to evaluate it first
                        if (T1_S_BLOCK | T1_S_WTX == RxBuffer[PCB])
                            ~~~~~~~~~~~^~~~~~~~~~
1 warning generated.


Modified: trunk/Drivers/ccid/src/commands.c
===================================================================
--- trunk/Drivers/ccid/src/commands.c	2014-03-23 12:11:35 UTC (rev 6877)
+++ trunk/Drivers/ccid/src/commands.c	2014-03-23 12:15:03 UTC (rev 6878)
@@ -508,7 +508,7 @@
 			#define T1_S_WTX		0x03
 
 			/* WTX S-block */
-			if (T1_S_BLOCK | T1_S_WTX == RxBuffer[PCB])
+			if ((T1_S_BLOCK | T1_S_WTX) == RxBuffer[PCB])
 			{
 /*
  * The Swiss health care card sends a WTX request before returning the




More information about the Pcsclite-cvs-commit mailing list