Skip to content

Commit

Permalink
monolithic build mode fixes for XML_TESTING compile setting.
Browse files Browse the repository at this point in the history
  • Loading branch information
GerHobbelt committed Aug 4, 2024
1 parent f3b65fe commit 0b5af42
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion expat/lib/internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ const char *unsignedCharToPrintable(unsigned char c);

extern
#if ! defined(XML_TESTING)
const
//const
#endif
XML_Bool g_reparseDeferralEnabledDefault; // written ONLY in runtests.c
#if defined(XML_TESTING)
Expand Down
4 changes: 3 additions & 1 deletion expat/tests/basic_tests.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@
# undef NDEBUG /* because test suite relies on assert(...) at the moment */
#endif

#define XML_TESTING 1

#include <assert.h>

#include <stdio.h>
Expand Down Expand Up @@ -3206,7 +3208,7 @@ static int XMLCALL
external_bom_checker(XML_Parser parser, const XML_Char *context,
const XML_Char *base, const XML_Char *systemId,
const XML_Char *publicId) {
const char *text;
const char *text = NULL;
UNUSED_P(base);
UNUSED_P(systemId);
UNUSED_P(publicId);
Expand Down
4 changes: 3 additions & 1 deletion expat/tests/runtests.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@
USE OR OTHER DEALINGS IN THE SOFTWARE.
*/

#define XML_TESTING 1

#include "expat_config.h"

#include <stdio.h>
Expand Down Expand Up @@ -91,7 +93,7 @@ main(int argc, const char** argv) {
SRunner *sr = srunner_create(s);

for (i = 1; i < argc; ++i) {
char *opt = argv[i];
const char *opt = argv[i];
if (strcmp(opt, "-v") == 0 || strcmp(opt, "--verbose") == 0)
verbosity = CK_VERBOSE;
else if (strcmp(opt, "-q") == 0 || strcmp(opt, "--quiet") == 0)
Expand Down

0 comments on commit 0b5af42

Please sign in to comment.