Fix Xcode 14 sprintf deprecation warning
Showing 1 of 3 files from the diff.
Newly tracked file
src/pugixml.cpp
changed.
Other files ignored by Codecov
tests/test_dom_traverse.cpp
has changed.
tests/test_document.cpp
has changed.
@@ -143,6 +143,8 @@
Loading
143 | 143 | # define PUGI__SNPRINTF(buf, ...) snprintf(buf, sizeof(buf), __VA_ARGS__) |
|
144 | 144 | #elif defined(PUGI__MSVC_CRT_VERSION) && PUGI__MSVC_CRT_VERSION >= 1400 |
|
145 | 145 | # define PUGI__SNPRINTF(buf, ...) _snprintf_s(buf, _countof(buf), _TRUNCATE, __VA_ARGS__) |
|
146 | + | #elif defined(__APPLE__) && __clang_major__ >= 14 // Xcode 14 marks sprintf as deprecated while still using C++98 by default |
|
147 | + | # define PUGI__SNPRINTF(buf, fmt, arg1, arg2) snprintf(buf, sizeof(buf), fmt, arg1, arg2) |
|
146 | 148 | #else |
|
147 | 149 | # define PUGI__SNPRINTF sprintf |
|
148 | 150 | #endif |
Files | Coverage |
---|---|
src/pugixml.cpp | 99.57% |
Project Totals (1 files) | 99.57% |
3406402161
3406402161
3406402161
3406402161
3406402161
3406402161
3406402161
3406402161
7w0ydx6sn6ba53xg
7w0ydx6sn6ba53xg
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file.
The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files.
The size and color of each slice is representing the number of statements and the coverage, respectively.