Skip to content

Commit

Permalink
[JFFS2] kill warning RE debug-only variables
Browse files Browse the repository at this point in the history
gcc emits the following warning on a 'allmodconfig' build:

fs/jffs2/xattr.c: In function ‘unrefer_xattr_datum’:
fs/jffs2/xattr.c:402: warning: unused variable ‘version’
fs/jffs2/xattr.c:402: warning: unused variable ‘xid’

Given that these variables are only used in the debug printk, and they
merely remove a deref, we can easily kill the warning by adding the
derefs to the debug printk.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
  • Loading branch information
Jeff Garzik authored and David Woodhouse committed Oct 4, 2006
1 parent 78b656b commit a6b1d82
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions fs/jffs2/xattr.c
Original file line number Diff line number Diff line change
Expand Up @@ -399,8 +399,6 @@ static void unrefer_xattr_datum(struct jffs2_sb_info *c, struct jffs2_xattr_datu
{
/* must be called under down_write(xattr_sem) */
if (atomic_dec_and_lock(&xd->refcnt, &c->erase_completion_lock)) {
uint32_t xid = xd->xid, version = xd->version;

unload_xattr_datum(c, xd);
xd->flags |= JFFS2_XFLAGS_DEAD;
if (xd->node == (void *)xd) {
Expand All @@ -411,7 +409,8 @@ static void unrefer_xattr_datum(struct jffs2_sb_info *c, struct jffs2_xattr_datu
}
spin_unlock(&c->erase_completion_lock);

dbg_xattr("xdatum(xid=%u, version=%u) was removed.\n", xid, version);
dbg_xattr("xdatum(xid=%u, version=%u) was removed.\n",
xd->xid, xd->version);
}
}

Expand Down

0 comments on commit a6b1d82

Please sign in to comment.