summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2012-07-31 10:09:33 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2012-07-31 10:09:33 +0000
commit346e9b6e425ab35119d28313700964ed5076aa34 (patch)
treed8430c41580fa7e923169be167740c2e47b77834 /Build/source/texk/web2c
parent14ac1a5b413c96f4fcaf434ebfd28d620448e01b (diff)
luaTeX: Handle return value from broken (pre-C99) snprintf()
git-svn-id: svn://tug.org/texlive/trunk@27267 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c')
-rw-r--r--Build/source/texk/web2c/luatexdir/ChangeLog5
-rw-r--r--Build/source/texk/web2c/luatexdir/lua/luastuff.w2
-rw-r--r--Build/source/texk/web2c/luatexdir/pdf/pdfpage.w2
3 files changed, 7 insertions, 2 deletions
diff --git a/Build/source/texk/web2c/luatexdir/ChangeLog b/Build/source/texk/web2c/luatexdir/ChangeLog
index 3dc50a4d6c0..0d796d7eb39 100644
--- a/Build/source/texk/web2c/luatexdir/ChangeLog
+++ b/Build/source/texk/web2c/luatexdir/ChangeLog
@@ -1,3 +1,8 @@
+2012-07-31 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * pdf/pdfpage.w (print_pdffloat): Cope with broken snprintf().
+ * lua/luastuff.w (luatex_error): Drop snprintf() return value.
+
2012-07-28 Peter Breitenlohner <peb@mppmu.mpg.de>
* lua/luainit.w (lua_initialize): Avoid using asprintf().
diff --git a/Build/source/texk/web2c/luatexdir/lua/luastuff.w b/Build/source/texk/web2c/luatexdir/lua/luastuff.w
index 8a43555fae6..510f2607214 100644
--- a/Build/source/texk/web2c/luatexdir/lua/luastuff.w
+++ b/Build/source/texk/web2c/luatexdir/lua/luastuff.w
@@ -476,7 +476,7 @@ lua_State *luatex_error(lua_State * L, int is_fatal)
if (lua_isstring(L, -1)) {
luaerr = lua_tolstring(L, -1, &len);
err = (char *) xmalloc((unsigned) (len + 1));
- len = (size_t) snprintf(err, (len + 1), "%s", luaerr);
+ snprintf(err, (len + 1), "%s", luaerr);
}
if (is_fatal > 0) {
/* Normally a memory error from lua.
diff --git a/Build/source/texk/web2c/luatexdir/pdf/pdfpage.w b/Build/source/texk/web2c/luatexdir/pdf/pdfpage.w
index 15d90288ea9..75597439e95 100644
--- a/Build/source/texk/web2c/luatexdir/pdf/pdfpage.w
+++ b/Build/source/texk/web2c/luatexdir/pdf/pdfpage.w
@@ -173,7 +173,7 @@ void print_pdffloat(PDF pdf, pdffloat f)
if (l != 0) {
pdf_puts(pdf, ".");
j = snprintf(a, 23, "%ld", l + ten_pow[e]);
- assert(j < 23);
+ assert((unsigned)j < 23);
for (i = e; i > 0; i--) {
if (a[i] != '0')
break;