Mercurial > hg > nginx
comparison src/core/ngx_string.c @ 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 | d3fc672fd6cc |
children | 670ceaba03d8 |
comparison
equal
deleted
inserted
replaced
4780:b07931054bf1 | 4781:814541b2ec23 |
---|---|
1825 | 1825 |
1826 | 1826 |
1827 #if (NGX_MEMCPY_LIMIT) | 1827 #if (NGX_MEMCPY_LIMIT) |
1828 | 1828 |
1829 void * | 1829 void * |
1830 ngx_memcpy(void *dst, void *src, size_t n) | 1830 ngx_memcpy(void *dst, const void *src, size_t n) |
1831 { | 1831 { |
1832 if (n > NGX_MEMCPY_LIMIT) { | 1832 if (n > NGX_MEMCPY_LIMIT) { |
1833 ngx_log_error(NGX_LOG_ALERT, ngx_cycle->log, 0, "memcpy %uz bytes", n); | 1833 ngx_log_error(NGX_LOG_ALERT, ngx_cycle->log, 0, "memcpy %uz bytes", n); |
1834 ngx_debug_point(); | 1834 ngx_debug_point(); |
1835 } | 1835 } |