summaryrefslogtreecommitdiff
path: root/security/ccid/patches/patch-ab
blob: 05ab2a1276936b6a1ffee15bdede7fdce6014eff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
$NetBSD: patch-ab,v 1.1.1.1 2008/03/04 11:30:08 shannonjr Exp $

--- src/commands.c.orig	2008-02-06 01:11:11.000000000 -0700
+++ src/commands.c
@@ -153,7 +153,7 @@ RESPONSECODE CmdPowerOn(unsigned int rea
 
 			/* Status Information? */
 			if (0x40 == tmp[0])
-				ccid_error(tmp[2], __FILE__, __LINE__, __FUNCTION__);
+				ccid_error(tmp[2], __FILE__, __LINE__, (const char *) __FUNCTION__);
 			return IFD_COMMUNICATION_ERROR;
 		}
 
@@ -200,7 +200,7 @@ again:
 
 	if (buffer[STATUS_OFFSET] & CCID_COMMAND_FAILED)
 	{
-		ccid_error(buffer[ERROR_OFFSET], __FILE__, __LINE__, __FUNCTION__);    /* bError */
+		ccid_error(buffer[ERROR_OFFSET], __FILE__, __LINE__, (const char *) __FUNCTION__);    /* bError */
 
 		if (0xBB == buffer[ERROR_OFFSET] &&	/* Protocol error in EMV mode */
 			((GEMPC433 == ccid_descriptor->readerID)
@@ -711,7 +711,7 @@ again:
 
 	if (cmd_out[STATUS_OFFSET] & CCID_COMMAND_FAILED)
 	{
-		ccid_error(cmd_out[ERROR_OFFSET], __FILE__, __LINE__, __FUNCTION__);    /* bError */
+		ccid_error(cmd_out[ERROR_OFFSET], __FILE__, __LINE__, (const char *) __FUNCTION__);    /* bError */
 		return_value = IFD_COMMUNICATION_ERROR;
 	}
 
@@ -811,7 +811,7 @@ RESPONSECODE CmdPowerOff(unsigned int re
 
 	if (cmd[STATUS_OFFSET] & CCID_COMMAND_FAILED)
 	{
-		ccid_error(cmd[ERROR_OFFSET], __FILE__, __LINE__, __FUNCTION__);    /* bError */
+		ccid_error(cmd[ERROR_OFFSET], __FILE__, __LINE__, (const char *) __FUNCTION__);    /* bError */
 		return_value = IFD_COMMUNICATION_ERROR;
 	}
 
@@ -942,7 +942,7 @@ again_status:
 			|| (OZ776_7772 == ccid_descriptor->readerID))
 			&& (buffer[ERROR_OFFSET] == 0xFE)))
 #endif
-		ccid_error(buffer[ERROR_OFFSET], __FILE__, __LINE__, __FUNCTION__);    /* bError */
+		ccid_error(buffer[ERROR_OFFSET], __FILE__, __LINE__, (const char *) __FUNCTION__);    /* bError */
 
 		/* card absent or mute is not an communication error */
 		if (buffer[ERROR_OFFSET] != 0xFE)
@@ -1028,7 +1028,7 @@ RESPONSECODE CCID_Transmit(unsigned int 
 		int r;
 
 		/* Xfr Block */
-		r = ControlUSB(reader_index, 0x21, 0x65, 0, tx_buffer, tx_length);
+		r = ControlUSB(reader_index, 0x21, 0x65, 0, (unsigned char *) tx_buffer, tx_length);
 
 		/* we got an error? */
 		if (r < 0)
@@ -1050,7 +1050,7 @@ RESPONSECODE CCID_Transmit(unsigned int 
 
 		/* Xfr Block */
 		DEBUG_COMM2("chain parameter: %d", rx_length);
-		r = ControlUSB(reader_index, 0x21, 0x65, rx_length << 8, tx_buffer,
+		r = ControlUSB(reader_index, 0x21, 0x65, rx_length << 8, (unsigned char *) tx_buffer,
 			tx_length);
 
 		/* we got an error? */
@@ -1175,7 +1175,7 @@ time_request_ICCD_B:
 
 			case 0x40:
 				/* Status Information */
-				ccid_error(rx_buffer[2], __FILE__, __LINE__, __FUNCTION__);
+				ccid_error(rx_buffer[2], __FILE__, __LINE__, (const char *) __FUNCTION__);
 				return IFD_COMMUNICATION_ERROR;
 
 			case 0x80:
@@ -1233,7 +1233,7 @@ time_request:
 
 	if (cmd[STATUS_OFFSET] & CCID_COMMAND_FAILED)
 	{
-		ccid_error(cmd[ERROR_OFFSET], __FILE__, __LINE__, __FUNCTION__);    /* bError */
+		ccid_error(cmd[ERROR_OFFSET], __FILE__, __LINE__, (const char *) __FUNCTION__);    /* bError */
 		switch (cmd[ERROR_OFFSET])
 		{
 			case 0xEF:	/* cancel */
@@ -1966,7 +1966,7 @@ RESPONSECODE SetParameters(unsigned int 
 
 	if (cmd[STATUS_OFFSET] & CCID_COMMAND_FAILED)
 	{
-		ccid_error(cmd[ERROR_OFFSET], __FILE__, __LINE__, __FUNCTION__);    /* bError */
+		ccid_error(cmd[ERROR_OFFSET], __FILE__, __LINE__, (const char *) __FUNCTION__);    /* bError */
 		if (0x00 == cmd[ERROR_OFFSET])	/* command not supported */
 			return IFD_NOT_SUPPORTED;
 		else