From 26aec11628a60a5ac92ba7a55e729b5d0138c85c Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Wed, 29 Feb 2012 08:39:50 +0400 Subject: tools: Change some functions declaration style from K-R to ANSI C * tools/add_gc_prefix.c (main): Remove unused "envp" argument. * tools/add_gc_prefix.c (main): Replace the K&R-style function definition with the ANSI C one. * tools/gcname.c (main): Likewise. --- tools/add_gc_prefix.c | 11 ++++------- tools/gcname.c | 8 ++++---- 2 files changed, 8 insertions(+), 11 deletions(-) (limited to 'tools') diff --git a/tools/add_gc_prefix.c b/tools/add_gc_prefix.c index ecf4ff45..ddc93371 100644 --- a/tools/add_gc_prefix.c +++ b/tools/add_gc_prefix.c @@ -1,19 +1,16 @@ # include # include -int main(argc, argv, envp) -int argc; -char ** argv; -char ** envp; +int main(int argc, char ** argv) { int i; for (i = 1; i < argc; i++) { if (GC_ALPHA_VERSION == GC_NOT_ALPHA) { - printf("gc%d.%d/%s ", GC_VERSION_MAJOR, GC_VERSION_MINOR, argv[i]); + printf("gc%d.%d/%s ", GC_VERSION_MAJOR, GC_VERSION_MINOR, argv[i]); } else { - printf("gc%d.%dalpha%d/%s ", GC_VERSION_MAJOR, - GC_VERSION_MINOR, GC_ALPHA_VERSION, argv[i]); + printf("gc%d.%dalpha%d/%s ", GC_VERSION_MAJOR, + GC_VERSION_MINOR, GC_ALPHA_VERSION, argv[i]); } } return(0); diff --git a/tools/gcname.c b/tools/gcname.c index 55b7c9fb..e8188ae2 100644 --- a/tools/gcname.c +++ b/tools/gcname.c @@ -1,13 +1,13 @@ #include #include -int main() +int main(void) { if (GC_ALPHA_VERSION == GC_NOT_ALPHA) { - printf("gc%d.%d", GC_VERSION_MAJOR, GC_VERSION_MINOR); + printf("gc%d.%d", GC_VERSION_MAJOR, GC_VERSION_MINOR); } else { - printf("gc%d.%dalpha%d", GC_VERSION_MAJOR, - GC_VERSION_MINOR, GC_ALPHA_VERSION); + printf("gc%d.%dalpha%d", GC_VERSION_MAJOR, + GC_VERSION_MINOR, GC_ALPHA_VERSION); } return 0; } -- cgit v1.2.1