Skip to content

Conversation

@airween
Copy link
Member

@airween airween commented Oct 28, 2025

what

This PR fixes libxml2 related deprecated warnings.

why

With newest clang and gcc compilers and newest libxml2 library there were a few deprecated warnings.

In file included from msc_xml.h:23,
                 from modsecurity.h:42,
                 from re.h:38,
                 from re.c:17:
/usr/include/libxml2/libxml/SAX.h:15:4: warning: #warning "libxml/SAX.h is deprecated" [-Wcpp]
   15 |   #warning "libxml/SAX.h is deprecated"
      |    ^~~~~~~

and

msc_crypt.c: In function 'inject_hashed_response_body':
msc_crypt.c:1109:5: warning: 'name' is deprecated [-Wdeprecated-declarations]
 1109 |     new_ct = (char*)apr_psprintf(msr->mp, "text/html;%s",handler->name);
      |     ^~~~~~
In file included from /usr/include/libxml2/libxml/parser.h:25,
                 from /usr/include/libxml2/libxml/tree.h:17,
                 from modsecurity.h:22:
/usr/include/libxml2/libxml/encoding.h:169:11: note: declared here
  169 |     char *name XML_DEPRECATED_MEMBER;
      |           ^~~~

@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
B Maintainability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant