mirror of
https://github.com/zeux/pugixml.git
synced 2025-01-14 01:47:55 +08:00
Merge pull request #620 from zeux/nostl-warnfix
Work around 'unreferenced function' warnings in NO_STL builds
This commit is contained in:
commit
2d42114ed1
@ -5054,6 +5054,14 @@ PUGI_IMPL_NS_BEGIN
|
|||||||
#if defined(PUGI_IMPL_MSVC_CRT_VERSION) || defined(__BORLANDC__) || (defined(__MINGW32__) && (!defined(__STRICT_ANSI__) || defined(__MINGW64_VERSION_MAJOR)))
|
#if defined(PUGI_IMPL_MSVC_CRT_VERSION) || defined(__BORLANDC__) || (defined(__MINGW32__) && (!defined(__STRICT_ANSI__) || defined(__MINGW64_VERSION_MAJOR)))
|
||||||
PUGI_IMPL_FN FILE* open_file_wide(const wchar_t* path, const wchar_t* mode)
|
PUGI_IMPL_FN FILE* open_file_wide(const wchar_t* path, const wchar_t* mode)
|
||||||
{
|
{
|
||||||
|
#ifdef PUGIXML_NO_STL
|
||||||
|
// ensure these symbols are consistently referenced to avoid 'unreferenced function' warnings
|
||||||
|
// note that generally these functions are used in STL builds, but PUGIXML_NO_STL leaves the only usage in convert_path_heap
|
||||||
|
(void)&as_utf8_begin;
|
||||||
|
(void)&as_utf8_end;
|
||||||
|
(void)&strlength_wide;
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(PUGI_IMPL_MSVC_CRT_VERSION) && PUGI_IMPL_MSVC_CRT_VERSION >= 1400
|
#if defined(PUGI_IMPL_MSVC_CRT_VERSION) && PUGI_IMPL_MSVC_CRT_VERSION >= 1400
|
||||||
FILE* file = NULL;
|
FILE* file = NULL;
|
||||||
return _wfopen_s(&file, path, mode) == 0 ? file : NULL;
|
return _wfopen_s(&file, path, mode) == 0 ? file : NULL;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user