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


Groups > linux.kernel > #1202689

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

From Thierry Reding <thierry.reding@gmail.com>
Newsgroups linux.kernel
Subject [PATCH 3/4] selftests: vm: Use the right arguments for main()
Date 2015-08-07 15:50 +0200
Message-ID <pUQc1-152-7@gated-at.bofh.it> (permalink)
References <pUQc1-152-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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/

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

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

csiph-web