[Pcsclite-cvs-commit] r5871 - /trunk/Drivers/ccid/src/ifdhandler.c

rousseau at users.alioth.debian.org rousseau at users.alioth.debian.org
Sat Jul 9 12:18:22 UTC 2011


Author: rousseau
Date: Sat Jul  9 12:18:21 2011
New Revision: 5871

URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=5871
Log:
Fix compiler warnings

ifdhandler.c: In function `IFDHCreateChannelByName':
ifdhandler.c:80:2: warning: format `%X' expects argument of type
`unsigned int', but argument 6 has type `DWORD' [-Wformat]

ifdhandler.c: In function `IFDHCreateChannel':
ifdhandler.c:201:2: warning: format `%X' expects argument of type
`unsigned int', but argument 6 has type `DWORD' [-Wformat]

ifdhandler.c: In function `IFDHCloseChannel':
ifdhandler.c:294:2: warning: format `%X' expects argument of type
`unsigned int', but argument 7 has type `DWORD' [-Wformat]

ifdhandler.c: In function `IFDHPolling':
ifdhandler.c:331:3: warning: format `%X' expects argument of type
`unsigned int', but argument 7 has type `DWORD' [-Wformat]

ifdhandler.c: In function `IFDHSleep':
ifdhandler.c:346:2: warning: format `%X' expects argument of type
`unsigned int', but argument 7 has type `DWORD' [-Wformat]

ifdhandler.c: In function `IFDHStopPolling':
ifdhandler.c:367:2: warning: format `%X' expects argument of type
`unsigned int', but argument 7 has type `DWORD' [-Wformat]

ifdhandler.c: In function `IFDHGetCapabilities':
ifdhandler.c:401:2: warning: format `%X' expects argument of type
`unsigned int', but argument 6 has type `DWORD' [-Wformat]
ifdhandler.c:401:2: warning: format `%X' expects argument of type
`unsigned int', but argument 8 has type `DWORD' [-Wformat]

ifdhandler.c: In function `IFDHSetCapabilities':
ifdhandler.c:660:2: warning: format `%X' expects argument of type
`unsigned int', but argument 6 has type `DWORD' [-Wformat]
ifdhandler.c:660:2: warning: format `%X' expects argument of type
`unsigned int', but argument 8 has type `DWORD' [-Wformat]

ifdhandler.c: In function `IFDHSetProtocolParameters':
ifdhandler.c:702:2: warning: format `%d' expects argument of type `int',
but argument 6 has type `DWORD' [-Wformat]
ifdhandler.c:702:2: warning: format `%X' expects argument of type
`unsigned int', but argument 8 has type `DWORD' [-Wformat]
ifdhandler.c:920:5: warning: format `%d' expects argument of type `int',
but argument 6 has type `DWORD' [-Wformat]

ifdhandler.c: In function `IFDHPowerICC':
ifdhandler.c:1153:2: warning: format `%X' expects argument of type
`unsigned int', but argument 8 has type `DWORD' [-Wformat]

ifdhandler.c: In function `IFDHTransmitToICC':
ifdhandler.c:1283:2: warning: format `%X' expects argument of type
`unsigned int', but argument 7 has type `DWORD' [-Wformat]

ifdhandler.c: In function `IFDHControl':
ifdhandler.c:1325:2: warning: format `%X' expects argument of type
`unsigned int', but argument 6 has type `DWORD' [-Wformat]
ifdhandler.c:1325:2: warning: format `%X' expects argument of type
`unsigned int', but argument 8 has type `DWORD' [-Wformat]

ifdhandler.c: In function `IFDHICCPresence':
ifdhandler.c:1616:2: warning: format `%X' expects argument of type
`unsigned int', but argument 7 has type `DWORD' [-Wformat]

ifdhandler.c: In function `IFDHCreateChannelByName':
ifdhandler.c:80:2: warning: format `%X' expects argument of type
`unsigned int', but argument 6 has type `DWORD' [-Wformat]

ifdhandler.c: In function `IFDHCreateChannel':
ifdhandler.c:201:2: warning: format `%X' expects argument of type
`unsigned int', but argument 6 has type `DWORD' [-Wformat]

ifdhandler.c: In function `IFDHCloseChannel':
ifdhandler.c:294:2: warning: format `%X' expects argument of type
`unsigned int', but argument 7 has type `DWORD' [-Wformat]

ifdhandler.c: In function `IFDHGetCapabilities':
ifdhandler.c:401:2: warning: format `%X' expects argument of type
`unsigned int', but argument 6 has type `DWORD' [-Wformat]
ifdhandler.c:401:2: warning: format `%X' expects argument of type
`unsigned int', but argument 8 has type `DWORD' [-Wformat]

ifdhandler.c: In function `IFDHSetCapabilities':
ifdhandler.c:660:2: warning: format `%X' expects argument of type
`unsigned int', but argument 6 has type `DWORD' [-Wformat]
ifdhandler.c:660:2: warning: format `%X' expects argument of type
`unsigned int', but argument 8 has type `DWORD' [-Wformat]

ifdhandler.c: In function `IFDHSetProtocolParameters':
ifdhandler.c:702:2: warning: format `%d' expects argument of type
`int', but argument 6 has type `DWORD' [-Wformat]
ifdhandler.c:702:2: warning: format `%X' expects argument of type
`unsigned int', but argument 8 has type `DWORD' [-Wformat]
ifdhandler.c:920:5: warning: format `%d' expects argument of type
`int', but argument 6 has type `DWORD' [-Wformat]

ifdhandler.c: In function `IFDHPowerICC':
ifdhandler.c:1153:2: warning: format `%X' expects argument of type
`unsigned int', but argument 8 has type `DWORD' [-Wformat]

ifdhandler.c: In function `IFDHTransmitToICC':
ifdhandler.c:1283:2: warning: format `%X' expects argument of type
`unsigned int', but argument 7 has type `DWORD' [-Wformat]

ifdhandler.c: In function `IFDHControl':
ifdhandler.c:1325:2: warning: format `%X' expects argument of type
`unsigned int', but argument 6 has type `DWORD' [-Wformat]
ifdhandler.c:1325:2: warning: format `%X' expects argument of type
`unsigned int', but argument 8 has type `DWORD' [-Wformat]

ifdhandler.c: In function `IFDHICCPresence':
ifdhandler.c:1616:2: warning: format `%X' expects argument of type
`unsigned int', but argument 7 has type `DWORD' [-Wformat]

Modified:
    trunk/Drivers/ccid/src/ifdhandler.c

Modified: trunk/Drivers/ccid/src/ifdhandler.c
URL: http://svn.debian.org/wsvn/pcsclite/trunk/Drivers/ccid/src/ifdhandler.c?rev=5871&op=diff
==============================================================================
--- trunk/Drivers/ccid/src/ifdhandler.c (original)
+++ trunk/Drivers/ccid/src/ifdhandler.c Sat Jul  9 12:18:21 2011
@@ -77,7 +77,7 @@
 	if (! DebugInitialized)
 		init_driver();
 
-	DEBUG_INFO3("lun: %X, device: %s", Lun, lpcDevice);
+	DEBUG_INFO3("lun: %lX, device: %s", Lun, lpcDevice);
 
 	if (-1 == (reader_index = GetNewReaderIndex(Lun)))
 		return IFD_COMMUNICATION_ERROR;
@@ -198,7 +198,7 @@
 	if (! DebugInitialized)
 		init_driver();
 
-	DEBUG_INFO2("lun: %X", Lun);
+	DEBUG_INFO2("lun: %lX", Lun);
 
 	if (-1 == (reader_index = GetNewReaderIndex(Lun)))
 		return IFD_COMMUNICATION_ERROR;
@@ -291,7 +291,7 @@
 	if (-1 == (reader_index = LunToReaderIndex(Lun)))
 		return IFD_COMMUNICATION_ERROR;
 
-	DEBUG_INFO3("%s (lun: %X)", CcidSlots[reader_index].readerName, Lun);
+	DEBUG_INFO3("%s (lun: %lX)", CcidSlots[reader_index].readerName, Lun);
 
 	/* Restore the default timeout
 	 * No need to wait too long if the reader disapeared */
@@ -328,7 +328,7 @@
 
 	/* log only if DEBUG_LEVEL_PERIODIC is set */
 	if (LogLevel & DEBUG_LEVEL_PERIODIC)
-		DEBUG_INFO4("%s (lun: %X) %d ms", CcidSlots[reader_index].readerName,
+		DEBUG_INFO4("%s (lun: %lX) %d ms", CcidSlots[reader_index].readerName,
 			Lun, timeout);
 
 	return InterruptRead(reader_index, timeout);
@@ -343,7 +343,7 @@
 	if (-1 == (reader_index = LunToReaderIndex(Lun)))
 		return IFD_COMMUNICATION_ERROR;
 
-	DEBUG_INFO4("%s (lun: %X) %d ms", CcidSlots[reader_index].readerName, Lun,
+	DEBUG_INFO4("%s (lun: %lX) %d ms", CcidSlots[reader_index].readerName, Lun,
 		timeout);
 
 	/* just sleep for 5 seconds since the polling thread is NOT killable
@@ -364,7 +364,7 @@
 	if (-1 == (reader_index = LunToReaderIndex(Lun)))
 		return IFD_COMMUNICATION_ERROR;
 
-	DEBUG_INFO3("%s (lun: %X)", CcidSlots[reader_index].readerName, Lun);
+	DEBUG_INFO3("%s (lun: %lX)", CcidSlots[reader_index].readerName, Lun);
 
 	(void)InterruptStop(reader_index);
 	return IFD_SUCCESS;
@@ -398,7 +398,7 @@
 	if (-1 == (reader_index = LunToReaderIndex(Lun)))
 		return IFD_COMMUNICATION_ERROR;
 
-	DEBUG_INFO4("tag: 0x%X, %s (lun: %X)", Tag,
+	DEBUG_INFO4("tag: 0x%lX, %s (lun: %lX)", Tag,
 		CcidSlots[reader_index].readerName, Lun);
 
 	switch (Tag)
@@ -657,7 +657,7 @@
 	if (-1 == (reader_index = LunToReaderIndex(Lun)))
 		return IFD_COMMUNICATION_ERROR;
 
-	DEBUG_INFO4("tag: 0x%X, %s (lun: %X)", Tag,
+	DEBUG_INFO4("tag: 0x%lX, %s (lun: %lX)", Tag,
 		CcidSlots[reader_index].readerName, Lun);
 
 	return IFD_NOT_SUPPORTED;
@@ -699,7 +699,7 @@
 	if (-1 == (reader_index = LunToReaderIndex(Lun)))
 		return IFD_COMMUNICATION_ERROR;
 
-	DEBUG_INFO4("protocol T=%d, %s (lun: %X)", Protocol-SCARD_PROTOCOL_T0,
+	DEBUG_INFO4("protocol T=%ld, %s (lun: %lX)", Protocol-SCARD_PROTOCOL_T0,
 		CcidSlots[reader_index].readerName, Lun);
 
 	/* Set to zero buffer */
@@ -917,7 +917,7 @@
 				/* convert from ATR_PROTOCOL_TYPE_T? to SCARD_PROTOCOL_T? */
 				Protocol = default_protocol +
 				   	(SCARD_PROTOCOL_T0 - ATR_PROTOCOL_TYPE_T0);
-				DEBUG_INFO2("PPS not supported on O2Micro readers. Using T=%d",
+				DEBUG_INFO2("PPS not supported on O2Micro readers. Using T=%ld",
 					Protocol - SCARD_PROTOCOL_T0);
 			}
 			else
@@ -1150,7 +1150,7 @@
 	if (-1 == (reader_index = LunToReaderIndex(Lun)))
 		return IFD_COMMUNICATION_ERROR;
 
-	DEBUG_INFO4("action: %s, %s (lun: %X)", actions[Action-IFD_POWER_UP],
+	DEBUG_INFO4("action: %s, %s (lun: %lX)", actions[Action-IFD_POWER_UP],
 		CcidSlots[reader_index].readerName, Lun);
 
 	switch (Action)
@@ -1280,7 +1280,7 @@
 	if (-1 == (reader_index = LunToReaderIndex(Lun)))
 		return IFD_COMMUNICATION_ERROR;
 
-	DEBUG_INFO3("%s (lun: %X)", CcidSlots[reader_index].readerName, Lun);
+	DEBUG_INFO3("%s (lun: %lX)", CcidSlots[reader_index].readerName, Lun);
 
 	rx_length = *RxLength;
 	return_value = CmdXfrBlock(reader_index, TxLength, TxBuffer, &rx_length,
@@ -1322,7 +1322,7 @@
 
 	ccid_descriptor = get_ccid_descriptor(reader_index);
 
-	DEBUG_INFO4("ControlCode: 0x%X, %s (lun: %X)", dwControlCode,
+	DEBUG_INFO4("ControlCode: 0x%lX, %s (lun: %lX)", dwControlCode,
 		CcidSlots[reader_index].readerName, Lun);
 	DEBUG_INFO_XXD("Control TxBuffer: ", TxBuffer, TxLength);
 
@@ -1613,7 +1613,7 @@
 	if (-1 == (reader_index = LunToReaderIndex(Lun)))
 		return IFD_COMMUNICATION_ERROR;
 
-	DEBUG_PERIODIC3("%s (lun: %X)", CcidSlots[reader_index].readerName, Lun);
+	DEBUG_PERIODIC3("%s (lun: %lX)", CcidSlots[reader_index].readerName, Lun);
 
 	ccid_descriptor = get_ccid_descriptor(reader_index);
 




More information about the Pcsclite-cvs-commit mailing list