summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/mplibdir/mp.w
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/texk/web2c/mplibdir/mp.w')
-rw-r--r--Build/source/texk/web2c/mplibdir/mp.w11
1 files changed, 2 insertions, 9 deletions
diff --git a/Build/source/texk/web2c/mplibdir/mp.w b/Build/source/texk/web2c/mplibdir/mp.w
index 279739f8569..69eeb571f8b 100644
--- a/Build/source/texk/web2c/mplibdir/mp.w
+++ b/Build/source/texk/web2c/mplibdir/mp.w
@@ -2960,15 +2960,8 @@ void *mp_xmalloc (MP mp, size_t nmem, size_t size) {
}
@ @<Internal library declarations@>=
-/*int mp_snprintf_res ;*/
-/* Some compilers (i.e. gcc 8.2.0 ) complained with the old */
-/* #define mp_snprintf (void)snprintf */
-/* about truncation. For the moment we store the result. */
-/*# define mp_snprintf mp_snprintf_res=snprintf */
-/* Now gcc 10 does't like common symbols, so we switch back */
-/* to the old define. */
-#define mp_snprintf (void)snprintf
-
+/* Avoid warning on format truncation */
+#define mp_snprintf(...) (snprintf(__VA_ARGS__) < 0 ? abort() : (void)0)
@* Dynamic memory allocation.