[Pcsclite-cvs-commit] r3247 - in /trunk/PCSC/src: ./ utils/

rousseau at users.alioth.debian.org rousseau at users.alioth.debian.org
Fri Jan 2 13:22:46 UTC 2009


Author: rousseau
Date: Fri Jan  2 13:22:46 2009
New Revision: 3247

URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=3247
Log:
explicitly cast result in void when not used (reported by the splint tool)

Modified:
    trunk/PCSC/src/configfile.l
    trunk/PCSC/src/debug.c
    trunk/PCSC/src/dyn_unix.c
    trunk/PCSC/src/error.c
    trunk/PCSC/src/eventhandler.c
    trunk/PCSC/src/hotplug_libhal.c
    trunk/PCSC/src/ifdwrapper.c
    trunk/PCSC/src/readerfactory.c
    trunk/PCSC/src/sys_unix.c
    trunk/PCSC/src/testpcsc.c
    trunk/PCSC/src/thread_unix.c
    trunk/PCSC/src/tokenparser.l
    trunk/PCSC/src/utils.c
    trunk/PCSC/src/utils/formaticc.c
    trunk/PCSC/src/utils/installifd.c
    trunk/PCSC/src/winscard.c
    trunk/PCSC/src/winscard_clnt.c
    trunk/PCSC/src/winscard_msg.c
    trunk/PCSC/src/winscard_msg_srv.c
    trunk/PCSC/src/winscard_svc.c

Modified: trunk/PCSC/src/configfile.l
URL: http://svn.debian.org/wsvn/pcsclite/trunk/PCSC/src/configfile.l?rev=3247&op=diff
==============================================================================
--- trunk/PCSC/src/configfile.l (original)
+++ trunk/PCSC/src/configfile.l Fri Jan  2 13:22:46 2009
@@ -42,9 +42,9 @@
 
 #.*                                       {}
 "\n"                                      { iLinenumber++; }
-(\"[^"\n]*["\n])|(\'[^'\n]*['\n])         { evaluatetoken( yytext); }
+(\"[^"\n]*["\n])|(\'[^'\n]*['\n])         { (void)evaluatetoken( yytext); }
 [ \t]                                     {}
-([A-Z]|[a-z]|[0-9]|[\\\/\-\.\_\@:])+      { evaluatetoken( yytext ); }
+([A-Z]|[a-z]|[0-9]|[\\\/\-\.\_\@:])+      { (void)evaluatetoken( yytext ); }
 .                                         { tok_error( yytext ); }
 %%
 
@@ -243,11 +243,11 @@
 
 	do
 	{
-		yylex();
+		(void)yylex();
 	}
 	while (!feof(configFile));
 
-	fclose(configFile);
+	(void)fclose(configFile);
 
 	*caller_reader_list = reader_list;
 

Modified: trunk/PCSC/src/debug.c
URL: http://svn.debian.org/wsvn/pcsclite/trunk/PCSC/src/debug.c?rev=3247&op=diff
==============================================================================
--- trunk/PCSC/src/debug.c (original)
+++ trunk/PCSC/src/debug.c Fri Jan  2 13:22:46 2009
@@ -87,7 +87,7 @@
 
 	va_start(argptr, fmt);
 #ifndef WIN32
-	vsnprintf(DebugBuffer, DEBUG_BUF_SIZE, fmt, argptr);
+	(void)vsnprintf(DebugBuffer, DEBUG_BUF_SIZE, fmt, argptr);
 #else
 #if HAVE_VSNPRINTF
 	vsnprintf(DebugBuffer, DEBUG_BUF_SIZE, fmt, argptr);
@@ -145,7 +145,7 @@
 
 	debug_buf_end = DebugBuffer + DEBUG_BUF_SIZE - 5;
 
-	strlcpy(DebugBuffer, msg, sizeof(DebugBuffer));
+	(void)strlcpy(DebugBuffer, msg, sizeof(DebugBuffer));
 	c = DebugBuffer + strlen(DebugBuffer);
 
 	for (i = 0; (i < len) && (c < debug_buf_end); ++i)

Modified: trunk/PCSC/src/dyn_unix.c
URL: http://svn.debian.org/wsvn/pcsclite/trunk/PCSC/src/dyn_unix.c?rev=3247&op=diff
==============================================================================
--- trunk/PCSC/src/dyn_unix.c (original)
+++ trunk/PCSC/src/dyn_unix.c Fri Jan  2 13:22:46 2009
@@ -62,7 +62,7 @@
 	int rv;
 
 	/* Some platforms might need a leading underscore for the symbol */
-	snprintf(pcFunctionName, sizeof(pcFunctionName), "_%s", pcFunction);
+	(void)snprintf(pcFunctionName, sizeof(pcFunctionName), "_%s", pcFunction);
 
 	*pvFHandle = NULL;
 	*pvFHandle = dlsym(pvLHandle, pcFunctionName);

Modified: trunk/PCSC/src/error.c
URL: http://svn.debian.org/wsvn/pcsclite/trunk/PCSC/src/error.c?rev=3247&op=diff
==============================================================================
--- trunk/PCSC/src/error.c (original)
+++ trunk/PCSC/src/error.c Fri Jan  2 13:22:46 2009
@@ -50,121 +50,121 @@
 	switch (pcscError)
 	{
 	case SCARD_S_SUCCESS:
-		strlcpy(strError, "Command successful.", sizeof(strError));
+		(void)strlcpy(strError, "Command successful.", sizeof(strError));
 		break;
 	case SCARD_E_CANCELLED:
-		strlcpy(strError, "Command cancelled.", sizeof(strError));
+		(void)strlcpy(strError, "Command cancelled.", sizeof(strError));
 		break;
 	case SCARD_E_CANT_DISPOSE:
-		strlcpy(strError, "Cannot dispose handle.", sizeof(strError));
+		(void)strlcpy(strError, "Cannot dispose handle.", sizeof(strError));
 		break;
 	case SCARD_E_INSUFFICIENT_BUFFER:
-		strlcpy(strError, "Insufficient buffer.", sizeof(strError));
+		(void)strlcpy(strError, "Insufficient buffer.", sizeof(strError));
 		break;
 	case SCARD_E_INVALID_ATR:
-		strlcpy(strError, "Invalid ATR.", sizeof(strError));
+		(void)strlcpy(strError, "Invalid ATR.", sizeof(strError));
 		break;
 	case SCARD_E_INVALID_HANDLE:
-		strlcpy(strError, "Invalid handle.", sizeof(strError));
+		(void)strlcpy(strError, "Invalid handle.", sizeof(strError));
 		break;
 	case SCARD_E_INVALID_PARAMETER:
-		strlcpy(strError, "Invalid parameter given.", sizeof(strError));
+		(void)strlcpy(strError, "Invalid parameter given.", sizeof(strError));
 		break;
 	case SCARD_E_INVALID_TARGET:
-		strlcpy(strError, "Invalid target given.", sizeof(strError));
+		(void)strlcpy(strError, "Invalid target given.", sizeof(strError));
 		break;
 	case SCARD_E_INVALID_VALUE:
-		strlcpy(strError, "Invalid value given.", sizeof(strError));
+		(void)strlcpy(strError, "Invalid value given.", sizeof(strError));
 		break;
 	case SCARD_E_NO_MEMORY:
-		strlcpy(strError, "Not enough memory.", sizeof(strError));
+		(void)strlcpy(strError, "Not enough memory.", sizeof(strError));
 		break;
 	case SCARD_F_COMM_ERROR:
-		strlcpy(strError, "RPC transport error.", sizeof(strError));
+		(void)strlcpy(strError, "RPC transport error.", sizeof(strError));
 		break;
 	case SCARD_F_INTERNAL_ERROR:
-		strlcpy(strError, "Internal error.", sizeof(strError));
+		(void)strlcpy(strError, "Internal error.", sizeof(strError));
 		break;
 	case SCARD_F_UNKNOWN_ERROR:
-		strlcpy(strError, "Unknown error.", sizeof(strError));
+		(void)strlcpy(strError, "Unknown error.", sizeof(strError));
 		break;
 	case SCARD_F_WAITED_TOO_LONG:
-		strlcpy(strError, "Waited too long.", sizeof(strError));
+		(void)strlcpy(strError, "Waited too long.", sizeof(strError));
 		break;
 	case SCARD_E_UNKNOWN_READER:
-		strlcpy(strError, "Unknown reader specified.", sizeof(strError));
+		(void)strlcpy(strError, "Unknown reader specified.", sizeof(strError));
 		break;
 	case SCARD_E_TIMEOUT:
-		strlcpy(strError, "Command timeout.", sizeof(strError));
+		(void)strlcpy(strError, "Command timeout.", sizeof(strError));
 		break;
 	case SCARD_E_SHARING_VIOLATION:
-		strlcpy(strError, "Sharing violation.", sizeof(strError));
+		(void)strlcpy(strError, "Sharing violation.", sizeof(strError));
 		break;
 	case SCARD_E_NO_SMARTCARD:
-		strlcpy(strError, "No smart card inserted.", sizeof(strError));
+		(void)strlcpy(strError, "No smart card inserted.", sizeof(strError));
 		break;
 	case SCARD_E_UNKNOWN_CARD:
-		strlcpy(strError, "Unknown card.", sizeof(strError));
+		(void)strlcpy(strError, "Unknown card.", sizeof(strError));
 		break;
 	case SCARD_E_PROTO_MISMATCH:
-		strlcpy(strError, "Card protocol mismatch.", sizeof(strError));
+		(void)strlcpy(strError, "Card protocol mismatch.", sizeof(strError));
 		break;
 	case SCARD_E_NOT_READY:
-		strlcpy(strError, "Subsystem not ready.", sizeof(strError));
+		(void)strlcpy(strError, "Subsystem not ready.", sizeof(strError));
 		break;
 	case SCARD_E_SYSTEM_CANCELLED:
-		strlcpy(strError, "System cancelled.", sizeof(strError));
+		(void)strlcpy(strError, "System cancelled.", sizeof(strError));
 		break;
 	case SCARD_E_NOT_TRANSACTED:
-		strlcpy(strError, "Transaction failed.", sizeof(strError));
+		(void)strlcpy(strError, "Transaction failed.", sizeof(strError));
 		break;
 	case SCARD_E_READER_UNAVAILABLE:
-		strlcpy(strError, "Reader is unavailable.", sizeof(strError));
+		(void)strlcpy(strError, "Reader is unavailable.", sizeof(strError));
 		break;
 	case SCARD_W_UNSUPPORTED_CARD:
-		strlcpy(strError, "Card is not supported.", sizeof(strError));
+		(void)strlcpy(strError, "Card is not supported.", sizeof(strError));
 		break;
 	case SCARD_W_UNRESPONSIVE_CARD:
-		strlcpy(strError, "Card is unresponsive.", sizeof(strError));
+		(void)strlcpy(strError, "Card is unresponsive.", sizeof(strError));
 		break;
 	case SCARD_W_UNPOWERED_CARD:
-		strlcpy(strError, "Card is unpowered.", sizeof(strError));
+		(void)strlcpy(strError, "Card is unpowered.", sizeof(strError));
 		break;
 	case SCARD_W_RESET_CARD:
-		strlcpy(strError, "Card was reset.", sizeof(strError));
+		(void)strlcpy(strError, "Card was reset.", sizeof(strError));
 		break;
 	case SCARD_W_REMOVED_CARD:
-		strlcpy(strError, "Card was removed.", sizeof(strError));
+		(void)strlcpy(strError, "Card was removed.", sizeof(strError));
 		break;
 	case SCARD_W_INSERTED_CARD:
-		strlcpy(strError, "Card was inserted.", sizeof(strError));
+		(void)strlcpy(strError, "Card was inserted.", sizeof(strError));
 		break;
 	case SCARD_E_UNSUPPORTED_FEATURE:
-		strlcpy(strError, "Feature not supported.", sizeof(strError));
+		(void)strlcpy(strError, "Feature not supported.", sizeof(strError));
 		break;
 	case SCARD_E_PCI_TOO_SMALL:
-		strlcpy(strError, "PCI struct too small.", sizeof(strError));
+		(void)strlcpy(strError, "PCI struct too small.", sizeof(strError));
 		break;
 	case SCARD_E_READER_UNSUPPORTED:
-		strlcpy(strError, "Reader is unsupported.", sizeof(strError));
+		(void)strlcpy(strError, "Reader is unsupported.", sizeof(strError));
 		break;
 	case SCARD_E_DUPLICATE_READER:
-		strlcpy(strError, "Reader already exists.", sizeof(strError));
+		(void)strlcpy(strError, "Reader already exists.", sizeof(strError));
 		break;
 	case SCARD_E_CARD_UNSUPPORTED:
-		strlcpy(strError, "Card is unsupported.", sizeof(strError));
+		(void)strlcpy(strError, "Card is unsupported.", sizeof(strError));
 		break;
 	case SCARD_E_NO_SERVICE:
-		strlcpy(strError, "Service not available.", sizeof(strError));
+		(void)strlcpy(strError, "Service not available.", sizeof(strError));
 		break;
 	case SCARD_E_SERVICE_STOPPED:
-		strlcpy(strError, "Service was stopped.", sizeof(strError));
+		(void)strlcpy(strError, "Service was stopped.", sizeof(strError));
 		break;
 	case SCARD_E_NO_READERS_AVAILABLE:
-		strlcpy(strError, "Cannot find a smart card reader.", sizeof(strError));
+		(void)strlcpy(strError, "Cannot find a smart card reader.", sizeof(strError));
 		break;
 	default:
-		snprintf(strError, sizeof(strError)-1, "Unkown error: 0x%08lX",
+		(void)snprintf(strError, sizeof(strError)-1, "Unkown error: 0x%08lX",
 			pcscError);
 	};
 

Modified: trunk/PCSC/src/eventhandler.c
URL: http://svn.debian.org/wsvn/pcsclite/trunk/PCSC/src/eventhandler.c?rev=3247&op=diff
==============================================================================
--- trunk/PCSC/src/eventhandler.c (original)
+++ trunk/PCSC/src/eventhandler.c Fri Jan  2 13:22:46 2009
@@ -50,7 +50,7 @@
 	i = 0;
 	pageSize = 0;
 
-	SYS_RemoveFile(PCSCLITE_PUBSHM_FILE);
+	(void)SYS_RemoveFile(PCSCLITE_PUBSHM_FILE);
 
 	fd = SYS_OpenFile(PCSCLITE_PUBSHM_FILE, O_RDWR | O_CREAT, mode);
 	if (fd < 0)
@@ -61,15 +61,15 @@
 	}
 
 	/* set correct mode even is umask is too restictive */
-	SYS_Chmod(PCSCLITE_PUBSHM_FILE, mode);
+	(void)SYS_Chmod(PCSCLITE_PUBSHM_FILE, mode);
 
 	pageSize = SYS_GetPageSize();
 
 	/*
 	 * Jump to end of file space and allocate zero's
 	 */
-	SYS_SeekFile(fd, pageSize * PCSCLITE_MAX_READERS_CONTEXTS);
-	SYS_WriteFile(fd, "", 1);
+	(void)SYS_SeekFile(fd, pageSize * PCSCLITE_MAX_READERS_CONTEXTS);
+	(void)SYS_WriteFile(fd, "", 1);
 
 	/*
 	 * Allocate each reader structure
@@ -133,7 +133,7 @@
 	if ((IFD_SUCCESS == rv) && (1 == dwGetSize) && ucGetData[0])
 	{
 		Log1(PCSC_LOG_INFO, "Killing polling thread");
-		SYS_ThreadCancel(rContext->pthThread);
+		(void)SYS_ThreadCancel(rContext->pthThread);
 	}
 	else
 		Log1(PCSC_LOG_INFO, "Waiting polling thread");
@@ -197,7 +197,7 @@
 	 * Set all the attributes to this reader
 	 */
 	rContext->readerState = readerStates[i];
-	strlcpy(rContext->readerState->readerName, rContext->lpcReader,
+	(void)strlcpy(rContext->readerState->readerName, rContext->lpcReader,
 		sizeof(rContext->readerState->readerName));
 	memcpy(rContext->readerState->cardAtr, ucAtr, dwAtrLen);
 	rContext->readerState->readerID = i + 100;
@@ -316,7 +316,7 @@
 	rContext->readerState->readerSharing = dwReaderSharing =
 		rContext->dwContexts;
 
-	StatSynchronize(rContext->readerState);
+	(void)StatSynchronize(rContext->readerState);
 
 	while (1)
 	{
@@ -347,7 +347,7 @@
 
 			dwCurrentState = SCARD_UNKNOWN;
 
-			StatSynchronize(rContext->readerState);
+			(void)StatSynchronize(rContext->readerState);
 		}
 
 		if (dwStatus & SCARD_ABSENT)
@@ -362,7 +362,7 @@
 				/*
 				 * Notify the card has been removed
 				 */
-				RFSetReaderEventState(rContext, SCARD_REMOVED);
+				(void)RFSetReaderEventState(rContext, SCARD_REMOVED);
 
 				rContext->readerState->cardAtrLength = 0;
 				rContext->readerState->cardProtocol = SCARD_PROTOCOL_UNDEFINED;
@@ -377,7 +377,7 @@
 
 				incrementEventCounter(rContext->readerState);
 
-				StatSynchronize(rContext->readerState);
+				(void)StatSynchronize(rContext->readerState);
 			}
 
 		}
@@ -424,7 +424,7 @@
 
 				incrementEventCounter(rContext->readerState);
 
-				StatSynchronize(rContext->readerState);
+				(void)StatSynchronize(rContext->readerState);
 
 				Log2(PCSC_LOG_INFO, "Card inserted into %s", lpcReader);
 
@@ -451,7 +451,7 @@
 		{
 			dwReaderSharing = rContext->dwContexts;
 			rContext->readerState->readerSharing = dwReaderSharing;
-			StatSynchronize(rContext->readerState);
+			(void)StatSynchronize(rContext->readerState);
 		}
 
 		if (rContext->pthCardEvent)
@@ -460,10 +460,10 @@
 
 			ret = rContext->pthCardEvent(rContext->dwSlot);
 			if (IFD_NO_SUCH_DEVICE == ret)
-				SYS_USleep(PCSCLITE_STATUS_POLL_RATE);
+				(void)SYS_USleep(PCSCLITE_STATUS_POLL_RATE);
 		}
 		else
-			SYS_USleep(PCSCLITE_STATUS_POLL_RATE);
+			(void)SYS_USleep(PCSCLITE_STATUS_POLL_RATE);
 
 		if (rContext->dwLockId == 0xFFFF)
 		{
@@ -472,7 +472,7 @@
 			 */
 			Log1(PCSC_LOG_INFO, "Die");
 			rContext->dwLockId = 0;
-			SYS_ThreadExit(NULL);
+			(void)SYS_ThreadExit(NULL);
 		}
 	}
 }

Modified: trunk/PCSC/src/hotplug_libhal.c
URL: http://svn.debian.org/wsvn/pcsclite/trunk/PCSC/src/hotplug_libhal.c?rev=3247&op=diff
==============================================================================
--- trunk/PCSC/src/hotplug_libhal.c (original)
+++ trunk/PCSC/src/hotplug_libhal.c Fri Jan  2 13:22:46 2009
@@ -127,7 +127,7 @@
 			 * The bundle exists - let's form a full path name and get the
 			 * vendor and product ID's for this particular bundle
 			 */
-			snprintf(fullPath, sizeof(fullPath), "%s/%s/Contents/Info.plist",
+			(void)snprintf(fullPath, sizeof(fullPath), "%s/%s/Contents/Info.plist",
 				PCSCLITE_HP_DROPDIR, currFP->d_name);
 			fullPath[sizeof(fullPath) - 1] = '\0';
 
@@ -161,7 +161,7 @@
 					PCSCLITE_HP_LIBRKEY_NAME, keyValue, 0);
 				if (0 == rv)
 				{
-					snprintf(fullLibPath, sizeof(fullLibPath),
+					(void)snprintf(fullLibPath, sizeof(fullLibPath),
 						"%s/%s/Contents/%s/%s",
 						PCSCLITE_HP_DROPDIR, currFP->d_name, PCSC_ARCH,
 						keyValue);
@@ -221,7 +221,7 @@
 	}
 
 	driverSize = listCount;
-	closedir(hpDir);
+	(void)closedir(hpDir);
 
 #ifdef DEBUG_HOTPLUG
 	Log2(PCSC_LOG_INFO, "Found drivers for %d readers", listCount);
@@ -342,14 +342,14 @@
 
 	Log2(PCSC_LOG_INFO, "Adding USB device: %s", short_name(udi));
 
-	snprintf(deviceName, sizeof(deviceName), "usb:%04x/%04x:libhal:%s",
+	(void)snprintf(deviceName, sizeof(deviceName), "usb:%04x/%04x:libhal:%s",
 		driver->manuID, driver->productID, udi);
 	deviceName[sizeof(deviceName) -1] = '\0';
 
 	/* wait until the device is visible by libusb/etc.  */
-	SYS_Sleep(1);
-
-	SYS_MutexLock(&usbNotifierMutex);
+	(void)SYS_Sleep(1);
+
+	(void)SYS_MutexLock(&usbNotifierMutex);
 
 	/* find a free entry */
 	for (i=0; i<PCSCLITE_MAX_READERS_CONTEXTS; i++)
@@ -362,7 +362,7 @@
 	{
 		Log2(PCSC_LOG_ERROR,
 			"Not enough reader entries. Already found %d readers", i);
-		SYS_MutexUnLock(&usbNotifierMutex);
+		(void)SYS_MutexUnLock(&usbNotifierMutex);
 		return;
 	}
 
@@ -377,7 +377,7 @@
 		sSerialNumber = libhal_device_get_property_string(ctx, udi,
 			"usb.serial", &error);
 
-		snprintf(fullname, sizeof(fullname), "%s (%s)",
+		(void)snprintf(fullname, sizeof(fullname), "%s (%s)",
 			driver->readerName, sSerialNumber);
 		readerTracker[i].fullName = strdup(fullname);
 	}
@@ -402,7 +402,7 @@
 		(void)CheckForOpenCT();
 	}
 
-	SYS_MutexUnLock(&usbNotifierMutex);
+	(void)SYS_MutexUnLock(&usbNotifierMutex);
 } /* HPAddDevice */
 
 
@@ -425,15 +425,15 @@
 	Log3(PCSC_LOG_INFO, "Removing USB device[%d]: %s", i,
 		short_name(readerTracker[i].udi));
 
-	SYS_MutexLock(&usbNotifierMutex);
-
-	RFRemoveReader(readerTracker[i].fullName, PCSCLITE_HP_BASE_PORT + i);
+	(void)SYS_MutexLock(&usbNotifierMutex);
+
+	(void)RFRemoveReader(readerTracker[i].fullName, PCSCLITE_HP_BASE_PORT + i);
 	free(readerTracker[i].fullName);
 	readerTracker[i].fullName = NULL;
 	free(readerTracker[i].udi);
 	readerTracker[i].udi = NULL;
 
-	SYS_MutexUnLock(&usbNotifierMutex);
+	(void)SYS_MutexUnLock(&usbNotifierMutex);
 
 	return;
 } /* HPRemoveDevice */
@@ -491,10 +491,10 @@
 	}
 
 	/* callback when device added */
-	libhal_ctx_set_device_added(hal_ctx, HPAddDevice);
+	(void)libhal_ctx_set_device_added(hal_ctx, HPAddDevice);
 
 	/* callback when device removed */
-	libhal_ctx_set_device_removed(hal_ctx, HPRemoveDevice);
+	(void)libhal_ctx_set_device_removed(hal_ctx, HPRemoveDevice);
 
 	device_names = libhal_get_all_devices(hal_ctx, &num_devices, &error);
 	if (device_names == NULL)
@@ -511,7 +511,7 @@
 
 	libhal_free_string_array(device_names);
 
-	SYS_ThreadCreate(&usbNotifyThread, THREAD_ATTR_DETACHED,
+	(void)SYS_ThreadCreate(&usbNotifyThread, THREAD_ATTR_DETACHED,
 		(PCSCLITE_THREAD_FUNCTION( )) HPEstablishUSBNotifications, NULL);
 
 	return 0;

Modified: trunk/PCSC/src/ifdwrapper.c
URL: http://svn.debian.org/wsvn/pcsclite/trunk/PCSC/src/ifdwrapper.c?rev=3247&op=diff
==============================================================================
--- trunk/PCSC/src/ifdwrapper.c (original)
+++ trunk/PCSC/src/ifdwrapper.c Fri Jan  2 13:22:46 2009
@@ -77,7 +77,7 @@
 	if (rContext->dwVersion == IFD_HVERSION_1_0)
 	{
 	        ucValue[0] = rContext->dwSlot;
-	        IFDSetCapabilities(rContext, TAG_IFD_SLOTNUM, 1, ucValue);
+	        (void)IFDSetCapabilities(rContext, TAG_IFD_SLOTNUM, 1, ucValue);
 	        rv = (*IFD_set_protocol_parameters) (dwProtocol,
 			ucFlags, ucPTS1, ucPTS2, ucPTS3);
 	}
@@ -92,7 +92,7 @@
 	if (rContext->dwVersion == IFD_HVERSION_1_0)
 	{
 	        ucValue[0] = rContext->dwSlot;
-	        IFDSetCapabilities(rContext, TAG_IFD_SLOTNUM, 1, ucValue);
+	        (void)IFDSetCapabilities(rContext, TAG_IFD_SLOTNUM, 1, ucValue);
 		rv = IFD_Set_Protocol_Parameters(dwProtocol, ucFlags, ucPTS1,
 			ucPTS2, ucPTS3);
 	}
@@ -135,7 +135,7 @@
 #endif
 
 	/* LOCK THIS CODE REGION */
-	SYS_MutexLock(rContext->mMutex);
+	(void)SYS_MutexLock(rContext->mMutex);
 
 #ifndef PCSCLITE_STATIC_DRIVER
 	if (rContext->dwVersion == IFD_HVERSION_1_0)
@@ -170,7 +170,7 @@
 #endif
 
 	/* END OF LOCKED REGION */
-	SYS_MutexUnLock(rContext->mMutex);
+	(void)SYS_MutexUnLock(rContext->mMutex);
 
 	return rv;
 }
@@ -203,7 +203,7 @@
 		repeat--;
 		if (repeat)
 		{
-			SYS_USleep(100*1000);	/* 100 ms */
+			(void)SYS_USleep(100*1000);	/* 100 ms */
 			goto again;
 		}
 	}
@@ -222,7 +222,7 @@
 #endif
 
 	/* END OF LOCKED REGION */
-	SYS_MutexUnLock(rContext->mMutex);
+	(void)SYS_MutexUnLock(rContext->mMutex);
 
 	return rv;
 }
@@ -290,7 +290,7 @@
 #endif
 
 	/* LOCK THIS CODE REGION */
-	SYS_MutexLock(rContext->mMutex);
+	(void)SYS_MutexLock(rContext->mMutex);
 
 #ifndef PCSCLITE_STATIC_DRIVER
 	if (rContext->dwVersion == IFD_HVERSION_1_0)
@@ -307,7 +307,7 @@
 #endif
 
 	/* END OF LOCKED REGION */
-	SYS_MutexUnLock(rContext->mMutex);
+	(void)SYS_MutexUnLock(rContext->mMutex);
 
 	return rv;
 }
@@ -339,7 +339,7 @@
 	/*
 	 * Check that the card is inserted first
 	 */
-	IFDStatusICC(rContext, &dwStatus, pucAtr, pdwAtrLen);
+	(void)IFDStatusICC(rContext, &dwStatus, pucAtr, pdwAtrLen);
 
 	if (dwStatus & SCARD_ABSENT)
 		return SCARD_W_REMOVED_CARD;
@@ -351,13 +351,13 @@
 #endif
 
 	/* LOCK THIS CODE REGION */
-	SYS_MutexLock(rContext->mMutex);
+	(void)SYS_MutexLock(rContext->mMutex);
 
 #ifndef PCSCLITE_STATIC_DRIVER
 	if (rContext->dwVersion == IFD_HVERSION_1_0)
 	{
 		ucValue[0] = rContext->dwSlot;
-		IFDSetCapabilities(rContext, TAG_IFD_SLOTNUM, 1, ucValue);
+		(void)IFDSetCapabilities(rContext, TAG_IFD_SLOTNUM, 1, ucValue);
 		rv = (*IFD_power_icc) (dwAction);
 	}
 	else
@@ -371,7 +371,7 @@
 	if (rContext->dwVersion == IFD_HVERSION_1_0)
 	{
 		ucValue[0] = rContext->dwSlot;
-		IFDSetCapabilities(rContext, TAG_IFD_SLOTNUM, 1, ucValue);
+		(void)IFDSetCapabilities(rContext, TAG_IFD_SLOTNUM, 1, ucValue);
 		rv = IFD_Power_ICC(dwAction);
 	}
 	else
@@ -379,7 +379,7 @@
 #endif
 
 	/* END OF LOCKED REGION */
-	SYS_MutexUnLock(rContext->mMutex);
+	(void)SYS_MutexUnLock(rContext->mMutex);
 
 	/* use clean values in case of error */
 	if (rv != IFD_SUCCESS)
@@ -389,7 +389,7 @@
 
 		if (rv == IFD_NO_SUCH_DEVICE)
 		{
-			SendHotplugSignal();
+			(void)SendHotplugSignal();
 			return SCARD_E_READER_UNAVAILABLE;
 		}
 
@@ -400,7 +400,7 @@
 	 * Get the ATR and it's length
 	 */
 	if (rContext->dwVersion == IFD_HVERSION_1_0)
-		IFDStatusICC(rContext, &dwStatus, pucAtr, pdwAtrLen);
+		(void)IFDStatusICC(rContext, &dwStatus, pucAtr, pdwAtrLen);
 
 	return rv;
 }
@@ -434,13 +434,13 @@
 #endif
 
 	/* LOCK THIS CODE REGION */ 
-	SYS_MutexLock(rContext->mMutex);
+	(void)SYS_MutexLock(rContext->mMutex);
 
 #ifndef PCSCLITE_STATIC_DRIVER
 	if (rContext->dwVersion == IFD_HVERSION_1_0)
 	{
 		ucValue[0] = rContext->dwSlot;
-		IFDSetCapabilities(rContext, TAG_IFD_SLOTNUM, 1, ucValue);
+		(void)IFDSetCapabilities(rContext, TAG_IFD_SLOTNUM, 1, ucValue);
 		rv = (*IFD_is_icc_present) ();
 	}
 	else
@@ -449,7 +449,7 @@
 	if (rContext->dwVersion == IFD_HVERSION_1_0)
 	{
 		ucValue[0] = rContext->dwSlot;
-		IFDSetCapabilities(rContext, TAG_IFD_SLOTNUM, 1, ucValue);
+		(void)IFDSetCapabilities(rContext, TAG_IFD_SLOTNUM, 1, ucValue);
 		rv = IFD_Is_ICC_Present();
 	}
 	else
@@ -457,7 +457,7 @@
 #endif
 
 	/* END OF LOCKED REGION */
-	SYS_MutexUnLock(rContext->mMutex);
+	(void)SYS_MutexUnLock(rContext->mMutex);
 
 	if (rv == IFD_SUCCESS || rv == IFD_ICC_PRESENT)
 		dwCardStatus |= SCARD_PRESENT;
@@ -471,7 +471,7 @@
 
 			if (rv == IFD_NO_SUCH_DEVICE)
 			{
-				SendHotplugSignal();
+				(void)SendHotplugSignal();
 				return SCARD_E_READER_UNAVAILABLE;
 			}
 
@@ -493,10 +493,10 @@
 			dwTag = TAG_IFD_ATR;
 
 			/* LOCK THIS CODE REGION */ 
-			SYS_MutexLock(rContext->mMutex);
+			(void)SYS_MutexLock(rContext->mMutex);
 
 			ucValue[0] = rContext->dwSlot;
-			IFDSetCapabilities(rContext, TAG_IFD_SLOTNUM, 1, ucValue);
+			(void)IFDSetCapabilities(rContext, TAG_IFD_SLOTNUM, 1, ucValue);
 
 #ifndef PCSCLITE_STATIC_DRIVER
 			rv = (*IFD_get_capabilities) (dwTag, pucAtr);
@@ -505,7 +505,7 @@
 #endif
 
 			/* END OF LOCKED REGION */
-			SYS_MutexUnLock(rContext->mMutex);
+			(void)SYS_MutexUnLock(rContext->mMutex);
 
 			/*
 			 * FIX :: This is a temporary way to return the correct size
@@ -566,7 +566,7 @@
 #endif
 
 	/* LOCK THIS CODE REGION */
-	SYS_MutexLock(rContext->mMutex);
+	(void)SYS_MutexLock(rContext->mMutex);
 
 #ifndef PCSCLITE_STATIC_DRIVER
 	rv = (*IFDH_control_v2) (rContext->dwSlot, TxBuffer, TxLength,
@@ -577,7 +577,7 @@
 #endif
 
 	/* END OF LOCKED REGION */
-	SYS_MutexUnLock(rContext->mMutex);
+	(void)SYS_MutexUnLock(rContext->mMutex);
 
 	if (rv == IFD_SUCCESS)
 		return SCARD_S_SUCCESS;
@@ -615,7 +615,7 @@
 #endif
 
 	/* LOCK THIS CODE REGION */ 
-	SYS_MutexLock(rContext->mMutex);
+	(void)SYS_MutexLock(rContext->mMutex);
 
 #ifndef PCSCLITE_STATIC_DRIVER
 	rv = (*IFDH_control) (rContext->dwSlot, ControlCode, TxBuffer,
@@ -626,7 +626,7 @@
 #endif
 
 	/* END OF LOCKED REGION */
-	SYS_MutexUnLock(rContext->mMutex);
+	(void)SYS_MutexUnLock(rContext->mMutex);
 
 	if (rv == IFD_SUCCESS)
 		return SCARD_S_SUCCESS;
@@ -636,7 +636,7 @@
 
 		if (rv == IFD_NO_SUCH_DEVICE)
 		{
-			SendHotplugSignal();
+			(void)SendHotplugSignal();
 			return SCARD_E_READER_UNAVAILABLE;
 		}
 
@@ -674,13 +674,13 @@
 #endif
 
 	/* LOCK THIS CODE REGION */ 
-	SYS_MutexLock(rContext->mMutex);
+	(void)SYS_MutexLock(rContext->mMutex);
 
 #ifndef PCSCLITE_STATIC_DRIVER
 	if (rContext->dwVersion == IFD_HVERSION_1_0)
 	{
 		ucValue[0] = rContext->dwSlot;
-		IFDSetCapabilities(rContext, TAG_IFD_SLOTNUM, 1, ucValue);
+		(void)IFDSetCapabilities(rContext, TAG_IFD_SLOTNUM, 1, ucValue);
 		rv = (*IFD_transmit_to_icc) (pioTxPci, (LPBYTE) pucTxBuffer,
 			dwTxLength, pucRxBuffer, pdwRxLength, pioRxPci);
 	}
@@ -692,7 +692,7 @@
 	if (rContext->dwVersion == IFD_HVERSION_1_0)
 	{
 		ucValue[0] = rContext->dwSlot;
-		IFDSetCapabilities(rContext, TAG_IFD_SLOTNUM, 1, ucValue);
+		(void)IFDSetCapabilities(rContext, TAG_IFD_SLOTNUM, 1, ucValue);
 		rv = IFD_Transmit_to_ICC(pioTxPci, (LPBYTE) pucTxBuffer,
 			dwTxLength, pucRxBuffer, pdwRxLength, pioRxPci);
 	}
@@ -703,7 +703,7 @@
 #endif
 
 	/* END OF LOCKED REGION */
-	SYS_MutexUnLock(rContext->mMutex);
+	(void)SYS_MutexUnLock(rContext->mMutex);
 
 	/* log the returned status word */
 	DebugLogCategory(DEBUG_CATEGORY_SW, pucRxBuffer, *pdwRxLength);
@@ -716,7 +716,7 @@
 
 		if (rv == IFD_NO_SUCH_DEVICE)
 		{
-			SendHotplugSignal();
+			(void)SendHotplugSignal();
 			return SCARD_E_READER_UNAVAILABLE;
 		}
 

Modified: trunk/PCSC/src/readerfactory.c
URL: http://svn.debian.org/wsvn/pcsclite/trunk/PCSC/src/readerfactory.c?rev=3247&op=diff
==============================================================================
--- trunk/PCSC/src/readerfactory.c (original)
+++ trunk/PCSC/src/readerfactory.c Fri Jan  2 13:22:46 2009
@@ -160,9 +160,9 @@
 	if (parentNode < -1)
 		return SCARD_E_NO_MEMORY;
 
-	strlcpy((sReadersContexts[dwContext])->lpcLibrary, lpcLibrary,
+	(void)strlcpy((sReadersContexts[dwContext])->lpcLibrary, lpcLibrary,
 		sizeof((sReadersContexts[dwContext])->lpcLibrary));
-	strlcpy((sReadersContexts[dwContext])->lpcDevice, lpcDevice,
+	(void)strlcpy((sReadersContexts[dwContext])->lpcDevice, lpcDevice,
 		sizeof((sReadersContexts[dwContext])->lpcDevice));
 	(sReadersContexts[dwContext])->dwVersion = 0;
 	(sReadersContexts[dwContext])->dwPort = dwPort;
@@ -230,7 +230,7 @@
 	{
 		(sReadersContexts[dwContext])->mMutex =
 			malloc(sizeof(PCSCLITE_MUTEX));
-		SYS_MutexInit((sReadersContexts[dwContext])->mMutex);
+		(void)SYS_MutexInit((sReadersContexts[dwContext])->mMutex);
 	}
 
 	if ((sReadersContexts[dwContext])->pdwMutex == NULL)
@@ -247,7 +247,7 @@
 	{
 		/* Cannot connect to reader. Exit gracefully */
 		Log2(PCSC_LOG_ERROR, "%s init failed.", lpcReader);
-		RFRemoveReader(lpcReader, dwPort);
+		(void)RFRemoveReader(lpcReader, dwPort);
 		return rv;
 	}
 
@@ -273,7 +273,7 @@
 		if (rv != SCARD_S_SUCCESS)
 		{
 			Log2(PCSC_LOG_ERROR, "%s init failed.", lpcReader);
-			RFRemoveReader(lpcReader, dwPort);
+			(void)RFRemoveReader(lpcReader, dwPort);
 			return rv;
 		}
 	}
@@ -340,13 +340,13 @@
 		 * Copy the previous reader name and increment the slot number
 		 */
 		tmpReader = sReadersContexts[dwContextB]->lpcReader;
-		strlcpy(tmpReader, sReadersContexts[dwContext]->lpcReader,
+		(void)strlcpy(tmpReader, sReadersContexts[dwContext]->lpcReader,
 			sizeof(sReadersContexts[dwContextB]->lpcReader));
 		sprintf(tmpReader + strlen(tmpReader) - 2, "%02X", j);
 
-		strlcpy((sReadersContexts[dwContextB])->lpcLibrary, lpcLibrary,
+		(void)strlcpy((sReadersContexts[dwContextB])->lpcLibrary, lpcLibrary,
 			sizeof((sReadersContexts[dwContextB])->lpcLibrary));
-		strlcpy((sReadersContexts[dwContextB])->lpcDevice, lpcDevice,
+		(void)strlcpy((sReadersContexts[dwContextB])->lpcDevice, lpcDevice,
 			sizeof((sReadersContexts[dwContextB])->lpcDevice));
 		(sReadersContexts[dwContextB])->dwVersion =
 		  (sReadersContexts[dwContext])->dwVersion;
@@ -395,7 +395,7 @@
 		{
 			(sReadersContexts[dwContextB])->mMutex =
 				malloc(sizeof(PCSCLITE_MUTEX));
-			SYS_MutexInit((sReadersContexts[dwContextB])->mMutex);
+			(void)SYS_MutexInit((sReadersContexts[dwContextB])->mMutex);
 
 			(sReadersContexts[dwContextB])->pdwMutex = malloc(sizeof(DWORD));
 			*(sReadersContexts[dwContextB])->pdwMutex = 1;
@@ -409,7 +409,7 @@
 		if (rv != SCARD_S_SUCCESS)
 		{
 			/* Cannot connect to slot. Exit gracefully */
-			RFRemoveReader(lpcReader, dwPort);
+			(void)RFRemoveReader(lpcReader, dwPort);
 			return rv;
 		}
 
@@ -430,7 +430,7 @@
 		if (rv != SCARD_S_SUCCESS)
 		{
 			Log2(PCSC_LOG_ERROR, "%s init failed.", lpcReader);
-			RFRemoveReader(lpcReader, dwPort);
+			(void)RFRemoveReader(lpcReader, dwPort);
 			return rv;
 		}
 	}
@@ -472,7 +472,7 @@
 
 		if (*sContext->pdwMutex == 1)
 		{
-			SYS_MutexDestroy(sContext->mMutex);
+			(void)SYS_MutexDestroy(sContext->mMutex);
 			free(sContext->mMutex);
 		}
 
@@ -872,7 +872,7 @@
 		Log1(PCSC_LOG_CRITICAL, "IFDHandler functions missing: " #function ); \
 		exit(1); )
 
-		DYN_GetAddress(rContext->vHandle, &f, "IO_Create_Channel");
+		(void)DYN_GetAddress(rContext->vHandle, &f, "IO_Create_Channel");
 		rContext->psFunctions.psFunctions_v1.pvfCreateChannel = f;
 
 		if (SCARD_S_SUCCESS != DYN_GetAddress(rContext->vHandle, &f,
@@ -992,7 +992,7 @@
 	if (*rContext->pdwFeeds == 1)
 	{
 		Log1(PCSC_LOG_INFO, "Unloading reader driver.");
-		DYN_CloseLibrary(&rContext->vHandle);
+		(void)DYN_CloseLibrary(&rContext->vHandle);
 	}
 
 	rContext->vHandle = NULL;
@@ -1021,7 +1021,7 @@
 {
 	PREADER_CONTEXT rContext = NULL;
 
-	RFReaderInfoById(hCard, &rContext);
+	(void)RFReaderInfoById(hCard, &rContext);
 
 	if (RFCheckSharing(hCard) == SCARD_S_SUCCESS)
 	{
@@ -1103,7 +1103,7 @@
 	if (rv != SCARD_S_SUCCESS)
 	{
 		Log2(PCSC_LOG_ERROR, "RFBindFunctions failed: %X", rv);
-		RFUnloadReader(rContext);
+		(void)RFUnloadReader(rContext);
 		return rv;
 	}
 
@@ -1119,8 +1119,8 @@
 	{
 		Log3(PCSC_LOG_CRITICAL, "Open Port %X Failed (%s)",
 			rContext->dwPort, rContext->lpcDevice);
-		RFUnBindFunctions(rContext);
-		RFUnloadReader(rContext);
+		(void)RFUnBindFunctions(rContext);
+		(void)RFUnloadReader(rContext);
 		return SCARD_E_INVALID_TARGET;
 	}
 
@@ -1142,9 +1142,9 @@
 	 *
 	 * IFDPowerICC( rContext, IFD_POWER_DOWN, Atr, &AtrLen );
 	 */
-	IFDCloseIFD(rContext);
-	RFUnBindFunctions(rContext);
-	RFUnloadReader(rContext);
+	(void)IFDCloseIFD(rContext);
+	(void)RFUnBindFunctions(rContext);
+	(void)RFUnloadReader(rContext);
 
 	return SCARD_S_SUCCESS;
 }
@@ -1396,7 +1396,8 @@
 	{
 		int j;
 
-		RFAddReader(reader_list[i].pcFriendlyname, reader_list[i].dwChannelId,
+		(void)RFAddReader(reader_list[i].pcFriendlyname,
+			reader_list[i].dwChannelId,
 			reader_list[i].pcLibpath, reader_list[i].pcDevicename);
 
 		/* update the ConfigFileCRC (this false "CRC" is very weak) */
@@ -1422,7 +1423,7 @@
 	SerialReader *reader_list;
 	int i, crc;
 
-	DBGetReaderList(ConfigFile, &reader_list);
+	(void)DBGetReaderList(ConfigFile, &reader_list);
 
 	/* the list is empty */
 	if (NULL == reader_list)
@@ -1488,7 +1489,7 @@
 					{
 						Log2(PCSC_LOG_INFO, "Reader %s disappeared",
 							reader_list[i].pcFriendlyname);
-						RFRemoveReader(reader_list[i].pcFriendlyname,
+						(void)RFRemoveReader(reader_list[i].pcFriendlyname,
 							reader_list[r].dwChannelId);
 					}
 				}
@@ -1498,7 +1499,7 @@
 		/* the reader was not present */
 		if (!present)
 			/* we try to add it */
-			RFAddReader(reader_list[i].pcFriendlyname,
+			(void)RFAddReader(reader_list[i].pcFriendlyname,
 				reader_list[i].dwChannelId, reader_list[i].pcLibpath,
 				reader_list[i].pcDevicename);
 
@@ -1518,8 +1519,8 @@
 	{
 		if ((sReadersContexts[i])->vHandle != 0)
 		{
-			EHDestroyEventHandler(sReadersContexts[i]);
-			IFDCloseIFD(sReadersContexts[i]);
+			(void)EHDestroyEventHandler(sReadersContexts[i]);
+			(void)IFDCloseIFD(sReadersContexts[i]);
 		}
 	}
 
@@ -1562,9 +1563,9 @@
 			}
 
 
-			EHSpawnEventHandler(sReadersContexts[i], NULL);
-			RFSetReaderEventState(sReadersContexts[i], SCARD_RESET);
-		}
-	}
-}
-
+			(void)EHSpawnEventHandler(sReadersContexts[i], NULL);
+			(void)RFSetReaderEventState(sReadersContexts[i], SCARD_RESET);
+		}
+	}
+}
+

Modified: trunk/PCSC/src/sys_unix.c
URL: http://svn.debian.org/wsvn/pcsclite/trunk/PCSC/src/sys_unix.c?rev=3247&op=diff
==============================================================================
--- trunk/PCSC/src/sys_unix.c (original)
+++ trunk/PCSC/src/sys_unix.c Fri Jan  2 13:22:46 2009
@@ -274,7 +274,7 @@
  */
 INTERNAL void SYS_PublicMemoryUnmap(void * ptr, int iSize)
 {
-	munmap(ptr, iSize);
+	(void)munmap(ptr, iSize);
 }
 
 /**

Modified: trunk/PCSC/src/testpcsc.c
URL: http://svn.debian.org/wsvn/pcsclite/trunk/PCSC/src/testpcsc.c?rev=3247&op=diff
==============================================================================
--- trunk/PCSC/src/testpcsc.c (original)
+++ trunk/PCSC/src/testpcsc.c Fri Jan  2 13:22:46 2009
@@ -45,12 +45,12 @@
 		else
 		{
 			printf(RED "%s\n" NORMAL, pcsc_stringify_error(rv));
-			SCardReleaseContext(hContext);
+			(void)SCardReleaseContext(hContext);
 			exit(-1);
 		}
 	}
 	else
-		puts(pcsc_stringify_error(rv));
+		(void)puts(pcsc_stringify_error(rv));
 }
 
 int main(int argc, char **argv)
@@ -141,7 +141,7 @@
 	{
 		printf("Testing SCardGetStatusChange \n");
 		printf("Please insert a working reader\t: ");
-		fflush(stdout);
+		(void)fflush(stdout);
 		rgReaderStates[0].szReader = "\\\\?PnP?\\Notification";
 		rgReaderStates[0].dwCurrentState = SCARD_STATE_EMPTY;
 
@@ -181,8 +181,8 @@
 			char input[80];
 
 			printf("Enter the reader number\t\t: ");
-			fgets(input, sizeof(input), stdin);
-			sscanf(input, "%d", &iReader);
+			(void)fgets(input, sizeof(input), stdin);
+			(void)sscanf(input, "%d", &iReader);
 
 			if (iReader > p || iReader <= 0)
 				printf("Invalid Value - try again\n");
@@ -195,7 +195,7 @@
 	rgReaderStates[0].dwCurrentState = SCARD_STATE_EMPTY;
 
 	printf("Waiting for card insertion\t: ");
-	fflush(stdout);
+	(void)fflush(stdout);
 	rv = SCardGetStatusChange(hContext, INFINITE, rgReaderStates, 1);
 	test_rv(rv, hContext, PANIC);
 	if (rgReaderStates[0].dwEventState & SCARD_STATE_UNKNOWN)
@@ -378,12 +378,12 @@
 
 	if (rv != SCARD_S_SUCCESS)
 	{
-		SCardDisconnect(hCard, SCARD_RESET_CARD);
-		SCardReleaseContext(hContext);
+		(void)SCardDisconnect(hCard, SCARD_RESET_CARD);
+		(void)SCardReleaseContext(hContext);
 	}
 
 	printf("Press enter: ");
-	getchar();
+	(void)getchar();
 	printf("Testing SCardReconnect\t\t: ");
 	rv = SCardReconnect(hCard, SCARD_SHARE_SHARED,
 		SCARD_PROTOCOL_T0 | SCARD_PROTOCOL_T1, SCARD_UNPOWER_CARD, &dwPref);

Modified: trunk/PCSC/src/thread_unix.c
URL: http://svn.debian.org/wsvn/pcsclite/trunk/PCSC/src/thread_unix.c?rev=3247&op=diff
==============================================================================
--- trunk/PCSC/src/thread_unix.c (original)
+++ trunk/PCSC/src/thread_unix.c Fri Jan  2 13:22:46 2009
@@ -74,7 +74,7 @@
 		attributes & THREAD_ATTR_DETACHED ? PTHREAD_CREATE_DETACHED : PTHREAD_CREATE_JOINABLE);
 	if (ret)
 	{
-		pthread_attr_destroy(&attr);
+		(void)pthread_attr_destroy(&attr);
 		return ret;
 	}
 

Modified: trunk/PCSC/src/tokenparser.l
URL: http://svn.debian.org/wsvn/pcsclite/trunk/PCSC/src/tokenparser.l?rev=3247&op=diff
==============================================================================
--- trunk/PCSC/src/tokenparser.l (original)
+++ trunk/PCSC/src/tokenparser.l Fri Jan  2 13:22:46 2009
@@ -71,9 +71,9 @@
 		len++;	/* final NULL byte */
 
 		if (len > sizeof(pcKey))
-			strlcpy(pcKey, &pcToken[5], sizeof(pcKey));
+			(void)strlcpy(pcKey, &pcToken[5], sizeof(pcKey));
 		else
-			strlcpy(pcKey, &pcToken[5], len);
+			(void)strlcpy(pcKey, &pcToken[5], len);
 	}
 
 	if (tokType == TOKEN_TYPE_STRING)
@@ -87,13 +87,13 @@
 		len++;	/* final NULL byte */
 
 		if (len > sizeof(pcValue))
-			strlcpy(pcValue, &pcToken[8], sizeof(pcValue));
+			(void)strlcpy(pcValue, &pcToken[8], sizeof(pcValue));
 		else
-			strlcpy(pcValue, &pcToken[8], len);
+			(void)strlcpy(pcValue, &pcToken[8], len);
 
 		if (strcmp(pcKey, pcDesiredKey) == 0)
 			if (desiredIndex == valueIndex)
-				strlcpy(pcFinValue, pcValue, sizeof(pcFinValue));
+				(void)strlcpy(pcFinValue, pcValue, sizeof(pcFinValue));
 	}
 }
 
@@ -135,7 +135,7 @@
 
 	do
 	{
-		yylex();
+		(void)yylex();
 	} while (!feof(file));
 
 	if (pcFinValue[0] == 0)
@@ -149,9 +149,9 @@
 		ret = -1;
 	}
 	else
-		strlcpy(tokenValue, pcFinValue, TOKEN_MAX_VALUE_SIZE);
+		(void)strlcpy(tokenValue, pcFinValue, TOKEN_MAX_VALUE_SIZE);
 
-	fclose(file);
+	(void)fclose(file);
 	return ret;
 }
 

Modified: trunk/PCSC/src/utils.c
URL: http://svn.debian.org/wsvn/pcsclite/trunk/PCSC/src/utils.c?rev=3247&op=diff
==============================================================================
--- trunk/PCSC/src/utils.c (original)
+++ trunk/PCSC/src/utils.c Fri Jan  2 13:22:46 2009
@@ -40,8 +40,8 @@
 	{
 		char pid_ascii[PID_ASCII_SIZE];
 
-		fgets(pid_ascii, PID_ASCII_SIZE, f);
-		fclose(f);
+		(void)fgets(pid_ascii, PID_ASCII_SIZE, f);
+		(void)fclose(f);
 
 		pid = atoi(pid_ascii);
 	}
@@ -70,7 +70,7 @@
 				pid, strerror(errno));
 			return EXIT_FAILURE ;
 		}
-		SYS_Sleep(1);
+		(void)SYS_Sleep(1);
 	}
 
 	return EXIT_SUCCESS;
@@ -90,7 +90,7 @@
 	struct dirent *dir;
 
 	if (readerState)
-		SYS_MMapSynchronize((void *)readerState, SYS_GetPageSize() );
+		(void)SYS_MMapSynchronize((void *)readerState, SYS_GetPageSize() );
 
 	dir_fd = opendir(PCSCLITE_EVENTS_DIR);
 	if (NULL == dir_fd)
@@ -110,7 +110,7 @@
 		if ('.' == dir->d_name[0])
 			continue;
 
-		snprintf(filename, sizeof(filename), "%s/%s", PCSCLITE_EVENTS_DIR,
+		(void)snprintf(filename, sizeof(filename), "%s/%s", PCSCLITE_EVENTS_DIR,
 			dir->d_name);
 		Log2(PCSC_LOG_DEBUG, "status file: %s", filename);
 
@@ -135,17 +135,17 @@
 				if (!(fstat_buf.st_mode & S_IFIFO))
 					Log2(PCSC_LOG_ERROR, "%s is not a fifo", filename);
 				else
-					SYS_WriteFile(fd, buf, sizeof(buf));
+					(void)SYS_WriteFile(fd, buf, sizeof(buf));
 			}
 
-			SYS_CloseFile(fd);
+			(void)SYS_CloseFile(fd);
 		}
 
 		if (unlink(filename))
 			Log3(PCSC_LOG_ERROR, "Can't remove %s: %s", filename,
 			strerror(errno));
 	}
-	closedir(dir_fd);
+	(void)closedir(dir_fd);
 
 	return 0;
 } /* StatSynchronize */

Modified: trunk/PCSC/src/utils/formaticc.c
URL: http://svn.debian.org/wsvn/pcsclite/trunk/PCSC/src/utils/formaticc.c?rev=3247&op=diff
==============================================================================
--- trunk/PCSC/src/utils/formaticc.c (original)
+++ trunk/PCSC/src/utils/formaticc.c Fri Jan  2 13:22:46 2009
@@ -49,26 +49,26 @@
 	printf("\nWinscard PC/SC Lite Test Program\n\n");
 
 	printf("Please enter the desired host (localhost for this machine) [localhost]: ");
-	fgets(line, sizeof(line), stdin);
+	(void)fgets(line, sizeof(line), stdin);
 	if (line[0] == '\n')
 		strncpy(pcHost, "localhost", sizeof(pcHost)-1);
 	else
 		strncpy(pcHost, line, sizeof(pcHost)-1);
 
 	printf("Please input the desired transmit protocol (0/1) [0]: ");
-	fgets(line, sizeof(line), stdin);
+	(void)fgets(line, sizeof(line), stdin);
 	if (line[0] == '\n')
 		iProtocol = 0;
 	else
-		sscanf(line, "%d", &iProtocol);
+		(void)sscanf(line, "%d", &iProtocol);
 
 	printf("Please input the desired input apdu file: ");
-	fgets(line, sizeof(line), stdin);
-	sscanf(line, "%s", pcAFile);
+	(void)fgets(line, sizeof(line), stdin);
+	(void)sscanf(line, "%s", pcAFile);
 
 	printf("Please input the desired output apdu file: ");
-	fgets(line, sizeof(line), stdin);
-	sscanf(line, "%s", pcOFile);
+	(void)fgets(line, sizeof(line), stdin);
+	(void)sscanf(line, "%s", pcOFile);
 
 	fp = fopen(pcAFile, "r");
 	if (fp == NULL)
@@ -93,9 +93,9 @@
 	}
 
 	mszGroups = NULL;
-	SCardListReaders(hContext, mszGroups, NULL, &dwReaders);
+	(void)SCardListReaders(hContext, mszGroups, NULL, &dwReaders);
 	mszReaders = (char *) malloc(sizeof(char) * dwReaders);
-	SCardListReaders(hContext, mszGroups, mszReaders, &dwReaders);
+	(void)SCardListReaders(hContext, mszGroups, mszReaders, &dwReaders);
 
 	/*
 	 * Have to understand the multi-string here
@@ -112,8 +112,8 @@
 	do
 	{
 		printf("Enter the desired reader number: ");
-		fgets(line, sizeof(line), stdin);
-		sscanf(line, "%d", &iReader);
+		(void)fgets(line, sizeof(line), stdin);
+		(void)sscanf(line, "%d", &iReader);
 		printf("\n");
 
 		if (iReader > p || iReader <= 0)
@@ -127,14 +127,14 @@
 	rgReaderStates[0].dwCurrentState = SCARD_STATE_EMPTY;
 
 	printf("Please insert a smart card\n");
-	SCardGetStatusChange(hContext, INFINITE, rgReaderStates, 1);
+	(void)SCardGetStatusChange(hContext, INFINITE, rgReaderStates, 1);
 	rv = SCardConnect(hContext, &mszReaders[iList[iReader]],
 		SCARD_SHARE_SHARED, SCARD_PROTOCOL_T0 | SCARD_PROTOCOL_T1,
 		&hCard, &dwPref);
 
 	if (rv != SCARD_S_SUCCESS)
 	{
-		SCardReleaseContext(hContext);
+		(void)SCardReleaseContext(hContext);
 		printf("Error connecting to reader %ld\n", rv);
 		return 1;
 	}
@@ -143,7 +143,7 @@
 	 * Now lets get some work done
 	 */
 
-	SCardBeginTransaction(hCard);
+	(void)SCardBeginTransaction(hCard);
 
 	cnum = 0;
 
@@ -169,8 +169,8 @@
 			if (sscanf(line_ptr, "%x", &x) == 0)
 			{
 				printf("Corrupt APDU: %s\n", line);
-				SCardDisconnect(hCard, SCARD_RESET_CARD);
-				SCardReleaseContext(hContext);
+				(void)SCardDisconnect(hCard, SCARD_RESET_CARD);
+				(void)SCardReleaseContext(hContext);
 				return 1;
 			}
 			s[i] = x;
@@ -204,8 +204,8 @@
 			else
 			{
 				printf("Invalid Protocol\n");
-				SCardDisconnect(hCard, SCARD_RESET_CARD);
-				SCardReleaseContext(hContext);
+				(void)SCardDisconnect(hCard, SCARD_RESET_CARD);
+				(void)SCardReleaseContext(hContext);
 				return 1;
 			}
 		}
@@ -224,7 +224,7 @@
 
 		if (rv == SCARD_W_RESET_CARD)
 		{
-			SCardReconnect(hCard, SCARD_SHARE_SHARED,
+			(void)SCardReconnect(hCard, SCARD_SHARE_SHARED,
 				SCARD_PROTOCOL_T0 | SCARD_PROTOCOL_T1,
 				SCARD_RESET_CARD, &dwPref);
 		}
@@ -232,9 +232,9 @@
 	}
 	while (1);
 
-	SCardEndTransaction(hCard, SCARD_LEAVE_CARD);
-	SCardDisconnect(hCard, SCARD_UNPOWER_CARD);
-	SCardReleaseContext(hContext);
+	(void)SCardEndTransaction(hCard, SCARD_LEAVE_CARD);
+	(void)SCardDisconnect(hCard, SCARD_UNPOWER_CARD);
+	(void)SCardReleaseContext(hContext);
 
 	return 0;
 }

Modified: trunk/PCSC/src/utils/installifd.c
URL: http://svn.debian.org/wsvn/pcsclite/trunk/PCSC/src/utils/installifd.c?rev=3247&op=diff
==============================================================================
--- trunk/PCSC/src/utils/installifd.c (original)
+++ trunk/PCSC/src/utils/installifd.c Fri Jan  2 13:22:46 2009
@@ -42,7 +42,7 @@
 		(int)sizeof(lpcReader));
 	printf("-----> ");
 
-	fgets(lpcReader, sizeof(lpcReader), stdin);
+	(void)fgets(lpcReader, sizeof(lpcReader), stdin);
 
 	/* remove trailing \n */
 	lpcReader[strlen(lpcReader)-1] = '\0';
@@ -54,7 +54,7 @@
 	printf("Example: %s/librdr_generic.so\n", PCSCLITE_HP_DROPDIR);
 	printf("-----> ");
 
-	fgets(lpcLibrary, sizeof(lpcLibrary), stdin);
+	(void)fgets(lpcLibrary, sizeof(lpcLibrary), stdin);
 
 	/* remove trailing \n */
 	lpcLibrary[strlen(lpcLibrary)-1] = '\0';
@@ -89,7 +89,7 @@
 	{
 		printf("Invalid input (%d) please choose (1-5)\n", iPort);
 		/* eat the \n */
-		getchar();
+		(void)getchar();
 		goto retryport;
 	}
 

Modified: trunk/PCSC/src/winscard.c
URL: http://svn.debian.org/wsvn/pcsclite/trunk/PCSC/src/winscard.c?rev=3247&op=diff
==============================================================================
--- trunk/PCSC/src/winscard.c (original)
+++ trunk/PCSC/src/winscard.c Fri Jan  2 13:22:46 2009
@@ -333,7 +333,7 @@
 	{
 		Log1(PCSC_LOG_INFO, "Waiting for release of lock");
 		while (rContext->dwLockId != 0)
-			SYS_USleep(PCSCLITE_LOCK_POLL_RATE);
+			(void)SYS_USleep(PCSCLITE_LOCK_POLL_RATE);
 		Log1(PCSC_LOG_INFO, "Lock released");
 	}
 
@@ -379,7 +379,7 @@
 		{
 			/* lock here instead in IFDSetPTS() to lock up to
 			 * setting rContext->readerState->cardProtocol */
-			SYS_MutexLock(rContext->mMutex);
+			(void)SYS_MutexLock(rContext->mMutex);
 
 			/* the protocol is not yet set (no PPS yet) */
 			if (SCARD_PROTOCOL_UNDEFINED == rContext->readerState->cardProtocol)
@@ -405,24 +405,24 @@
 				/* keep cardProtocol = SCARD_PROTOCOL_UNDEFINED in case of error  */
 				if (SET_PROTOCOL_PPS_FAILED == ret)
 				{
-					SYS_MutexUnLock(rContext->mMutex);
+					(void)SYS_MutexUnLock(rContext->mMutex);
 					return SCARD_W_UNRESPONSIVE_CARD;
 				}
 
 				if (SET_PROTOCOL_WRONG_ARGUMENT == ret)
 				{
-					SYS_MutexUnLock(rContext->mMutex);
+					(void)SYS_MutexUnLock(rContext->mMutex);
 					return SCARD_E_PROTO_MISMATCH;
 				}
 
 				/* use negociated protocol */
 				rContext->readerState->cardProtocol = ret;
 
-				SYS_MutexUnLock(rContext->mMutex);
+				(void)SYS_MutexUnLock(rContext->mMutex);
 			}
 			else
 			{
-				SYS_MutexUnLock(rContext->mMutex);
+				(void)SYS_MutexUnLock(rContext->mMutex);
 
 				if (! (dwPreferredProtocols & rContext->readerState->cardProtocol))
 					return SCARD_E_PROTO_MISMATCH;
@@ -464,11 +464,11 @@
 		if (rContext->dwContexts == SCARD_NO_CONTEXT)
 		{
 			rContext->dwContexts = SCARD_EXCLUSIVE_CONTEXT;
-			RFLockSharing(*phCard);
-		}
-		else
-		{
-			RFDestroyReaderHandle(*phCard);
+			(void)RFLockSharing(*phCard);
+		}
+		else
+		{
+			(void)RFDestroyReaderHandle(*phCard);
 			*phCard = 0;
 			return SCARD_E_SHARING_VIOLATION;
 		}
@@ -491,7 +491,7 @@
 		/*
 		 * Clean up - there is no more room
 		 */
-		RFDestroyReaderHandle(*phCard);
+		(void)RFDestroyReaderHandle(*phCard);
 		if (rContext->dwContexts == SCARD_EXCLUSIVE_CONTEXT)
 			rContext->dwContexts = SCARD_NO_CONTEXT;
 		else
@@ -509,7 +509,7 @@
 	 * Propagate new state to Shared Memory
 	 */
 	rContext->readerState->readerSharing = rContext->dwContexts;
-	StatSynchronize(rContext->readerState);
+	(void)StatSynchronize(rContext->readerState);
 
 	PROFILE_END
 
@@ -632,7 +632,7 @@
 				/*
 				 * Notify the card has been reset
 				 */
-				RFSetReaderEventState(rContext, SCARD_RESET);
+				(void)RFSetReaderEventState(rContext, SCARD_RESET);
 
 				/*
 				 * Set up the status bit masks on dwStatus
@@ -672,7 +672,7 @@
 					UCHAR ucAtr[MAX_ATR_SIZE];
 
 					Log1(PCSC_LOG_ERROR, "Error resetting card.");
-					IFDStatusICC(rContext, &dwStatus, ucAtr, &dwAtrLen2);
+					(void)IFDStatusICC(rContext, &dwStatus, ucAtr, &dwAtrLen2);
 					if (dwStatus & SCARD_PRESENT)
 						return SCARD_W_UNRESPONSIVE_CARD;
 					else
@@ -709,7 +709,7 @@
 		{
 			/* lock here instead in IFDSetPTS() to lock up to
 			 * setting rContext->readerState->cardProtocol */
-			SYS_MutexLock(rContext->mMutex);
+			(void)SYS_MutexLock(rContext->mMutex);
 
 			/* the protocol is not yet set (no PPS yet) */
 			if (SCARD_PROTOCOL_UNDEFINED == rContext->readerState->cardProtocol)
@@ -733,24 +733,24 @@
 				/* keep cardProtocol = SCARD_PROTOCOL_UNDEFINED in case of error  */
 				if (SET_PROTOCOL_PPS_FAILED == ret)
 				{
-					SYS_MutexUnLock(rContext->mMutex);
+					(void)SYS_MutexUnLock(rContext->mMutex);
 					return SCARD_W_UNRESPONSIVE_CARD;
 				}
 
 				if (SET_PROTOCOL_WRONG_ARGUMENT == ret)
 				{
-					SYS_MutexUnLock(rContext->mMutex);
+					(void)SYS_MutexUnLock(rContext->mMutex);
 					return SCARD_E_PROTO_MISMATCH;
 				}
 
 				/* use negociated protocol */
 				rContext->readerState->cardProtocol = ret;
 
-				SYS_MutexUnLock(rContext->mMutex);
+				(void)SYS_MutexUnLock(rContext->mMutex);
 			}
 			else
 			{
-				SYS_MutexUnLock(rContext->mMutex);
+				(void)SYS_MutexUnLock(rContext->mMutex);
 
 				if (! (dwPreferredProtocols & rContext->readerState->cardProtocol))
 					return SCARD_E_PROTO_MISMATCH;
@@ -772,7 +772,7 @@
 			if (rContext->dwContexts == SCARD_LAST_CONTEXT)
 			{
 				rContext->dwContexts = SCARD_EXCLUSIVE_CONTEXT;
-				RFLockSharing(hCard);
+				(void)RFLockSharing(hCard);
 			} else
 			{
 				return SCARD_E_SHARING_VIOLATION;
@@ -790,7 +790,7 @@
 			/*
 			 * We are in exclusive mode but want to share now
 			 */
-			RFUnlockSharing(hCard);
+			(void)RFUnlockSharing(hCard);
 			rContext->dwContexts = SCARD_LAST_CONTEXT;
 		}
 	} else if (dwShareMode == SCARD_SHARE_DIRECT)
@@ -805,7 +805,7 @@
 			/*
 			 * We are in exclusive mode but want to share now
 			 */
-			RFUnlockSharing(hCard);
+			(void)RFUnlockSharing(hCard);
 			rContext->dwContexts = SCARD_LAST_CONTEXT;
 		}
 	} else
@@ -814,13 +814,13 @@
 	/*
 	 * Clear a previous event to the application
 	 */
-	RFClearReaderEventState(rContext, hCard);
+	(void)RFClearReaderEventState(rContext, hCard);
 
 	/*
 	 * Propagate new state to Shared Memory
 	 */
 	rContext->readerState->readerSharing = rContext->dwContexts;
-	StatSynchronize(rContext->readerState);
+	(void)StatSynchronize(rContext->readerState);
 
 	return SCARD_S_SUCCESS;
 }
@@ -856,7 +856,7 @@
 	{
 		Log1(PCSC_LOG_INFO, "Waiting for release of lock");
 		while (rContext->dwLockId != 0)
-			SYS_USleep(PCSCLITE_LOCK_POLL_RATE);
+			(void)SYS_USleep(PCSCLITE_LOCK_POLL_RATE);
 		Log1(PCSC_LOG_INFO, "Lock released");
 	}
 
@@ -901,7 +901,7 @@
 		/*
 		 * Notify the card has been reset
 		 */
-		RFSetReaderEventState(rContext, SCARD_RESET);
+		(void)RFSetReaderEventState(rContext, SCARD_RESET);
 
 		/*
 		 * Set up the status bit masks on dwStatus
@@ -980,8 +980,8 @@
 	/*
 	 * Remove and destroy this handle
 	 */
-	RFRemoveReaderHandle(rContext, hCard);
-	RFDestroyReaderHandle(hCard);
+	(void)RFRemoveReaderHandle(rContext, hCard);
+	(void)RFDestroyReaderHandle(hCard);
 
 	/*
 	 * For exclusive connection reset it to no connections
@@ -1003,7 +1003,7 @@
 	 * Propagate new state to Shared Memory
 	 */
 	rContext->readerState->readerSharing = rContext->dwContexts;
-	StatSynchronize(rContext->readerState);
+	(void)StatSynchronize(rContext->readerState);
 
 	return SCARD_S_SUCCESS;
 }
@@ -1046,7 +1046,7 @@
 	/* if the transaction is not yet ready we sleep a bit so the client
 	 * do not retry immediately */
 	if (SCARD_E_SHARING_VIOLATION == rv)
-		SYS_USleep(PCSCLITE_LOCK_POLL_RATE);
+		(void)SYS_USleep(PCSCLITE_LOCK_POLL_RATE);
 
 	Log2(PCSC_LOG_DEBUG, "Status: 0x%08X", rv);
 
@@ -1117,7 +1117,7 @@
 		/*
 		 * Notify the card has been reset
 		 */
-		RFSetReaderEventState(rContext, SCARD_RESET);
+		(void)RFSetReaderEventState(rContext, SCARD_RESET);
 
 		/*
 		 * Set up the status bit masks on dwStatus
@@ -1197,7 +1197,7 @@
 	/*
 	 * Unlock any blocks on this context
 	 */
-	RFUnlockSharing(hCard);
+	(void)RFUnlockSharing(hCard);
 
 	Log2(PCSC_LOG_DEBUG, "Status: 0x%08X", rv);
 

Modified: trunk/PCSC/src/winscard_clnt.c
URL: http://svn.debian.org/wsvn/pcsclite/trunk/PCSC/src/winscard_clnt.c?rev=3247&op=diff
==============================================================================
--- trunk/PCSC/src/winscard_clnt.c (original)
+++ trunk/PCSC/src/winscard_clnt.c Fri Jan  2 13:22:46 2009
@@ -314,10 +314,10 @@
 	if (rv != SCARD_S_SUCCESS)
 		return rv;
 
-	SCardLockThread();
+	(void)SCardLockThread();
 	rv = SCardEstablishContextTH(dwScope, pvReserved1,
 		pvReserved2, phContext);
-	SCardUnlockThread();
+	(void)SCardUnlockThread();
 
 	PROFILE_END(rv)
 
@@ -378,7 +378,7 @@
 		/*
 		 * Do any system initilization here
 		 */
-		SYS_Initialize();
+		(void)SYS_Initialize();
 
 		/*
 		 * Set up the memory mapped reader stats structures
@@ -394,7 +394,7 @@
 		/* close on exec so that child processes do not inherits the file
 		 * descriptor. The child process will call SCardEstablishContext()
 		 * if needed. */
-		fcntl(mapAddr, F_SETFD, FD_CLOEXEC);
+		(void)fcntl(mapAddr, F_SETFD, FD_CLOEXEC);
 
 		pageSize = SYS_GetPageSize();
 
@@ -410,7 +410,7 @@
 			{
 				Log2(PCSC_LOG_CRITICAL, "Cannot public memory map: %s",
 					strerror(errno));
-				SYS_CloseFile(mapAddr);	/* Close the memory map file */
+				(void)SYS_CloseFile(mapAddr);	/* Close the memory map file */
 				return SCARD_F_INTERNAL_ERROR;
 			}
 		}
@@ -460,7 +460,7 @@
 	/* Establishes a connection to the server */
 	if (SHMClientSetupSession(&dwClientID) != 0)
 	{
-		SYS_CloseFile(mapAddr);
+		(void)SYS_CloseFile(mapAddr);
 		return SCARD_E_NO_SERVICE;
 	}
 
@@ -583,14 +583,14 @@
 		/*
 		 * Remove the local context from the stack
 		 */
-		SCardLockThread();
-		SCardRemoveContext(hContext);
-		SCardUnlockThread();
+		(void)SCardLockThread();
+		(void)SCardRemoveContext(hContext);
+		(void)SCardUnlockThread();
 
 		return rv;
 	}
 
-	SYS_MutexLock(psContextMap[dwContextIndex].mMutex);
+	(void)SYS_MutexLock(psContextMap[dwContextIndex].mMutex);
 
 	/* check the context is still opened */
 	dwContextIndex = SCardGetContextIndice(hContext);
@@ -610,7 +610,7 @@
 
 	if (rv == -1)
 	{
-		SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
+		(void)SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
 		return SCARD_E_NO_SERVICE;
 	}
 
@@ -623,18 +623,18 @@
 
 	if (rv == -1)
 	{
-		SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
+		(void)SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
 		return SCARD_F_COMM_ERROR;
 	}
 
-	SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
+	(void)SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
 
 	/*
 	 * Remove the local context from the stack
 	 */
-	SCardLockThread();
-	SCardRemoveContext(hContext);
-	SCardUnlockThread();
+	(void)SCardLockThread();
+	(void)SCardRemoveContext(hContext);
+	(void)SCardUnlockThread();
 
 	PROFILE_END(scReleaseStruct.rv)
 
@@ -754,7 +754,7 @@
 	if (dwContextIndex == -1)
 		return SCARD_E_INVALID_HANDLE;
 
-	SYS_MutexLock(psContextMap[dwContextIndex].mMutex);
+	(void)SYS_MutexLock(psContextMap[dwContextIndex].mMutex);
 
 	/* check the context is still opened */
 	dwContextIndex = SCardGetContextIndice(hContext);
@@ -779,7 +779,7 @@
 
 	if (rv == -1)
 	{
-		SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
+		(void)SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
 		return SCARD_E_NO_SERVICE;
 	}
 
@@ -793,7 +793,7 @@
 
 	if (rv == -1)
 	{
-		SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
+		(void)SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
 		return SCARD_F_COMM_ERROR;
 	}
 
@@ -806,14 +806,14 @@
 		 * Keep track of the handle locally
 		 */
 		rv = SCardAddHandle(*phCard, dwContextIndex, szReader);
-		SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
+		(void)SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
 
 		PROFILE_END(rv)
 
 		return rv;
 	}
 
-	SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
+	(void)SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
 
 	PROFILE_END(scConnectStruct.rv)
 
@@ -913,7 +913,7 @@
 	if (rv == -1)
 		return SCARD_E_INVALID_HANDLE;
 
-	SYS_MutexLock(psContextMap[dwContextIndex].mMutex);
+	(void)SYS_MutexLock(psContextMap[dwContextIndex].mMutex);
 
 	/* check the handle is still valid */
 	rv = SCardGetIndicesFromHandle(hCard, &dwContextIndex, &dwChannelIndex);
@@ -934,7 +934,7 @@
 
 	if (i == PCSCLITE_MAX_READERS_CONTEXTS)
 	{
-		SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
+		(void)SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
 		return SCARD_E_READER_UNAVAILABLE;
 	}
 
@@ -953,7 +953,7 @@
 
 		if (rv == -1)
 		{
-			SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
+			(void)SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
 			return SCARD_E_NO_SERVICE;
 		}
 
@@ -967,14 +967,14 @@
 
 		if (rv == -1)
 		{
-			SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
+			(void)SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
 			return SCARD_F_COMM_ERROR;
 		}
 	} while (SCARD_E_SHARING_VIOLATION == scReconnectStruct.rv);
 
 	*pdwActiveProtocol = scReconnectStruct.pdwActiveProtocol;
 
-	SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
+	(void)SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
 
 	PROFILE_END(scReconnectStruct.rv)
 
@@ -1031,7 +1031,7 @@
 	if (rv == -1)
 		return SCARD_E_INVALID_HANDLE;
 
-	SYS_MutexLock(psContextMap[dwContextIndex].mMutex);
+	(void)SYS_MutexLock(psContextMap[dwContextIndex].mMutex);
 
 	/* check the handle is still valid */
 	rv = SCardGetIndicesFromHandle(hCard, &dwContextIndex, &dwChannelIndex);
@@ -1051,7 +1051,7 @@
 
 	if (rv == -1)
 	{
-		SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
+		(void)SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
 		return SCARD_E_NO_SERVICE;
 	}
 
@@ -1066,13 +1066,13 @@
 
 	if (rv == -1)
 	{
-		SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
+		(void)SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
 		return SCARD_F_COMM_ERROR;
 	}
 
-	SCardRemoveHandle(hCard);
-
-	SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
+	(void)SCardRemoveHandle(hCard);
+
+	(void)SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
 
 	PROFILE_END(scDisconnectStruct.rv)
 
@@ -1136,7 +1136,7 @@
 	if (rv == -1)
 		return SCARD_E_INVALID_HANDLE;
 
-	SYS_MutexLock(psContextMap[dwContextIndex].mMutex);
+	(void)SYS_MutexLock(psContextMap[dwContextIndex].mMutex);
 
 	/* check the handle is still valid */
 	rv = SCardGetIndicesFromHandle(hCard, &dwContextIndex, &dwChannelIndex);
@@ -1157,7 +1157,7 @@
 
 	if (i == PCSCLITE_MAX_READERS_CONTEXTS)
 	{
-		SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
+		(void)SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
 		return SCARD_E_READER_UNAVAILABLE;
 	}
 
@@ -1178,7 +1178,7 @@
 		if (rv == -1)
 		{
 
-			SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
+			(void)SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
 			return SCARD_E_NO_SERVICE;
 		}
 
@@ -1193,14 +1193,14 @@
 		if (rv == -1)
 		{
 
-			SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
+			(void)SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
 			return SCARD_F_COMM_ERROR;
 		}
 
 	}
 	while (scBeginStruct.rv == SCARD_E_SHARING_VIOLATION);
 
-	SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
+	(void)SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
 
 	PROFILE_END(scBeginStruct.rv);
 
@@ -1273,7 +1273,7 @@
 	if (rv == -1)
 		return SCARD_E_INVALID_HANDLE;
 
-	SYS_MutexLock(psContextMap[dwContextIndex].mMutex);
+	(void)SYS_MutexLock(psContextMap[dwContextIndex].mMutex);
 
 	/* check the handle is still valid */
 	rv = SCardGetIndicesFromHandle(hCard, &dwContextIndex, &dwChannelIndex);
@@ -1294,7 +1294,7 @@
 
 	if (i == PCSCLITE_MAX_READERS_CONTEXTS)
 	{
-		SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
+		(void)SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
 		return SCARD_E_READER_UNAVAILABLE;
 	}
 
@@ -1309,7 +1309,7 @@
 
 	if (rv == -1)
 	{
-		SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
+		(void)SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
 		return SCARD_E_NO_SERVICE;
 	}
 
@@ -1323,7 +1323,7 @@
 
 	if (rv == -1)
 	{
-		SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
+		(void)SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
 		return SCARD_F_COMM_ERROR;
 	}
 
@@ -1331,9 +1331,9 @@
 	 * This helps prevent starvation
 	 */
 	randnum = SYS_RandomInt(1000, 10000);
-	SYS_USleep(randnum);
-
-	SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
+	(void)SYS_USleep(randnum);
+
+	(void)SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
 
 	PROFILE_END(scEndStruct.rv)
 
@@ -1367,7 +1367,7 @@
 	if (rv == -1)
 		return SCARD_E_INVALID_HANDLE;
 
-	SYS_MutexLock(psContextMap[dwContextIndex].mMutex);
+	(void)SYS_MutexLock(psContextMap[dwContextIndex].mMutex);
 
 	/* check the handle is still valid */
 	rv = SCardGetIndicesFromHandle(hCard, &dwContextIndex, &dwChannelIndex);
@@ -1388,7 +1388,7 @@
 
 	if (i == PCSCLITE_MAX_READERS_CONTEXTS)
 	{
-		SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
+		(void)SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
 		return SCARD_E_READER_UNAVAILABLE;
 	}
 
@@ -1401,7 +1401,7 @@
 
 	if (rv == -1)
 	{
-		SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
+		(void)SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
 		return SCARD_E_NO_SERVICE;
 	}
 
@@ -1415,11 +1415,11 @@
 
 	if (rv == -1)
 	{
-		SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
+		(void)SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
 		return SCARD_F_COMM_ERROR;
 	}
 
-	SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
+	(void)SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
 
 	PROFILE_END(scCancelStruct.rv)
 
@@ -1562,7 +1562,7 @@
 	if (rv == -1)
 		return SCARD_E_INVALID_HANDLE;
 
-	SYS_MutexLock(psContextMap[dwContextIndex].mMutex);
+	(void)SYS_MutexLock(psContextMap[dwContextIndex].mMutex);
 
 	/* check the handle is still valid */
 	rv = SCardGetIndicesFromHandle(hCard, &dwContextIndex, &dwChannelIndex);
@@ -1698,7 +1698,7 @@
 	}
 
 end:
-	SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
+	(void)SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
 
 	PROFILE_END(rv)
 
@@ -1724,19 +1724,19 @@
 		ptv = &tv;
 	}
 
-	snprintf(filename, sizeof(filename), "%s/event.%d.%d", PCSCLITE_EVENTS_DIR,
-		SYS_GetPID(), SYS_RandomInt(0, 0x10000));
-	mkfifo(filename, 0644);
+	(void)snprintf(filename, sizeof(filename), "%s/event.%d.%d",
+		PCSCLITE_EVENTS_DIR, SYS_GetPID(), SYS_RandomInt(0, 0x10000));
+	(void)mkfifo(filename, 0644);
 	fd = SYS_OpenFile(filename, O_RDONLY | O_NONBLOCK, 0);
 
 	FD_ZERO(&read_fd);
 	FD_SET(fd, &read_fd);
 	
-	select(fd+1, &read_fd, NULL, NULL, ptv);
-
-	SYS_ReadFile(fd, buf, 1);
-	SYS_CloseFile(fd);
-	SYS_RemoveFile(filename);
+	(void)select(fd+1, &read_fd, NULL, NULL, ptv);
+
+	(void)SYS_ReadFile(fd, buf, 1);
+	(void)SYS_CloseFile(fd);
+	(void)SYS_RemoveFile(filename);
 
 	if (INFINITE != dwTime)
 	{
@@ -1891,7 +1891,7 @@
 	if (dwContextIndex == -1)
 		return SCARD_E_INVALID_HANDLE;
 
-	SYS_MutexLock(psContextMap[dwContextIndex].mMutex);
+	(void)SYS_MutexLock(psContextMap[dwContextIndex].mMutex);
 
 	/* check the context is still opened */
 	dwContextIndex = SCardGetContextIndice(hContext);
@@ -1971,7 +1971,7 @@
 		if (rv != SCARD_S_SUCCESS)
 		{
 			if (psContextMap[dwContextIndex].mMutex)
-				SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
+				(void)SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
 
 			PROFILE_END(rv)
 
@@ -2095,7 +2095,7 @@
 					/* card present but not yet powered up */
 					if (0 == rContext->cardAtrLength)
 						/* Allow the status thread to convey information */
-						SYS_USleep(PCSCLITE_STATUS_POLL_RATE + 10);
+						(void)SYS_USleep(PCSCLITE_STATUS_POLL_RATE + 10);
 
 					currReader->cbAtr = rContext->cardAtrLength;
 					memcpy(currReader->rgbAtr, rContext->cardAtr,
@@ -2257,7 +2257,7 @@
 end:
 	Log1(PCSC_LOG_DEBUG, "Event Loop End");
 
-	SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
+	(void)SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
 
 	PROFILE_END(rv)
 
@@ -2342,7 +2342,7 @@
 	if (rv == -1)
 		return SCARD_E_INVALID_HANDLE;
 
-	SYS_MutexLock(psContextMap[dwContextIndex].mMutex);
+	(void)SYS_MutexLock(psContextMap[dwContextIndex].mMutex);
 
 	/* check the handle is still valid */
 	rv = SCardGetIndicesFromHandle(hCard, &dwContextIndex, &dwChannelIndex);
@@ -2363,14 +2363,14 @@
 
 	if (i == PCSCLITE_MAX_READERS_CONTEXTS)
 	{
-		SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
+		(void)SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
 		return SCARD_E_READER_UNAVAILABLE;
 	}
 
 	if ((cbSendLength > MAX_BUFFER_SIZE_EXTENDED)
 		|| (cbRecvLength > MAX_BUFFER_SIZE_EXTENDED))
 	{
-		SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
+		(void)SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
 		return SCARD_E_INSUFFICIENT_BUFFER;
 	}
 
@@ -2403,7 +2403,7 @@
 
 		if (rv == -1)
 		{
-			SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
+			(void)SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
 			return SCARD_E_NO_SERVICE;
 		}
 
@@ -2415,7 +2415,7 @@
 			psContextMap[dwContextIndex].dwClientID, PCSCLITE_CLIENT_ATTEMPTS);
 		if (rv == -1)
 		{
-			SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
+			(void)SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
 			return SCARD_F_COMM_ERROR;
 		}
 
@@ -2431,7 +2431,7 @@
 				PCSCLITE_CLIENT_ATTEMPTS);
 			if (rv == -1)
 			{
-				SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
+				(void)SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
 				return SCARD_F_COMM_ERROR;
 			}
 		}
@@ -2466,7 +2466,7 @@
 
 		if (rv == -1)
 		{
-			SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
+			(void)SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
 			return SCARD_E_NO_SERVICE;
 		}
 
@@ -2478,7 +2478,7 @@
 
 		if (rv == -1)
 		{
-			SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
+			(void)SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
 			return SCARD_F_COMM_ERROR;
 		}
 
@@ -2501,7 +2501,7 @@
 		rv = scControlStruct.rv;
 	}
 
-	SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
+	(void)SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
 
 	PROFILE_END(rv)
 
@@ -2720,7 +2720,7 @@
 	if (rv == -1)
 		return SCARD_E_INVALID_HANDLE;
 
-	SYS_MutexLock(psContextMap[dwContextIndex].mMutex);
+	(void)SYS_MutexLock(psContextMap[dwContextIndex].mMutex);
 
 	/* check the handle is still valid */
 	rv = SCardGetIndicesFromHandle(hCard, &dwContextIndex, &dwChannelIndex);
@@ -2741,13 +2741,13 @@
 
 	if (i == PCSCLITE_MAX_READERS_CONTEXTS)
 	{
-		SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
+		(void)SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
 		return SCARD_E_READER_UNAVAILABLE;
 	}
 
 	if (*pcbAttrLen > MAX_BUFFER_SIZE)
 	{
-		SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
+		(void)SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
 		return SCARD_E_INSUFFICIENT_BUFFER;
 	}
 
@@ -2765,7 +2765,7 @@
 
 	if (rv == -1)
 	{
-		SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
+		(void)SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
 		return SCARD_E_NO_SERVICE;
 	}
 
@@ -2777,7 +2777,7 @@
 
 	if (rv == -1)
 	{
-		SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
+		(void)SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
 		return SCARD_F_COMM_ERROR;
 	}
 
@@ -2802,7 +2802,7 @@
 		memset(scGetSetStruct.pbAttr, 0x00, sizeof(scGetSetStruct.pbAttr));
 	}
 
-	SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
+	(void)SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
 
 	return scGetSetStruct.rv;
 }
@@ -2894,7 +2894,7 @@
 		return SCARD_E_INVALID_HANDLE;
 	}
 
-	SYS_MutexLock(psContextMap[dwContextIndex].mMutex);
+	(void)SYS_MutexLock(psContextMap[dwContextIndex].mMutex);
 
 	/* check the handle is still valid */
 	rv = SCardGetIndicesFromHandle(hCard, &dwContextIndex, &dwChannelIndex);
@@ -2915,14 +2915,14 @@
 
 	if (i == PCSCLITE_MAX_READERS_CONTEXTS)
 	{
-		SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
+		(void)SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
 		return SCARD_E_READER_UNAVAILABLE;
 	}
 
 	if ((cbSendLength > MAX_BUFFER_SIZE_EXTENDED)
 		|| (*pcbRecvLength > MAX_BUFFER_SIZE_EXTENDED))
 	{
-		SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
+		(void)SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
 		return SCARD_E_INSUFFICIENT_BUFFER;
 	}
 
@@ -2966,7 +2966,7 @@
 
 		if (rv == -1)
 		{
-			SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
+			(void)SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
 			return SCARD_E_NO_SERVICE;
 		}
 
@@ -2977,7 +2977,7 @@
 		rv = SHMMessageReceive(buffer, sizeof(sharedSegmentMsg), psContextMap[dwContextIndex].dwClientID, PCSCLITE_CLIENT_ATTEMPTS);
 		if (rv == -1)
 		{
-			SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
+			(void)SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
 			return SCARD_F_COMM_ERROR;
 		}
 
@@ -2993,7 +2993,7 @@
 				PCSCLITE_CLIENT_ATTEMPTS);
 			if (rv == -1)
 			{
-				SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
+				(void)SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
 				return SCARD_F_COMM_ERROR;
 			}
 		}
@@ -3016,7 +3016,7 @@
 		}
 
 		*pcbRecvLength = scTransmitStructExtended -> pcbRecvLength;
-		SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
+		(void)SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
 
 		rv = scTransmitStructExtended -> rv;
 	}
@@ -3053,7 +3053,7 @@
 
 		if (rv == -1)
 		{
-			SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
+			(void)SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
 			return SCARD_E_NO_SERVICE;
 		}
 
@@ -3067,7 +3067,7 @@
 
 		if (rv == -1)
 		{
-			SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
+			(void)SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
 			return SCARD_F_COMM_ERROR;
 		}
 
@@ -3094,7 +3094,7 @@
 		}
 
 		*pcbRecvLength = scTransmitStruct.pcbRecvLength;
-		SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
+		(void)SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
 
 		rv = scTransmitStruct.rv;
 	}
@@ -3180,7 +3180,7 @@
 	if (dwContextIndex == -1)
 		return SCARD_E_INVALID_HANDLE;
 
-	SYS_MutexLock(psContextMap[dwContextIndex].mMutex);
+	(void)SYS_MutexLock(psContextMap[dwContextIndex].mMutex);
 
 	/* check the context is still opened */
 	dwContextIndex = SCardGetContextIndice(hContext);
@@ -3251,7 +3251,7 @@
 	/* set the reader names length */
 	*pcchReaders = dwReadersLen;
 
-	SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
+	(void)SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
 
 	PROFILE_END(rv)
 
@@ -3368,7 +3368,7 @@
 	if (dwContextIndex == -1)
 		return SCARD_E_INVALID_HANDLE;
 
-	SYS_MutexLock(psContextMap[dwContextIndex].mMutex);
+	(void)SYS_MutexLock(psContextMap[dwContextIndex].mMutex);
 
 	/* check the context is still opened */
 	dwContextIndex = SCardGetContextIndice(hContext);
@@ -3410,7 +3410,7 @@
 end:
 	*pcchGroups = dwGroups;
 
-	SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
+	(void)SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
 
 	PROFILE_END(rv)
 
@@ -3542,7 +3542,7 @@
 			psContextMap[i].dwClientID = dwClientID;
 			psContextMap[i].contextBlockStatus = BLOCK_STATUS_RESUME;
 			psContextMap[i].mMutex = malloc(sizeof(PCSCLITE_MUTEX));
-			SYS_MutexInit(psContextMap[i].mMutex);
+			(void)SYS_MutexInit(psContextMap[i].mMutex);
 			return SCARD_S_SUCCESS;
 		}
 	}
@@ -3566,9 +3566,9 @@
 {
 	LONG rv;
 
-	SCardLockThread();
+	(void)SCardLockThread();
 	rv = SCardGetContextIndiceTH(hContext);
-	SCardUnlockThread();
+	(void)SCardUnlockThread();
 
 	return rv;
 }
@@ -3627,7 +3627,7 @@
 	int i;
 
 	psContextMap[indice].hContext = 0;
-	SHMClientCloseSession(psContextMap[indice].dwClientID);
+	(void)SHMClientCloseSession(psContextMap[indice].dwClientID);
 	psContextMap[indice].dwClientID = 0;
 	free(psContextMap[indice].mMutex);
 	psContextMap[indice].mMutex = NULL;
@@ -3693,9 +3693,9 @@
 	if (0 == hCard)
 		return -1;
 
-	SCardLockThread();
+	(void)SCardLockThread();
 	rv = SCardGetIndicesFromHandleTH(hCard, pdwContextIndice, pdwChannelIndice);
-	SCardUnlockThread();
+	(void)SCardUnlockThread();
 
 	return rv;
 }
@@ -3774,13 +3774,13 @@
 		int i;
 
 		/* invalid all handles */
-		SCardLockThread();
+		(void)SCardLockThread();
 
 		for (i = 0; i < PCSCLITE_MAX_APPLICATION_CONTEXTS; i++)
 			if (psContextMap[i].hContext)
-				SCardCleanContext(i);
-
-		SCardUnlockThread();
+				(void)SCardCleanContext(i);
+
+		(void)SCardUnlockThread();
 
 		/* reset pcscd status */
 		daemon_ctime = 0;
@@ -3826,7 +3826,7 @@
 		}
 	}
 
-	SYS_CloseFile(mapAddr);
+	(void)SYS_CloseFile(mapAddr);
 	isExecuted = 0;
 }
 

Modified: trunk/PCSC/src/winscard_msg.c
URL: http://svn.debian.org/wsvn/pcsclite/trunk/PCSC/src/winscard_msg.c?rev=3247&op=diff
==============================================================================
--- trunk/PCSC/src/winscard_msg.c (original)
+++ trunk/PCSC/src/winscard_msg.c Fri Jan  2 13:22:46 2009
@@ -96,7 +96,7 @@
 	{
 		Log3(PCSC_LOG_CRITICAL, "Error: connect to client socket %s: %s",
 			PCSCLITE_CSOCK_NAME, strerror(errno));
-		SYS_CloseFile(*pdwClientID);
+		(void)SYS_CloseFile(*pdwClientID);
 		return -1;
 	}
 
@@ -105,7 +105,7 @@
 	{
 		Log3(PCSC_LOG_CRITICAL, "Error: cannot set socket %s nonblocking: %s",
 			PCSCLITE_CSOCK_NAME, strerror(errno));
-		SYS_CloseFile(*pdwClientID);
+		(void)SYS_CloseFile(*pdwClientID);
 		return -1;
 	}
 
@@ -121,7 +121,7 @@
  */
 INTERNAL int SHMClientCloseSession(uint32_t dwClientID)
 {
-	SYS_CloseFile(dwClientID);
+	(void)SYS_CloseFile(dwClientID);
 	return 0;
 }
 
@@ -477,7 +477,7 @@
  */
 INTERNAL void SHMCleanupSharedSegment(int sockValue, const char *pcFilePath)
 {
-	SYS_CloseFile(sockValue);
-	SYS_RemoveFile(pcFilePath);
-}
-
+	(void)SYS_CloseFile(sockValue);
+	(void)SYS_RemoveFile(pcFilePath);
+}
+

Modified: trunk/PCSC/src/winscard_msg_srv.c
URL: http://svn.debian.org/wsvn/pcsclite/trunk/PCSC/src/winscard_msg_srv.c?rev=3247&op=diff
==============================================================================
--- trunk/PCSC/src/winscard_msg_srv.c (original)
+++ trunk/PCSC/src/winscard_msg_srv.c Fri Jan  2 13:22:46 2009
@@ -108,7 +108,7 @@
 	{
 		Log2(PCSC_LOG_CRITICAL, "Error: cannot set socket nonblocking: %s",
 			strerror(errno));
-		SYS_CloseFile(*pdwClientID);
+		(void)SYS_CloseFile(*pdwClientID);
 		*pdwClientID = -1;
 		return -1;
 	}
@@ -147,7 +147,7 @@
 	serv_adr.sun_family = AF_UNIX;
 	strncpy(serv_adr.sun_path, PCSCLITE_CSOCK_NAME,
 		sizeof(serv_adr.sun_path));
-	SYS_RemoveFile(PCSCLITE_CSOCK_NAME);
+	(void)SYS_RemoveFile(PCSCLITE_CSOCK_NAME);
 
 	if (bind(commonSocket, (struct sockaddr *) &serv_adr,
 			sizeof(serv_adr.sun_family) + strlen(serv_adr.sun_path) + 1) < 0)
@@ -169,7 +169,7 @@
 	/*
 	 * Chmod the public entry channel
 	 */
-	SYS_Chmod(PCSCLITE_CSOCK_NAME, S_IRWXO | S_IRWXG | S_IRWXU);
+	(void)SYS_Chmod(PCSCLITE_CSOCK_NAME, S_IRWXO | S_IRWXG | S_IRWXU);
 
 	return 0;
 }
@@ -307,7 +307,7 @@
 			Log2(PCSC_LOG_DEBUG, "Client has disappeared: %d", dwClientID);
 			msgStruct->mtype = CMD_CLIENT_DIED;
 			msgStruct->command = 0;
-			SYS_CloseFile(dwClientID);
+			(void)SYS_CloseFile(dwClientID);
 
 			return 0;
 		}

Modified: trunk/PCSC/src/winscard_svc.c
URL: http://svn.debian.org/wsvn/pcsclite/trunk/PCSC/src/winscard_svc.c?rev=3247&op=diff
==============================================================================
--- trunk/PCSC/src/winscard_svc.c (original)
+++ trunk/PCSC/src/winscard_svc.c Fri Jan  2 13:22:46 2009
@@ -100,7 +100,7 @@
 		(PCSCLITE_THREAD_FUNCTION( )) ContextThread, (LPVOID) i);
 	if (rv)
 	{
-		SYS_CloseFile(psContext[i].dwClientID);
+		(void)SYS_CloseFile(psContext[i].dwClientID);
 		psContext[i].dwClientID = 0;
 		Log2(PCSC_LOG_CRITICAL, "SYS_ThreadCreate failed: %s", strerror(rv));
 		return SCARD_E_NO_MEMORY;
@@ -143,8 +143,8 @@
 				 */
 				Log2(PCSC_LOG_DEBUG, "Client die: %d",
 					psContext[dwContextIndex].dwClientID);
-				MSGCleanupClient(dwContextIndex);
-				SYS_ThreadExit((LPVOID) NULL);
+				(void)MSGCleanupClient(dwContextIndex);
+				(void)SYS_ThreadExit((LPVOID) NULL);
 			}
 			break;
 
@@ -159,9 +159,9 @@
 				{
 					Log2(PCSC_LOG_DEBUG, "MSGFunctionDemarshall failed: %d",
 						rv);
-					SHMClientCloseSession(psContext[dwContextIndex].dwClientID);
-					MSGCleanupClient(dwContextIndex);
-					SYS_ThreadExit((LPVOID) NULL);
+					(void)SHMClientCloseSession(psContext[dwContextIndex].dwClientID);
+					(void)MSGCleanupClient(dwContextIndex);
+					(void)SYS_ThreadExit((LPVOID) NULL);
 				}
 
 				/* the SCARD_TRANSMIT_EXTENDED anwser is already sent by
@@ -674,10 +674,10 @@
 				}
 
 				if (rv == SCARD_W_RESET_CARD || rv == SCARD_W_REMOVED_CARD)
-					SCardDisconnect(psContext[dwContextIndex].hCard[i],
+					(void)SCardDisconnect(psContext[dwContextIndex].hCard[i],
 						SCARD_LEAVE_CARD);
 				else
-					SCardDisconnect(psContext[dwContextIndex].hCard[i],
+					(void)SCardDisconnect(psContext[dwContextIndex].hCard[i],
 						SCARD_RESET_CARD);
 
 				psContext[dwContextIndex].hCard[i] = 0;
@@ -754,7 +754,7 @@
 
 	/* Must be a rogue client, debug log and sleep a couple of seconds */
 	Log1(PCSC_LOG_ERROR, "Client failed to authenticate");
-	SYS_Sleep(2);
+	(void)SYS_Sleep(2);
 
 	return -1;
 }
@@ -763,8 +763,9 @@
 {
 	if (psContext[dwContextIndex].hContext != 0)
 	{
-		SCardReleaseContext(psContext[dwContextIndex].hContext);
-		MSGRemoveContext(psContext[dwContextIndex].hContext, dwContextIndex);
+		(void)SCardReleaseContext(psContext[dwContextIndex].hContext);
+		(void)MSGRemoveContext(psContext[dwContextIndex].hContext,
+			dwContextIndex);
 	}
 
 	psContext[dwContextIndex].dwClientID = 0;




More information about the Pcsclite-cvs-commit mailing list