9 Commits

Author SHA1 Message Date
e834e174b6 Обновить CMakeLists.txt 2024-06-17 13:19:55 +04:00
5b695f2b64 Обновить CMakeLists.txt 2024-06-17 13:15:55 +04:00
Lee Thomason
a0f66fdf71 Merge pull request #984 from Blake-Madden/master
Fix typo in comment
2024-06-13 08:29:51 -07:00
Lee Thomason
a965e28c4f Merge pull request #978 from AlbertHungGarmin/fix-format-specifier
Fix format specifier mismatch in XMLUtil::ToStr
2024-06-13 08:17:16 -07:00
Blake-Madden
5b04868fee Fix typo in comment 2024-06-01 15:41:57 -04:00
Albert Hung
dded8bb2e9 Fix format specifier mismatch in XMLUtil::ToStr
In the XMLUtil::ToStr( uint64_t v, char* buffer, int bufferSize ) function, the format specifier %llu was used with a signed long long argument. This caused a type mismatch warning. The argument has been changed to unsigned long long to match the format specifier, resolving the warning.
2024-05-15 19:43:55 +08:00
Lee Thomason
312a809224 Merge pull request #976 from leethomason/AlbertHungGarmin-format_error
Albert hung garmin format error
2024-04-20 19:46:41 -07:00
Lee Thomason
0f9c021a44 Merge pull request #973 from davidoakley/fix-android-before-api24
Use fseek/ftell on Android when api level < 24
2024-04-20 19:34:58 -07:00
David Oakley
dfc20c5f8f Android SDK<24 doesn’t support fseeko/ftello
Fall back to using fseek/ftell;
This was broken by d9fb8d3443
2024-04-08 12:58:12 +01:00
3 changed files with 139 additions and 140 deletions

View File

@@ -1,6 +1,10 @@
cmake_minimum_required(VERSION 3.15) cmake_minimum_required(VERSION 3.15)
project(tinyxml2 VERSION 10.0.0) project(tinyxml2 VERSION 10.0.0)
if(NOT "${CMAKE_TOOLCHAIN_FILE}" STREQUAL "")
MESSAGE(STATUS "Using toolchain file: ${CMAKE_TOOLCHAIN_FILE}")
endif()
include(CTest) include(CTest)
option(tinyxml2_BUILD_TESTING "Build tests for tinyxml2" "${BUILD_TESTING}") option(tinyxml2_BUILD_TESTING "Build tests for tinyxml2" "${BUILD_TESTING}")

View File

@@ -7,7 +7,7 @@
// In HTML5, there are 16 so-called "void" elements. "void elements" NEVER have // In HTML5, there are 16 so-called "void" elements. "void elements" NEVER have
// inner content (but they MAY have attributes), and are assumed to be self-closing. // inner content (but they MAY have attributes), and are assumed to be self-closing.
// An example of a self-closig HTML5 element is "<br/>" (line break) // An example of a self-closing HTML5 element is "<br/>" (line break)
// All other elements are called "non-void" and MUST never self-close. // All other elements are called "non-void" and MUST never self-close.
// Examples: "<div class='lolcats'></div>". // Examples: "<div class='lolcats'></div>".

View File

@@ -106,14 +106,9 @@ distribution.
#elif defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__) || defined(__CYGWIN__) #elif defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__) || defined(__CYGWIN__)
#define TIXML_FSEEK fseeko #define TIXML_FSEEK fseeko
#define TIXML_FTELL ftello #define TIXML_FTELL ftello
#elif defined(__ANDROID__) #elif defined(__ANDROID__) && __ANDROID_API__ > 24
#if __ANDROID_API__ > 24 #define TIXML_FSEEK fseeko64
#define TIXML_FSEEK fseeko64 #define TIXML_FTELL ftello64
#define TIXML_FTELL ftello64
#else
#define TIXML_FSEEK fseeko
#define TIXML_FTELL ftello
#endif
#else #else
#define TIXML_FSEEK fseek #define TIXML_FSEEK fseek
#define TIXML_FTELL ftell #define TIXML_FTELL ftell
@@ -610,7 +605,7 @@ void XMLUtil::ToStr( int64_t v, char* buffer, int bufferSize )
void XMLUtil::ToStr( uint64_t v, char* buffer, int bufferSize ) void XMLUtil::ToStr( uint64_t v, char* buffer, int bufferSize )
{ {
// horrible syntax trick to make the compiler happy about %llu // horrible syntax trick to make the compiler happy about %llu
TIXML_SNPRINTF(buffer, bufferSize, "%llu", (long long)v); TIXML_SNPRINTF(buffer, bufferSize, "%llu", static_cast<unsigned long long>(v));
} }
bool XMLUtil::ToInt(const char* str, int* value) bool XMLUtil::ToInt(const char* str, int* value)