From 3c58d786728f02a5a0c98d19923623d3749d5968 Mon Sep 17 00:00:00 2001 From: patacongo Date: Fri, 26 Jun 2009 01:45:42 +0000 Subject: [PATCH] There is no envp argument in main() git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1959 42af7a65-404d-4744-a932-0658087f49c3 --- examples/nxflat/tests/errno/errno.c | 2 +- examples/nxflat/tests/hello++/hello++1.cpp | 2 +- examples/nxflat/tests/hello++/hello++2.cpp | 2 +- examples/nxflat/tests/hello++/hello++3.cpp | 2 +- examples/nxflat/tests/hello++/hello++4.cpp | 2 +- examples/nxflat/tests/hello/hello.c | 13 +------------ examples/nxflat/tests/longjmp/longjmp.c | 2 +- examples/nxflat/tests/mutex/mutex.c | 2 +- examples/nxflat/tests/pthread/pthread.c | 2 +- examples/nxflat/tests/signal/signal.c | 2 +- examples/nxflat/tests/struct/struct_main.c | 2 +- 11 files changed, 11 insertions(+), 22 deletions(-) diff --git a/examples/nxflat/tests/errno/errno.c b/examples/nxflat/tests/errno/errno.c index 3c54de7be9..b066791650 100644 --- a/examples/nxflat/tests/errno/errno.c +++ b/examples/nxflat/tests/errno/errno.c @@ -51,7 +51,7 @@ static const char g_nonexistent[] = "aflav-sautga-ay"; * Public Functions ****************************************************************************/ -int main(int argc, char **argv, char **envp) +int main(int argc, char **argv) { FILE *test_stream; diff --git a/examples/nxflat/tests/hello++/hello++1.cpp b/examples/nxflat/tests/hello++/hello++1.cpp index a8881422cc..779f3307a7 100644 --- a/examples/nxflat/tests/hello++/hello++1.cpp +++ b/examples/nxflat/tests/hello++/hello++1.cpp @@ -53,7 +53,7 @@ // Public Functions ///////////////////////////////////////////////////////////////////////////// -int main(int argc, char **argv, char **envp) +int main(int argc, char **argv) { printf("Hello, World!\n"); return 0; diff --git a/examples/nxflat/tests/hello++/hello++2.cpp b/examples/nxflat/tests/hello++/hello++2.cpp index 3b03bbb0d8..87166f3ab2 100644 --- a/examples/nxflat/tests/hello++/hello++2.cpp +++ b/examples/nxflat/tests/hello++/hello++2.cpp @@ -90,7 +90,7 @@ public: // Public Functions ///////////////////////////////////////////////////////////////////////////// -int main(int argc, char **argv, char **envp) +int main(int argc, char **argv) { CThingSayer *MyThingSayer; diff --git a/examples/nxflat/tests/hello++/hello++3.cpp b/examples/nxflat/tests/hello++/hello++3.cpp index 236f5def0b..ed7302fa65 100644 --- a/examples/nxflat/tests/hello++/hello++3.cpp +++ b/examples/nxflat/tests/hello++/hello++3.cpp @@ -104,7 +104,7 @@ void CThingSayer::SayThing(void) // Public Functions ///////////////////////////////////////////////////////////////////////////// -int main(int argc, char **argv, char **envp) +int main(int argc, char **argv) { // We should see the message from constructor, CThingSayer::CThingSayer(), // BEFORE we see the following messages. That is proof that the diff --git a/examples/nxflat/tests/hello++/hello++4.cpp b/examples/nxflat/tests/hello++/hello++4.cpp index 60c8b2a45c..97d0260937 100644 --- a/examples/nxflat/tests/hello++/hello++4.cpp +++ b/examples/nxflat/tests/hello++/hello++4.cpp @@ -122,7 +122,7 @@ void CThingSayer::SayThing(void) // Public Functions ///////////////////////////////////////////////////////////////////////////// -int main(int argc, char **argv, char **envp) +int main(int argc, char **argv) { // We should see the message from constructor, CThingSayer::CThingSayer(), // BEFORE we see the following messages. That is proof that the diff --git a/examples/nxflat/tests/hello/hello.c b/examples/nxflat/tests/hello/hello.c index d951d1565b..028bdfe007 100644 --- a/examples/nxflat/tests/hello/hello.c +++ b/examples/nxflat/tests/hello/hello.c @@ -44,7 +44,7 @@ * Public Functions ****************************************************************************/ -int main(int argc, char **argv, char **envp) +int main(int argc, char **argv) { int i; @@ -73,17 +73,6 @@ int main(int argc, char **argv, char **envp) } printf("argv[%d]\t= 0x%p\n", argc, argv[argc]); - - /* Print environment variables */ - - printf("envp\t= 0x%p\n", envp); - - for (i = 0; envp[i] != NULL; i++) - { - printf("envp[%d]\t= (0x%p) \"%s\"\n", i, envp[i], envp[i]); - } - printf("envp[%d]\t= 0x%p\n", i, envp[i]); - printf("Goodbye, world!\n"); return 0; } diff --git a/examples/nxflat/tests/longjmp/longjmp.c b/examples/nxflat/tests/longjmp/longjmp.c index a896fb13cf..b5b317d996 100644 --- a/examples/nxflat/tests/longjmp/longjmp.c +++ b/examples/nxflat/tests/longjmp/longjmp.c @@ -98,7 +98,7 @@ static int function(int some_arg) * Public Functions ****************************************************************************/ -int main(int argc, char **argv, char **envp) +int main(int argc, char **argv) { int value; diff --git a/examples/nxflat/tests/mutex/mutex.c b/examples/nxflat/tests/mutex/mutex.c index 1553f0487c..f161eb7fa7 100644 --- a/examples/nxflat/tests/mutex/mutex.c +++ b/examples/nxflat/tests/mutex/mutex.c @@ -92,7 +92,7 @@ static void thread_func(void *parameter) * Public Functions ****************************************************************************/ -int main(int argc, char **argv, char **envp) +int main(int argc, char **argv) { pthread_t thread1, thread2; diff --git a/examples/nxflat/tests/pthread/pthread.c b/examples/nxflat/tests/pthread/pthread.c index a3977b3fc6..1cccfa0558 100644 --- a/examples/nxflat/tests/pthread/pthread.c +++ b/examples/nxflat/tests/pthread/pthread.c @@ -94,7 +94,7 @@ static void *child_start_routine(void *arg) * Public Functions ****************************************************************************/ -int main(int argc, char **argv, char **envp) +int main(int argc, char **argv) { pthread_attr_t attr; pthread_t thread; diff --git a/examples/nxflat/tests/signal/signal.c b/examples/nxflat/tests/signal/signal.c index 52fc206d9b..ff845ec10d 100644 --- a/examples/nxflat/tests/signal/signal.c +++ b/examples/nxflat/tests/signal/signal.c @@ -133,7 +133,7 @@ static void sigusr2_sighandler(int signo) * Name: main ****************************************************************************/ -int main(int argc, char **argv, char **envp) +int main(int argc, char **argv) { struct sigaction act; struct sigaction oact; diff --git a/examples/nxflat/tests/struct/struct_main.c b/examples/nxflat/tests/struct/struct_main.c index 61c6558299..b86fd50fab 100644 --- a/examples/nxflat/tests/struct/struct_main.c +++ b/examples/nxflat/tests/struct/struct_main.c @@ -57,7 +57,7 @@ int dummy_scalar = DUMMY_SCALAR_VALUE2; * Public Functions ****************************************************************************/ -int main(int argc, char **argv, char **envp) +int main(int argc, char **argv) { const struct struct_s *mystruct = getstruct();