mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-09-19 08:22:36 +08:00
Add prototype for printf() and make type of "string" array be "char" in
order to avoid compile time warnings.
This commit is contained in:
@ -1,20 +1,21 @@
|
||||
/* This program is used to test objcopy, readelf and strip. */
|
||||
|
||||
extern int strcmp (char *, const char *);
|
||||
extern int printf (const char *, ...);
|
||||
|
||||
int common;
|
||||
int global = 1;
|
||||
static int local = 2;
|
||||
static unsigned char string[] = "string";
|
||||
static char string[] = "string";
|
||||
|
||||
int
|
||||
fn ()
|
||||
fn (void)
|
||||
{
|
||||
return 3;
|
||||
}
|
||||
|
||||
int
|
||||
main ()
|
||||
main (void)
|
||||
{
|
||||
if (common != 0
|
||||
|| global != 1
|
||||
@ -22,9 +23,9 @@ main ()
|
||||
|| strcmp (string, "string") != 0)
|
||||
{
|
||||
printf ("failed\n");
|
||||
return (1);
|
||||
return 1;
|
||||
}
|
||||
|
||||
printf ("ok\n");
|
||||
return (0);
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user