mirror of
https://github.com/frida/tinycc
synced 2024-12-25 06:26:49 +03:00
remove a compilation warnings for libtest and test3
------------ libtest ------------ ./libtcc_test lib_path=.. <string>:11: warning: implicit declaration of function 'printf' <string>:13: warning: implicit declaration of function 'add' ------------ test3 ------------ tcctest.c:1982: warning: implicit declaration of function 'putchar' tcctest.c:2133: warning: implicit declaration of function 'strlen'
This commit is contained in:
parent
dec959358a
commit
3c372b4c8a
2
tcclib.h
2
tcclib.h
@ -39,6 +39,7 @@ int getchar(void);
|
|||||||
char *gets(char *s);
|
char *gets(char *s);
|
||||||
int ungetc(int c, FILE *stream);
|
int ungetc(int c, FILE *stream);
|
||||||
int fflush(FILE *stream);
|
int fflush(FILE *stream);
|
||||||
|
int putchar (int c);
|
||||||
|
|
||||||
int printf(const char *format, ...);
|
int printf(const char *format, ...);
|
||||||
int fprintf(FILE *stream, const char *format, ...);
|
int fprintf(FILE *stream, const char *format, ...);
|
||||||
@ -64,6 +65,7 @@ void *memcpy(void *dest, const void *src, size_t n);
|
|||||||
void *memmove(void *dest, const void *src, size_t n);
|
void *memmove(void *dest, const void *src, size_t n);
|
||||||
void *memset(void *s, int c, size_t n);
|
void *memset(void *s, int c, size_t n);
|
||||||
char *strdup(const char *s);
|
char *strdup(const char *s);
|
||||||
|
size_t strlen(const char *s);
|
||||||
|
|
||||||
/* dlfcn.h */
|
/* dlfcn.h */
|
||||||
#define RTLD_LAZY 0x001
|
#define RTLD_LAZY 0x001
|
||||||
|
@ -16,6 +16,8 @@ int add(int a, int b)
|
|||||||
}
|
}
|
||||||
|
|
||||||
char my_program[] =
|
char my_program[] =
|
||||||
|
"#include <stdio.h> // printf()\n"
|
||||||
|
"extern int add(int a, int b);\n"
|
||||||
"int fib(int n)\n"
|
"int fib(int n)\n"
|
||||||
"{\n"
|
"{\n"
|
||||||
" if (n <= 2)\n"
|
" if (n <= 2)\n"
|
||||||
|
Loading…
Reference in New Issue
Block a user