diff options
author | Nils Larsch <nils@openssl.org> | 2005-05-19 12:01:51 +0000 |
---|---|---|
committer | Nils Larsch <nils@openssl.org> | 2005-05-19 12:01:51 +0000 |
commit | 3f4657d131fd301b6000d0de9929a2c8518a795b (patch) | |
tree | b8646993315ffdf829b46e616f0be95bb044b1d9 | |
parent | 67ffa18cceb3fafcf1a19d8e607fc9c1e8213e9d (diff) | |
download | openssl-3f4657d131fd301b6000d0de9929a2c8518a795b.tar.gz |
fix "dereferencing type-punned pointer will break strict-aliasing rules"
warning when using gcc 4.0
-rw-r--r-- | crypto/dso/dso_dlfcn.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/dso/dso_dlfcn.c b/crypto/dso/dso_dlfcn.c index 2b8f3ee4d8..1fd10104c5 100644 --- a/crypto/dso/dso_dlfcn.c +++ b/crypto/dso/dso_dlfcn.c @@ -237,7 +237,7 @@ static void *dlfcn_bind_var(DSO *dso, const char *symname) static DSO_FUNC_TYPE dlfcn_bind_func(DSO *dso, const char *symname) { void *ptr; - DSO_FUNC_TYPE sym; + DSO_FUNC_TYPE sym, *tsym = &sym; if((dso == NULL) || (symname == NULL)) { @@ -255,7 +255,7 @@ static DSO_FUNC_TYPE dlfcn_bind_func(DSO *dso, const char *symname) DSOerr(DSO_F_DLFCN_BIND_FUNC,DSO_R_NULL_HANDLE); return(NULL); } - *(void **)(&sym) = dlsym(ptr, symname); + *(void **)(tsym) = dlsym(ptr, symname); if(sym == NULL) { DSOerr(DSO_F_DLFCN_BIND_FUNC,DSO_R_SYM_FAILURE); |