compile fixes for win32.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2949 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
parent
7f5595a1e3
commit
45007b3da7
|
@ -963,8 +963,9 @@ mcrd_select_file(sc_card_t * card, const sc_path_t * path, sc_file_t ** file)
|
|||
} else {
|
||||
unsigned short int pathtmp[SC_MAX_PATH_SIZE / 2];
|
||||
unsigned short int *pathptr;
|
||||
|
||||
int samepath = 1;
|
||||
size_t pathlen, n;
|
||||
|
||||
if ((path->len & 1) || path->len > sizeof(pathtmp))
|
||||
return SC_ERROR_INVALID_ARGUMENTS;
|
||||
|
||||
|
@ -974,8 +975,6 @@ mcrd_select_file(sc_card_t * card, const sc_path_t * path, sc_file_t ** file)
|
|||
(path->value[n] << 8) | path->value[n + 1];
|
||||
pathlen = path->len >> 1;
|
||||
|
||||
int samepath = 1;
|
||||
|
||||
if (pathlen == priv->curpathlen && priv->is_ef != 2) {
|
||||
for (n = 0; n < pathlen; n++) {
|
||||
if (priv->curpath[n] != pathptr[n]) {
|
||||
|
@ -1038,6 +1037,7 @@ int select_key_df(sc_card_t * card)
|
|||
int r, i;
|
||||
char tmpstr[16] = "";
|
||||
char currpathpart[10];
|
||||
sc_path_t tmppath;
|
||||
struct mcrd_priv_data *priv = DRVDATA(card);
|
||||
memset(tmpstr, 0, 16);
|
||||
i = 0;
|
||||
|
@ -1048,7 +1048,6 @@ int select_key_df(sc_card_t * card)
|
|||
i++;
|
||||
}
|
||||
|
||||
sc_path_t tmppath;
|
||||
sc_format_path(tmpstr, &tmppath);
|
||||
tmppath.type = SC_PATH_TYPE_PATH;
|
||||
r = sc_select_file(card, &tmppath, NULL);
|
||||
|
|
|
@ -2476,10 +2476,10 @@ asn1_sequence_wrapper(const u8 *data, size_t len, CK_ATTRIBUTE_PTR attr)
|
|||
u8 *dest;
|
||||
unsigned int n;
|
||||
size_t len2;
|
||||
size_t lenb = 1;
|
||||
|
||||
len2 = len;
|
||||
/* calculate the number of bytes needed for the length */
|
||||
size_t lenb = 1;
|
||||
if (len > 127) {
|
||||
unsigned int i;
|
||||
for (i = 0; (len & (0xff << i)) != 0 && (0xff << i) != 0; i++)
|
||||
|
|
Loading…
Reference in New Issue