Module Name: src Committed By: rillig Date: Sun Oct 6 19:31:26 UTC 2024
Modified Files: src/usr.bin/m4: misc.c src/usr.bin/mail: format.c Log Message: usr.bin: fix lint warning about "effectively discards 'const'" No binary change. To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/usr.bin/m4/misc.c cvs rdiff -u -r1.18 -r1.19 src/usr.bin/mail/format.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/usr.bin/m4/misc.c diff -u src/usr.bin/m4/misc.c:1.24 src/usr.bin/m4/misc.c:1.25 --- src/usr.bin/m4/misc.c:1.24 Sat Jan 16 17:01:22 2016 +++ src/usr.bin/m4/misc.c Sun Oct 6 19:31:26 2024 @@ -1,5 +1,5 @@ /* $OpenBSD: misc.c,v 1.41 2009/10/14 17:19:47 sthen Exp $ */ -/* $NetBSD: misc.c,v 1.24 2016/01/16 17:01:22 christos Exp $ */ +/* $NetBSD: misc.c,v 1.25 2024/10/06 19:31:26 rillig Exp $ */ /* * Copyright (c) 1989, 1993 @@ -36,7 +36,7 @@ #include "nbtool_config.h" #endif #include <sys/cdefs.h> -__RCSID("$NetBSD: misc.c,v 1.24 2016/01/16 17:01:22 christos Exp $"); +__RCSID("$NetBSD: misc.c,v 1.25 2024/10/06 19:31:26 rillig Exp $"); #include <sys/types.h> #include <errno.h> #include <unistd.h> @@ -71,7 +71,7 @@ unsigned char *endpbb; /* end of push- ptrdiff_t indx(const char *s1, const char *s2) { - char *t; + const char *t; t = strstr(s1, s2); if (t == NULL) Index: src/usr.bin/mail/format.c diff -u src/usr.bin/mail/format.c:1.18 src/usr.bin/mail/format.c:1.19 --- src/usr.bin/mail/format.c:1.18 Fri Sep 8 14:34:02 2023 +++ src/usr.bin/mail/format.c Sun Oct 6 19:31:26 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: format.c,v 1.18 2023/09/08 14:34:02 shm Exp $ */ +/* $NetBSD: format.c,v 1.19 2024/10/06 19:31:26 rillig Exp $ */ /*- * Copyright (c) 2006 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include <sys/cdefs.h> #ifndef __lint__ -__RCSID("$NetBSD: format.c,v 1.18 2023/09/08 14:34:02 shm Exp $"); +__RCSID("$NetBSD: format.c,v 1.19 2024/10/06 19:31:26 rillig Exp $"); #endif /* not __lint__ */ #include <time.h> @@ -138,7 +138,7 @@ sfmtdepth(char *str, int depth) static const char * sfmtfield(const char **fmtbeg, const char *fmtch, struct message *mp) { - char *q; + const char *q; q = strchr(fmtch + 1, '?'); if (q) { size_t len; @@ -270,7 +270,7 @@ sfmtflag(const char **fmtbeg, const char static const char * login_name(const char *addr) { - char *p; + const char *p; p = strchr(addr, '@'); if (p) { char *q;