Author: mckusick Date: Wed Sep 29 14:46:57 2010 New Revision: 213275 URL: http://svn.freebsd.org/changeset/base/213275
Log: 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 <[email protected]> Modified: head/sys/ufs/ffs/ffs_softdep.c Modified: head/sys/ufs/ffs/ffs_softdep.c ============================================================================== --- head/sys/ufs/ffs/ffs_softdep.c Wed Sep 29 14:41:03 2010 (r213274) +++ head/sys/ufs/ffs/ffs_softdep.c Wed Sep 29 14:46:57 2010 (r213275) @@ -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; _______________________________________________ [email protected] mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "[email protected]"
