Commit 3b5331dd authored by Konstantin Belousov's avatar Konstantin Belousov
Browse files

uipc_shm: silent warnings about write-only variables in largepage code

In shm_largepage_phys_populate(), the result from vm_page_grab() is only
needed for assertion.

In shm_dotruncate_largepage(), there is a commented-out prototype code
for managed largepages.   The oldobjsz is saved for its sake, so mark
the variable as __unused directly.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
parent 3d277851
...@@ -267,7 +267,7 @@ static int ...@@ -267,7 +267,7 @@ static int
shm_largepage_phys_populate(vm_object_t object, vm_pindex_t pidx, shm_largepage_phys_populate(vm_object_t object, vm_pindex_t pidx,
int fault_type, vm_prot_t max_prot, vm_pindex_t *first, vm_pindex_t *last) int fault_type, vm_prot_t max_prot, vm_pindex_t *first, vm_pindex_t *last)
{ {
vm_page_t m; vm_page_t m __diagused;
int psind; int psind;
psind = object->un_pager.phys.data_val; psind = object->un_pager.phys.data_val;
...@@ -751,7 +751,8 @@ shm_dotruncate_largepage(struct shmfd *shmfd, off_t length, void *rl_cookie) ...@@ -751,7 +751,8 @@ shm_dotruncate_largepage(struct shmfd *shmfd, off_t length, void *rl_cookie)
{ {
vm_object_t object; vm_object_t object;
vm_page_t m; vm_page_t m;
vm_pindex_t newobjsz, oldobjsz; vm_pindex_t newobjsz;
vm_pindex_t oldobjsz __unused;
int aflags, error, i, psind, try; int aflags, error, i, psind, try;
KASSERT(length >= 0, ("shm_dotruncate: length < 0")); KASSERT(length >= 0, ("shm_dotruncate: length < 0"));
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment