Date: Mon, 28 Mar 2022 10:51:25 GMT From: Andrew Turner <andrew@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: f461b95561ff - main - Fix a sign mismatch warning in the physmem code Message-ID: <202203281051.22SApPaF017472@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=f461b95561fff9d7f39942f7a9aba37ba69ed1fe commit f461b95561fff9d7f39942f7a9aba37ba69ed1fe Author: Andrew Turner <andrew@FreeBSD.org> AuthorDate: 2022-03-28 10:29:42 +0000 Commit: Andrew Turner <andrew@FreeBSD.org> CommitDate: 2022-03-28 10:51:09 +0000 Fix a sign mismatch warning in the physmem code Make sure both sides of a comparison are unsigned. As the values being compared are size_t make the the value in the for loop size_t too. Sponsored by: The FreeBSD Foundation --- sys/kern/subr_physmem.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/kern/subr_physmem.c b/sys/kern/subr_physmem.c index 1cff1eb062c6..e3b85f387b55 100644 --- a/sys/kern/subr_physmem.c +++ b/sys/kern/subr_physmem.c @@ -95,7 +95,8 @@ long Maxmem; static void physmem_dump_tables(int (*prfunc)(const char *, ...)) { - int flags, i; + size_t i; + int flags; uintmax_t addr, size; const unsigned int mbyte = 1024 * 1024;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202203281051.22SApPaF017472>