Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1202689 > unrolled thread

[PATCH 3/4] selftests: vm: Use the right arguments for main()

Started byThierry Reding <thierry.reding@gmail.com>
First post2015-08-07 15:50 +0200
Last post2015-08-07 15:50 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 3/4] selftests: vm: Use the right arguments for main() Thierry Reding <thierry.reding@gmail.com> - 2015-08-07 15:50 +0200

#1202689 — [PATCH 3/4] selftests: vm: Use the right arguments for main()

FromThierry Reding <thierry.reding@gmail.com>
Date2015-08-07 15:50 +0200
Subject[PATCH 3/4] selftests: vm: Use the right arguments for main()
Message-ID<pUQc1-152-7@gated-at.bofh.it>
From: Thierry Reding <treding@nvidia.com>

The prototype for the main() function is:

	int main(int argc, char **argv);

but the mlock2-tests test program lists the arguments in the wrong
order. It gets away with this because the arguments are never used. Fix
it nevertheless to keep recent versions of GCC from complaining.

Signed-off-by: Thierry Reding <treding@nvidia.com>
---
 tools/testing/selftests/vm/mlock2-tests.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/vm/mlock2-tests.c b/tools/testing/selftests/vm/mlock2-tests.c
index 2949fd949973..af4bc752797d 100644
--- a/tools/testing/selftests/vm/mlock2-tests.c
+++ b/tools/testing/selftests/vm/mlock2-tests.c
@@ -643,7 +643,7 @@ static int test_mlockall(int (test_function)(bool call_mlock))
 	return ret;
 }
 
-int main(char **argv, int argc)
+int main(int argc, char **argv)
 {
 	int ret = 0;
 	ret += test_mlock_lock();
-- 
2.4.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web