changeset 4781:814541b2ec23

Added "const" to ngx_memcpy() with NGX_MEMCPY_LIMIT defined. This fixes warning produced during compilation of the ngx_http_geoip_module due to const qualifier being discarded.
author Maxim Dounin <mdounin@mdounin.ru>
date Fri, 03 Aug 2012 09:07:30 +0000
parents b07931054bf1
children e23892a0c917
files src/core/ngx_string.c src/core/ngx_string.h
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/core/ngx_string.c	Fri Aug 03 09:00:25 2012 +0000
+++ b/src/core/ngx_string.c	Fri Aug 03 09:07:30 2012 +0000
@@ -1827,7 +1827,7 @@
 #if (NGX_MEMCPY_LIMIT)
 
 void *
-ngx_memcpy(void *dst, void *src, size_t n)
+ngx_memcpy(void *dst, const void *src, size_t n)
 {
     if (n > NGX_MEMCPY_LIMIT) {
         ngx_log_error(NGX_LOG_ALERT, ngx_cycle->log, 0, "memcpy %uz bytes", n);
--- a/src/core/ngx_string.h	Fri Aug 03 09:00:25 2012 +0000
+++ b/src/core/ngx_string.h	Fri Aug 03 09:07:30 2012 +0000
@@ -89,7 +89,7 @@
 
 #if (NGX_MEMCPY_LIMIT)
 
-void *ngx_memcpy(void *dst, void *src, size_t n);
+void *ngx_memcpy(void *dst, const void *src, size_t n);
 #define ngx_cpymem(dst, src, n)   (((u_char *) ngx_memcpy(dst, src, n)) + (n))
 
 #else