From 5bfc3fea8188ca013881299c1a50d3e6402fc7be Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Tue, 3 Jun 2014 13:29:19 +0200 Subject: btrfs-progs: fix compiler warning gcc 4.9.0 gives a warning: array subscript is above array bounds Checking for "greater or equal" instead of just "equal" fixes this. The warning is a false positive, appears with -ftree-vrp, but we'd rather fix it to avoid noise during build. http://www.mail-archive.com/linux-btrfs%40vger.kernel.org/msg34338.html Signed-off-by: Christian Hesse Signed-off-by: David Sterba --- cmds-restore.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmds-restore.c') diff --git a/cmds-restore.c b/cmds-restore.c index b52d5c8..2f9b72d 100644 --- a/cmds-restore.c +++ b/cmds-restore.c @@ -176,7 +176,7 @@ again: break; } - if (level == BTRFS_MAX_LEVEL) + if (level >= BTRFS_MAX_LEVEL) return 1; slot = path->slots[level] + 1; -- cgit v1.2.1