From 6c99b30197dbd2fec4f79d322d248f238834e43b Mon Sep 17 00:00:00 2001 From: krw Date: Sun, 6 Nov 2022 20:03:48 +0000 Subject: [PATCH] Nuke some 'set but not used' pathlen variables. ok beck@ --- usr.sbin/installboot/loongson_installboot.c | 5 ++--- usr.sbin/installboot/macppc_installboot.c | 5 ++--- usr.sbin/installboot/octeon_installboot.c | 5 ++--- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/usr.sbin/installboot/loongson_installboot.c b/usr.sbin/installboot/loongson_installboot.c index c0dd6a57f9e..4aeb26c812e 100644 --- a/usr.sbin/installboot/loongson_installboot.c +++ b/usr.sbin/installboot/loongson_installboot.c @@ -1,4 +1,4 @@ -/* $OpenBSD: loongson_installboot.c,v 1.9 2022/10/19 19:08:25 kn Exp $ */ +/* $OpenBSD: loongson_installboot.c,v 1.10 2022/11/06 20:03:48 krw Exp $ */ /* $NetBSD: installboot.c,v 1.5 1995/11/17 23:23:50 gwr Exp $ */ /* @@ -105,7 +105,7 @@ write_filesystem(struct disklabel *dl, char part) struct ufs_args args; char cmd[60]; char dst[PATH_MAX]; - size_t mntlen, pathlen; + size_t mntlen; int rslt; /* Create directory for temporary mount point. */ @@ -179,7 +179,6 @@ write_filesystem(struct disklabel *dl, char part) /* * Copy /usr/mdec/boot to /boot/boot. */ - pathlen = strlen(dst); if (strlcat(dst, "/boot", sizeof(dst)) >= sizeof(dst)) { rslt = -1; warn("unable to build /boot path"); diff --git a/usr.sbin/installboot/macppc_installboot.c b/usr.sbin/installboot/macppc_installboot.c index 877ae125882..bf31dbfb89a 100644 --- a/usr.sbin/installboot/macppc_installboot.c +++ b/usr.sbin/installboot/macppc_installboot.c @@ -1,4 +1,4 @@ -/* $OpenBSD: macppc_installboot.c,v 1.9 2022/11/06 12:33:41 krw Exp $ */ +/* $OpenBSD: macppc_installboot.c,v 1.10 2022/11/06 20:03:49 krw Exp $ */ /* * Copyright (c) 2011 Joel Sing @@ -166,7 +166,7 @@ write_filesystem(struct disklabel *dl, char part) struct msdosfs_args args; char cmd[60]; char dst[PATH_MAX]; - size_t mntlen, pathlen; + size_t mntlen; int rslt; /* Create directory for temporary mount point. */ @@ -220,7 +220,6 @@ write_filesystem(struct disklabel *dl, char part) /* * Copy /usr/mdec/ofwboot to $FS/ofwboot. */ - pathlen = strlen(dst); if (strlcat(dst, "/ofwboot", sizeof(dst)) >= sizeof(dst)) { rslt = -1; warn("unable to build /ofwboot path"); diff --git a/usr.sbin/installboot/octeon_installboot.c b/usr.sbin/installboot/octeon_installboot.c index 2b1fa4ea843..184129cae78 100644 --- a/usr.sbin/installboot/octeon_installboot.c +++ b/usr.sbin/installboot/octeon_installboot.c @@ -1,4 +1,4 @@ -/* $OpenBSD: octeon_installboot.c,v 1.9 2022/11/06 12:33:41 krw Exp $ */ +/* $OpenBSD: octeon_installboot.c,v 1.10 2022/11/06 20:03:49 krw Exp $ */ /* * Copyright (c) 2011 Joel Sing @@ -166,7 +166,7 @@ write_filesystem(struct disklabel *dl, char part) struct msdosfs_args args; char cmd[60]; char dst[PATH_MAX]; - size_t mntlen, pathlen; + size_t mntlen; int rslt; /* Create directory for temporary mount point. */ @@ -220,7 +220,6 @@ write_filesystem(struct disklabel *dl, char part) /* * Copy /usr/mdec/boot to /mnt/boot. */ - pathlen = strlen(dst); if (strlcat(dst, "/boot", sizeof(dst)) >= sizeof(dst)) { rslt = -1; warn("unable to build /boot path"); -- 2.20.1