git: 01112a1711f3 - main - libmd: tests: raise WARNS to the default

From: Kyle Evans <kevans_at_FreeBSD.org>
Date: Mon, 30 Sep 2024 03:36:09 UTC
The branch main has been updated by kevans:

URL: https://cgit.FreeBSD.org/src/commit/?id=01112a1711f3b7f329d84f7946ee0b8cdd1872c9

commit 01112a1711f3b7f329d84f7946ee0b8cdd1872c9
Author:     Kyle Evans <kevans@FreeBSD.org>
AuthorDate: 2022-03-08 17:20:09 +0000
Commit:     Kyle Evans <kevans@FreeBSD.org>
CommitDate: 2024-09-30 03:34:20 +0000

    libmd: tests: raise WARNS to the default
    
    The drivers just had a small issue, passing a literal string as
    non-const.  Fix it and lift WARNS.
    
    PR:             280784 (exp-run)
    Reviewed by:    delphij, emaste
    Differential Revision:  https://reviews.freebsd.org/D34501
---
 lib/libmd/tests/Makefile      | 3 ---
 lib/libmd/tests/mddriver.c    | 4 ++--
 lib/libmd/tests/rmddriver.c   | 4 ++--
 lib/libmd/tests/shadriver.c   | 2 +-
 lib/libmd/tests/skeindriver.c | 2 +-
 5 files changed, 6 insertions(+), 9 deletions(-)

diff --git a/lib/libmd/tests/Makefile b/lib/libmd/tests/Makefile
index fa8f2fc4f7f6..e11e8e1bf154 100644
--- a/lib/libmd/tests/Makefile
+++ b/lib/libmd/tests/Makefile
@@ -2,9 +2,6 @@
 
 PACKAGE=	tests
 
-# XXX
-WARNS=	0
-
 ATF_TESTS_SH=	libmd_test
 
 MDTESTS=	md rmd sha skein
diff --git a/lib/libmd/tests/mddriver.c b/lib/libmd/tests/mddriver.c
index 47ff87663bff..1229a4e2929f 100644
--- a/lib/libmd/tests/mddriver.c
+++ b/lib/libmd/tests/mddriver.c
@@ -37,8 +37,8 @@
 #endif
 
 /* Digests a string and prints the result. */
-static void 
-MDString(char *string)
+static void
+MDString(const char *string)
 {
 	char buf[33];
 
diff --git a/lib/libmd/tests/rmddriver.c b/lib/libmd/tests/rmddriver.c
index 3c37c2866bfd..50227dcffb5d 100644
--- a/lib/libmd/tests/rmddriver.c
+++ b/lib/libmd/tests/rmddriver.c
@@ -20,8 +20,8 @@
 #include "ripemd.h"
 
 /* Digests a string and prints the result. */
-static void 
-RIPEMD160String(char *string)
+static void
+RIPEMD160String(const char *string)
 {
 	char buf[2*20 + 1];
 
diff --git a/lib/libmd/tests/shadriver.c b/lib/libmd/tests/shadriver.c
index 42d57ed2016f..85cb21185bc8 100644
--- a/lib/libmd/tests/shadriver.c
+++ b/lib/libmd/tests/shadriver.c
@@ -58,7 +58,7 @@
 
 /* Digests a string and prints the result. */
 static void
-SHAString(char *string)
+SHAString(const char *string)
 {
 	char buf[2*64 + 1];
 
diff --git a/lib/libmd/tests/skeindriver.c b/lib/libmd/tests/skeindriver.c
index 874f0c17e500..a28ac8fc2c2a 100644
--- a/lib/libmd/tests/skeindriver.c
+++ b/lib/libmd/tests/skeindriver.c
@@ -41,7 +41,7 @@
 
 /* Digests a string and prints the result. */
 static void
-SKEINString(char *string)
+SKEINString(const char *string)
 {
 	char buf[2*128 + 1];