Skip to contentSkip to conversation

mm/mmstress: Fix warnings.

PATCH New Cyril Hrubis 1 participant 1 message Sep 1, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mm/mmstress: Fix warnings.

---
 testcases/kernel/mem/mtest05/mmstress.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
testcases/kernel/mem/mtest05/mmstress.c +3 -2
index e91736cf7..4d8efdb6b 100644
@@ -631,7 +631,8 @@ static void run_test(unsigned int i)
 int main(int argc, char **argv)
 {
 	static char *version_info = "mmstress V1.00 04/17/2001";
-	int ch, i;
+	int ch;
+	unsigned int i;
 	int test_num = 0;
 	int test_time = 0;
 	int run_once = TRUE;
@@ -708,7 +709,7 @@ int main(int argc, char **argv)
 			for (i = 0; i < ARRAY_SIZE(test_ptr); i++)
 				run_test(i);
 		} else {
-			if (test_num > ARRAY_SIZE(test_ptr)) {
+			if (test_num > (int)ARRAY_SIZE(test_ptr)) {
 				tst_brkm(TBROK, NULL, "Invalid test number %i",
 					 test_num);
 			}
Signature · 1 line
2.13.0