1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-11-25 07:49:18 +00:00

Since local variable 'i' is used only in a KASSERT, declare and

initialize it only if INVARIANTS is defined to avoid a declared
but unused warning.

Suggested by: Brian Somers <brian@FreeBSD.org>
This commit is contained in:
Kirk McKusick 2010-09-29 14:46:57 +00:00
parent c5c0eabc00
commit e69bed360f
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=213275

View File

@ -2899,9 +2899,10 @@ complete_jseg(jseg)
struct worklist *wk;
struct jmvref *jmvref;
int waiting;
int i;
#ifdef INVARIANTS
int i = 0;
#endif
i = 0;
while ((wk = LIST_FIRST(&jseg->js_entries)) != NULL) {
WORKLIST_REMOVE(wk);
waiting = wk->wk_state & IOWAITING;