[SmartcardServices-Changes] [96] trunk/SmartCardServices/src/PCSC/pcscdmonitor.cpp

source_changes at macosforge.org source_changes at macosforge.org
Mon Jan 11 05:32:04 PST 2010


Revision: 96
          http://trac.macosforge.org/projects/smartcardservices/changeset/96
Author:   ludovic.rousseau at gmail.com
Date:     2010-01-11 05:31:59 -0800 (Mon, 11 Jan 2010)
Log Message:
-----------
fix compiler warning and possible bug
pcscdmonitor.cpp:1119: warning: 'isPCCard' is used uninitialized in this function
pcscdmonitor.cpp:1150: warning: 'vendorID' is used uninitialized in this function
pcscdmonitor.cpp:1150: warning: 'productID' is used uninitialized in this function

The variables are not initialized because the call to
getVendorAndProductID() is commented

Modified Paths:
--------------
    trunk/SmartCardServices/src/PCSC/pcscdmonitor.cpp

Modified: trunk/SmartCardServices/src/PCSC/pcscdmonitor.cpp
===================================================================
--- trunk/SmartCardServices/src/PCSC/pcscdmonitor.cpp	2010-01-11 13:21:43 UTC (rev 95)
+++ trunk/SmartCardServices/src/PCSC/pcscdmonitor.cpp	2010-01-11 13:31:59 UTC (rev 96)
@@ -1101,8 +1101,8 @@
 	{
 		std::string vendorName, productName, serialNumber, name;
 
-		uint32_t vendorID, productID;
-		bool isPCCard;
+		uint32_t vendorID = 0, productID = 0;
+		bool isPCCard = false;
 		
 		CFRef<CFStringRef> ioName = static_cast<CFStringRef>(::IORegistryEntryCreateCFProperty(
 			service, CFSTR(kzIOPCCardIONameKey), kCFAllocatorDefault, 0));
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/smartcardservices-changes/attachments/20100111/59fd6d2c/attachment.html>


More information about the SmartcardServices-Changes mailing list