git: 37c9ff4adfbd - stable/13 - Fix a sign mismatch warning in the physmem code
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 19 Apr 2022 10:05:31 UTC
The branch stable/13 has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=37c9ff4adfbdda281071bb4690b954de45884f72 commit 37c9ff4adfbdda281071bb4690b954de45884f72 Author: Andrew Turner <andrew@FreeBSD.org> AuthorDate: 2022-03-28 10:29:42 +0000 Commit: Andrew Turner <andrew@FreeBSD.org> CommitDate: 2022-04-19 09:18:02 +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 (cherry picked from commit f461b95561fff9d7f39942f7a9aba37ba69ed1fe) --- 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 ea1ec12dd065..a4b865bed56d 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;