Skip to content

Commit 583b465

Browse files
committed
Silence compiler warning about discarded const
1 parent 76ce55a commit 583b465

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Diff for: CHANGES

+2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
DD mmm YYYY - 2.9.x (to be released)
22
-------------------
33

4+
* Silence compiler warning about discarded const
5+
[Issue #2843 - @Steve8291, @martinhsv]
46
* Support for JIT option for PCRE2
57
[Issue #2840 - @martinhsv]
68
* Use uid for user if apr_uid_name_get() fails

Diff for: apache2/mod_security2.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ static int server_limit, thread_limit;
105105
*/
106106
static void version(apr_pool_t *mp) {
107107
char *pcre_vrs = NULL;
108-
char *pcre_loaded_vrs = NULL;
108+
const char *pcre_loaded_vrs = NULL;
109109
char pcre2_loaded_vrs_buffer[80] ={0};
110110

111111
ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, NULL,
@@ -119,7 +119,7 @@ static void version(apr_pool_t *mp) {
119119
#ifdef WITH_PCRE2
120120
pcre_vrs = apr_psprintf(mp,"%d.%d ", PCRE2_MAJOR, PCRE2_MINOR);
121121
pcre_loaded_vrs = pcre2_loaded_vrs_buffer;
122-
pcre2_config(PCRE2_CONFIG_VERSION, pcre_loaded_vrs);
122+
pcre2_config(PCRE2_CONFIG_VERSION, pcre2_loaded_vrs_buffer);
123123
#else
124124
pcre_vrs = apr_psprintf(mp,"%d.%d ", PCRE_MAJOR, PCRE_MINOR);
125125
pcre_loaded_vrs = pcre_version();

0 commit comments

Comments
 (0)