Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for QNX & Fix xmltest UB #1016

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tinyxml2.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ distribution.
#ifndef TINYXML2_INCLUDED
#define TINYXML2_INCLUDED

#if defined(ANDROID_NDK) || defined(__BORLANDC__) || defined(__QNXNTO__)
#if defined(ANDROID_NDK) || defined(__BORLANDC__) || defined(__QNX__)
# include <ctype.h>
# include <limits.h>
# include <stdio.h>
Expand Down
9 changes: 6 additions & 3 deletions xmltest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,16 @@ bool XMLTest (const char* testString, const char* expected, const char* found, b
printf (" %s\n", testString);
}
else {
const char* expectedString = (expected == NULL) ? "(null)" : expected;
const char* foundString = (found == NULL) ? "(null)" : found;

if ( extraNL ) {
printf( " %s\n", testString );
printf( "%s\n", expected );
printf( "%s\n", found );
printf( "%s\n", expectedString );
printf( "%s\n", foundString );
}
else {
printf (" %s [%s][%s]\n", testString, expected, found);
printf (" %s [%s][%s]\n", testString, expectedString, foundString);
}
}

Expand Down