From 05018c64fd2da6d5ba54e087b852952980d5af65 Mon Sep 17 00:00:00 2001 From: "Tim J. Robbins" Date: Mon, 8 Jul 2002 05:36:24 +0000 Subject: [PATCH] Silence WARNS=4 by passing a non-const buffer to regerror(). Since it doesn't actually use the buffer when errbuf_size == 0, pass NULL. --- usr.bin/sed/misc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/sed/misc.c b/usr.bin/sed/misc.c index dbe7b5d68e0e..e04eae962da8 100644 --- a/usr.bin/sed/misc.c +++ b/usr.bin/sed/misc.c @@ -68,7 +68,7 @@ strregerror(errcode, preg) if (oe != NULL) free(oe); - s = regerror(errcode, preg, "", 0); + s = regerror(errcode, preg, NULL, 0); if ((oe = malloc(s)) == NULL) err(1, "malloc"); (void)regerror(errcode, preg, oe, s);