+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.
+
2000-12-15 Ben Collins <bcollins@debian.org>
* misc/sys/cdefs.h: Fix thinko in checks for flexarr macros.
reldepmod1.c reldepmod2.c reldepmod3.c reldepmod4.c \
nextmod1.c nextmod2.c pathoptobj.c tst-pathopt.sh \
neededobj1.c neededobj2.c neededobj3.c neededobj4.c \
- unload2mod.c unload2dep.c ltglobmod1.c ltglobmod2.c
+ unload2mod.c unload2dep.c ltglobmod1.c ltglobmod2.c \
+ testobj.h
include ../Makeconfig
#include <stdlib.h>
extern int bar (void);
+extern int baz (void);
+extern int foo (void);
void *h;
#include <unistd.h>
+extern int dep1 (void);
extern int dep2 (void);
extern int dep4 (void);
#include <unistd.h>
+extern int dep2 (void);
extern int dep3 (void);
extern int dep4 (void);
#include <unistd.h>
+extern int dep3 (void);
+
static void
__attribute__ ((constructor))
init (void)
#include <unistd.h>
extern int dep3 (void);
+extern int dep4 (void);
static void
__attribute__ ((constructor))
#include <stdlib.h>
extern int bar (void);
+extern int foo (void);
int
foo (void)
#include <stdio.h>
-extern int preload (int);
+#include "testobj.h"
int
main (void)
return res != 92;
}
-extern int foo (int a);
int
foo (int a)
{
--- /dev/null
+extern int preload (int a);
+
+extern int foo (int);
+
+extern int obj1func1 (int);
+
+extern int obj1func2 (int);
+
+extern int obj2func1 (int);
+
+extern int obj2func2 (int);
+
+extern int obj3func1 (int);
+
+extern int obj3func2 (int);
+
+extern int obj4func1 (int);
+
+extern int obj4func2 (int);
+
+extern int obj5func1 (int);
+
+extern int obj5func2 (int);
+
+extern int obj6func1 (int);
+
+extern int obj6func2 (int);
+
#include <dlfcn.h>
#include <stdlib.h>
-extern int foo (int);
+#include "testobj.h"
int
obj1func1 (int a __attribute__ ((unused)))
-extern int obj1func2 (int);
+#include "testobj.h"
int
obj1func1 (int a)
#include <dlfcn.h>
#include <stdlib.h>
-extern int obj1func1 (int);
+#include "testobj.h"
int
obj2func1 (int a __attribute__ ((unused)))
#include <dlfcn.h>
#include <stdlib.h>
-extern int foo (int);
+#include "testobj.h"
+
int
obj3func1 (int a __attribute__ ((unused)))
#include <dlfcn.h>
#include <stdlib.h>
-extern int foo (int);
+#include "testobj.h"
int
obj4func1 (int a __attribute__ ((unused)))
#include <dlfcn.h>
#include <stdlib.h>
-extern int foo (int);
+#include "testobj.h"
+
int
obj5func1 (int a __attribute__ ((unused)))
-extern int foo (int);
+#include "testobj.h"
int
obj6func1 (int a __attribute__ ((unused)))
};
-ssize_t
+static ssize_t
fmemopen_read (void *cookie, char *b, size_t s)
{
fmemopen_cookie_t *c;
}
-ssize_t
+static ssize_t
fmemopen_write (void *cookie, const char *b, size_t s)
{
fmemopen_cookie_t *c;
}
-int
+static int
fmemopen_seek (void *cookie, _IO_off64_t *p, int w)
{
_IO_off64_t np;
}
-int
+static int
fmemopen_close (void *cookie)
{
fmemopen_cookie_t *c;
#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;
}
#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);
(void) printf("'\n");
}
-void
+static void
fmtst1chk (const char *fmt)
{
(void) fputs(fmt, stdout);
(void) printf("'\n");
}
-void
+static void
fmtst2chk (const char *fmt)
{
(void) fputs(fmt, stdout);
* This exercises the output formatting code.
*/
-void
+static void
fp_test (void)
{
int i, j, k, l;
return result != 0;
}
\f
-void
+static void
rfg1 (void)
{
char buf[100];
printf ("got: '%s', expected: '%s'\n", buf, "3E+01");
}
-void
+static void
rfg2 (void)
{
int prec;
#include <string.h>
#include <wchar.h>
-int
+static int
t1 (void)
{
int n = -1;
return n != 5;
}
-int
+static int
t2 (void)
{
int result = 0;
return result;
}
-int
+static int
F (void)
{
char buf[20];