about summary refs log tree commit diff
path: root/stdio-common
diff options
context:
space:
mode:
authorAndreas Jaeger <aj@suse.de>2000-12-15 16:03:57 +0000
committerAndreas Jaeger <aj@suse.de>2000-12-15 16:03:57 +0000
commit1a511d31055bb3fe7638b043d5c5c57d929c51cd (patch)
treecb2307942b7ef0ca15763b48ef40911198903523 /stdio-common
parent8ab5926a261825b43c8ce82b4c64541448b73869 (diff)
downloadglibc-1a511d31055bb3fe7638b043d5c5c57d929c51cd.tar.gz
glibc-1a511d31055bb3fe7638b043d5c5c57d929c51cd.tar.xz
glibc-1a511d31055bb3fe7638b043d5c5c57d929c51cd.zip
Update.
2000-12-15  Andreas Jaeger  <aj@suse.de>

	* stdio-common/scanf9.c (main): Reformat and change to avoid
	warnings.

	* stdio-common/tstdiomisc.c: Make local functions static.
	* stdio-common/tst-printf.c: Likewise.

	* elf/constload2.c: Add prototype declarations to shut up gcc.
	* elf/dep1.c: Likewise.
	* elf/dep2.c: Likewise.
	* elf/dep3.c: Likewise.
	* elf/dep4.c: Likewise.
	* elf/ltglobmod2.c: Likewise.

	* libio/fmemopen.c: Make local functions static.

	* elf/Makefile (distribute): Added testobj.h.

	* elf/testobj.h: New file.

	* elf/testobj1.c: Include testobj.h and move prototype
	declarations to testobj.h.
	* elf/testobj2.c: Likewise.
	* elf/testobj3.c: Likewise.
	* elf/testobj4.c: Likewise.
	* elf/testobj5.c: Likewise.
	* elf/testobj6.c: Likewise.
	* elf/testobj1_1.c: Likewise.
	* elf/preloadtest.c: Likewise.
Diffstat (limited to 'stdio-common')
-rw-r--r--stdio-common/scanf9.c31
-rw-r--r--stdio-common/tst-printf.c16
-rw-r--r--stdio-common/tstdiomisc.c6
3 files changed, 30 insertions, 23 deletions
diff --git a/stdio-common/scanf9.c b/stdio-common/scanf9.c
index 52bff08e18..7aca354d2a 100644
--- a/stdio-common/scanf9.c
+++ b/stdio-common/scanf9.c
@@ -2,22 +2,29 @@
 #include <stdlib.h>
 #include <string.h>
 
-int  main(int argc, char *argv[])  {
-  int  matches;
-  char  str[10];
+int
+main (void)
+{
+  int matches;
+  char str[10];
 
   str[0] = '\0';
   matches = -9;
-  matches = sscanf("x ]", "%[^] ]", str);
-  printf("Matches = %d, string str = \"%s\".\n", matches, str);
-  printf("str should be \"x\".\n");
-  if (strcmp (str, "x")) abort ();
+  matches = sscanf ("x ]", "%[^] ]", str);
+  printf ("Matches = %d, string str = \"%s\".\n", matches, str);
+  printf ("str should be \"x\".\n");
+
+  if (strcmp (str, "x"))
+    abort ();
+
   str[0] = '\0';
   matches = -9;
-  matches = sscanf(" ] x", "%[] ]", str);
-  printf("Matches = %d, string str = \"%s\".\n", matches, str);
-  printf("str should be \" ] \".\n");
-  if (strcmp (str, " ] ")) abort ();
-  exit(0);
+  matches = sscanf (" ] x", "%[] ]", str);
+  printf ("Matches = %d, string str = \"%s\".\n", matches, str);
+  printf ("str should be \" ] \".\n");
+
+  if (strcmp (str, " ] "))
+    abort ();
+
   return 0;
 }
diff --git a/stdio-common/tst-printf.c b/stdio-common/tst-printf.c
index f0f0e55bc4..7a99efc6c9 100644
--- a/stdio-common/tst-printf.c
+++ b/stdio-common/tst-printf.c
@@ -28,11 +28,11 @@
 
 #include <float.h>
 
-void rfg1 (void);
-void rfg2 (void);
+static void rfg1 (void);
+static void rfg2 (void);
 
 
-void
+static void
 fmtchk (const char *fmt)
 {
   (void) fputs(fmt, stdout);
@@ -41,7 +41,7 @@ fmtchk (const char *fmt)
   (void) printf("'\n");
 }
 
-void
+static void
 fmtst1chk (const char *fmt)
 {
   (void) fputs(fmt, stdout);
@@ -50,7 +50,7 @@ fmtst1chk (const char *fmt)
   (void) printf("'\n");
 }
 
-void
+static void
 fmtst2chk (const char *fmt)
 {
   (void) fputs(fmt, stdout);
@@ -82,7 +82,7 @@ fmtst2chk (const char *fmt)
  * This exercises the output formatting code.
  */
 
-void
+static void
 fp_test (void)
 {
   int i, j, k, l;
@@ -292,7 +292,7 @@ I am ready for my first lesson today.";
   return result != 0;
 }
 
-void
+static void
 rfg1 (void)
 {
   char buf[100];
@@ -317,7 +317,7 @@ rfg1 (void)
     printf ("got: '%s', expected: '%s'\n", buf, "3E+01");
 }
 
-void
+static void
 rfg2 (void)
 {
   int prec;
diff --git a/stdio-common/tstdiomisc.c b/stdio-common/tstdiomisc.c
index 55d77b0f29..452a21f9cb 100644
--- a/stdio-common/tstdiomisc.c
+++ b/stdio-common/tstdiomisc.c
@@ -4,7 +4,7 @@
 #include <string.h>
 #include <wchar.h>
 
-int
+static int
 t1 (void)
 {
   int n = -1;
@@ -14,7 +14,7 @@ t1 (void)
   return n != 5;
 }
 
-int
+static int
 t2 (void)
 {
   int result = 0;
@@ -46,7 +46,7 @@ t2 (void)
   return result;
 }
 
-int
+static int
 F (void)
 {
   char buf[20];