Use a temporary pointer to avoid a pointer cast.

Fix pkcs11-display.c:137: warning: dereferencing type-punned pointer
will break strict-aliasing rules


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4184 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
ludovic.rousseau 2010-03-29 14:19:26 +00:00
parent 502db6bd36
commit cb5a21c5fa
1 changed files with 2 additions and 1 deletions

View File

@ -134,7 +134,8 @@ static void print_dn(FILE *f, CK_LONG type, CK_VOID_PTR value, CK_ULONG size, CK
print_generic(f, type, value, size, arg);
if(size && value) {
X509_NAME *name;
name = d2i_X509_NAME(NULL, (const unsigned char **)&value, size);
const unsigned char *tmp = value;
name = d2i_X509_NAME(NULL, &tmp, size);
if(name) {
BIO *bio = BIO_new(BIO_s_file());
BIO_set_fp(bio, f, 0);