X-Git-Url: https://git.saurik.com/apple/libc.git/blobdiff_plain/e07eda1a0324f771bb1ed20ef94f3229005ee46c..refs/heads/master:/stdio/FreeBSD/vfprintf.c?ds=sidebyside diff --git a/stdio/FreeBSD/vfprintf.c b/stdio/FreeBSD/vfprintf.c index ff6162c..cf51045 100644 --- a/stdio/FreeBSD/vfprintf.c +++ b/stdio/FreeBSD/vfprintf.c @@ -30,7 +30,13 @@ * SUCH DAMAGE. */ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wint-conversion" + +#include +#if !TARGET_OS_DRIVERKIT #define OS_CRASH_ENABLE_EXPERIMENTAL_LIBTRACE 1 +#endif #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)vfprintf.c 8.1 (Berkeley) 6/4/93"; @@ -870,7 +876,11 @@ fp_common: static_format_checked = __printf_is_memory_read_only((void*)fmt0, strlen(fmt0)); } if (!static_format_checked) { +#if OS_CRASH_ENABLE_EXPERIMENTAL_LIBTRACE os_crash("%%n used in a non-immutable format string: %s", fmt0); +#else + os_crash("%%n used in a non-immutable format string"); +#endif } #endif // ALLOW_DYNAMIC_PERCENT_N @@ -1448,4 +1458,4 @@ error: return (ret < 0 || ret >= INT_MAX) ? -1 : (int)ret; /* NOTREACHED */ } - +#pragma clang diagnostic pop