[Pcsclite-cvs-commit] r5514 - /trunk/Drivers/ccid/src/commands.c

rousseau at users.alioth.debian.org rousseau at users.alioth.debian.org
Tue Jan 18 15:17:12 UTC 2011


Author: rousseau
Date: Tue Jan 18 15:17:10 2011
New Revision: 5514

URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=5514
Log:
Add an explicit cast to avoid a compiler warning

commands.c:169:16: warning: comparison of integers of different signs:
      'unsigned int' and 'int' [-Wsign-compare]
                if (*nlength > r-1)
                    ~~~~~~~~ ^ ~~~

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

Modified: trunk/Drivers/ccid/src/commands.c
URL: http://svn.debian.org/wsvn/pcsclite/trunk/Drivers/ccid/src/commands.c?rev=5514&op=diff
==============================================================================
--- trunk/Drivers/ccid/src/commands.c (original)
+++ trunk/Drivers/ccid/src/commands.c Tue Jan 18 15:17:10 2011
@@ -166,7 +166,7 @@
 		}
 
 		DEBUG_INFO_XXD("Data Block: ", tmp, r);
-		if (*nlength > r-1)
+		if ((int)*nlength > r-1)
 			*nlength = r-1;
 		memcpy(buffer, tmp+1, *nlength);
 




More information about the Pcsclite-cvs-commit mailing list