git: bc74e50cdf14 - stable/12 - Revert "df: remove the unused fstype var"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 22 Mar 2023 22:28:30 UTC
The branch stable/12 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=bc74e50cdf14f85c5b9bf97c3bae6bfcffe58c77 commit bc74e50cdf14f85c5b9bf97c3bae6bfcffe58c77 Author: John Baldwin <jhb@FreeBSD.org> AuthorDate: 2023-03-22 02:55:00 +0000 Commit: John Baldwin <jhb@FreeBSD.org> CommitDate: 2023-03-22 02:55:00 +0000 Revert "df: remove the unused fstype var" This reverts commit 647f70e6bf4213f3a892277fcafe2c36d81aa3a5. fstype is used in a call to build_iovec_argf() in this branch, and the reverted commit didn't remove the variable, just its initialization. This is a direct commit to stable/12. Reported by: GCC -Wmaybe-uninitialized --- bin/df/df.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bin/df/df.c b/bin/df/df.c index 12b6eee0e2cf..fa52eef40098 100644 --- a/bin/df/df.c +++ b/bin/df/df.c @@ -141,6 +141,7 @@ main(int argc, char *argv[]) int iovlen = 0; #endif + fstype = "ufs"; (void)setlocale(LC_ALL, ""); memset(&maxwidths, 0, sizeof(maxwidths)); memset(&totalbuf, 0, sizeof(totalbuf)); @@ -209,6 +210,7 @@ main(int argc, char *argv[]) case 't': if (vfslist_t != NULL) xo_errx(1, "only one -t option may be specified"); + fstype = optarg; vfslist_t = makevfslist(optarg, &skipvfs_t); break; case 'T':