gcc 14.2.1 warned that output_text() could be calling memcpy() with
output_cursor NULL and length non-zero, after a call to
make_room_for(). But this is a false positive: if output_cursor is
NULL after make_room_for(), it is because the diversion switched over
to an active output_file.
* src/output.c (output_text): Add assertion to silence gcc.
---
src/output.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/output.c b/src/output.c
index 3e26f6d3..84f1513e 100644
--- a/src/output.c
+++ b/src/output.c
@@ -578,6 +578,7 @@ output_text (const char *text, int length)
}
else
{
+ assert (output_cursor);
memcpy (output_cursor, text, (size_t) length);
output_cursor += length;
output_unused -= length;
--
2.48.1
_______________________________________________
M4-patches mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/m4-patches