[njs] Fixed strict aliasing warnings with old GCC versions.
Alexander Borisov
alexander.borisov at nginx.com
Tue Oct 29 12:25:48 UTC 2019
details: https://hg.nginx.org/njs/rev/fedc4ad583c8
branches:
changeset: 1205:fedc4ad583c8
user: Alexander Borisov <alexander.borisov at nginx.com>
date: Tue Oct 29 15:24:58 2019 +0300
description:
Fixed strict aliasing warnings with old GCC versions.
diffstat:
src/njs.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diffs (12 lines):
diff -r 3c15734aaeb8 -r fedc4ad583c8 src/njs.h
--- a/src/njs.h Mon Oct 28 16:50:20 2019 +0300
+++ b/src/njs.h Tue Oct 29 15:24:58 2019 +0300
@@ -51,7 +51,7 @@ extern const njs_value_t njs_
: (njs_value_t *) &njs_value_undefined)
#define njs_value_assign(dst, src) \
- *((njs_opaque_value_t *) dst) = *((njs_opaque_value_t *) src)
+ memcpy(dst, src, sizeof(njs_opaque_value_t))
#define njs_value_arg(val) ((njs_value_t *) val)
More information about the nginx-devel
mailing list