Disable xml logs in release build

This commit is contained in:
Oleg.Korshul
2023-07-20 22:37:53 +03:00
parent 57cc43371c
commit bfd2627269
2 changed files with 10 additions and 0 deletions

View File

@ -23,6 +23,8 @@ INCLUDEPATH += \
core_release {
SOURCES += $$PWD/libxml2_all.c
SOURCES += $$PWD/libxml2_all2.c
DEFINES += XML_ERROR_DISABLE_MODE
}
core_debug {

View File

@ -67,6 +67,8 @@ void XMLCDECL xmlGenericErrorDefaultFunc (void *ctx ATTRIBUTE_UNUSED,
*
* Default handler for out of context error messages.
*/
#ifndef XML_ERROR_DISABLE_MODE
void XMLCDECL
xmlGenericErrorDefaultFunc(void *ctx ATTRIBUTE_UNUSED, const char *msg, ...) {
va_list args;
@ -78,6 +80,12 @@ xmlGenericErrorDefaultFunc(void *ctx ATTRIBUTE_UNUSED, const char *msg, ...) {
vfprintf((FILE *)xmlGenericErrorContext, msg, args);
va_end(args);
}
#else
void XMLCDECL
xmlGenericErrorDefaultFunc(void *ctx ATTRIBUTE_UNUSED, const char *msg, ...) {
// NONE
}
#endif
/**
* initGenericErrorDefaultFunc: