Remove a TON of warnings

This commit is contained in:
Simon 2011-04-08 15:28:57 +01:00
parent 60039b531e
commit 626cc8fa6a
4 changed files with 525 additions and 577 deletions

View File

@ -64,17 +64,9 @@ int draw_tool_xy(pixel *vid_buf, int x, int y, int b, unsigned pc);
void draw_menu(pixel *vid_buf, int i, int hover);
#if defined(WIN32) && !defined(__GNUC__)
_inline void drawpixel(pixel *vid, int x, int y, int r, int g, int b, int a);
#else
extern inline void drawpixel(pixel *vid, int x, int y, int r, int g, int b, int a);
#endif
void drawpixel(pixel *vid, int x, int y, int r, int g, int b, int a);
#if defined(WIN32) && !defined(__GNUC__)
_inline int drawchar(pixel *vid, int x, int y, int c, int r, int g, int b, int a);
#else
extern inline int drawchar(pixel *vid, int x, int y, int c, int r, int g, int b, int a);
#endif
int drawchar(pixel *vid, int x, int y, int c, int r, int g, int b, int a);
int drawtext(pixel *vid, int x, int y, const char *s, int r, int g, int b, int a);
@ -99,13 +91,10 @@ void textnpos(char *s, int n, int w, int *cx, int *cy);
int textwidthx(char *s, int w);
int textposxy(char *s, int width, int w, int h);
int textwrapheight(char *s, int width);
#if defined(WIN32) && !defined(__GNUC__)
_inline void blendpixel(pixel *vid, int x, int y, int r, int g, int b, int a);
#else
void blendpixel(pixel *vid, int x, int y, int r, int g, int b, int a);
#endif
void draw_icon(pixel *vid_buf, int x, int y, char ch, int flag);
@ -122,7 +111,9 @@ void xor_line(int x1, int y1, int x2, int y2, pixel *vid);
void xor_rect(pixel *vid, int x, int y, int w, int h);
void draw_parts(pixel *vid);
void draw_wavelengths(pixel *vid, int x, int y, int h, int wl);
void render_signs(pixel *vid_buf);
void render_fire(pixel *dst);

View File

@ -20,24 +20,13 @@ __asm__ __volatile ("cpuid":\
#endif
static char hex[] = "0123456789ABCDEF";
//Signum function
#if defined(WIN32) && !defined(__GNUC__)
extern _inline int isign(float i);
#else
extern inline int isign(float i);
#endif
int isign(float i);
#if defined(WIN32) && !defined(__GNUC__)
extern _inline unsigned clamp_flt(float f, float min, float max);
#else
extern inline unsigned clamp_flt(float f, float min, float max);
#endif
unsigned clamp_flt(float f, float min, float max);
#if defined(WIN32) && !defined(__GNUC__)
extern _inline float restrict_flt(float f, float min, float max);
#else
extern inline float restrict_flt(float f, float min, float max);
#endif
float restrict_flt(float f, float min, float max);
char *mystrdup(char *s);

View File

@ -814,43 +814,19 @@ static void create_gain_photon(int pp);
void kill_part(int i);
#if defined(WIN32) && !defined(__GNUC__)
extern _inline void part_change_type(int i, int x, int y, int t);
#else
extern inline void part_change_type(int i, int x, int y, int t);
#endif
void part_change_type(int i, int x, int y, int t);
#if defined(WIN32) && !defined(__GNUC__)
extern _inline int create_part(int p, int x, int y, int t);
#else
extern inline int create_part(int p, int x, int y, int t);
#endif
int create_part(int p, int x, int y, int t);
#if defined(WIN32) && !defined(__GNUC__)
extern _inline void delete_part(int x, int y);
#else
extern inline void delete_part(int x, int y);
#endif
void delete_part(int x, int y);
#if defined(WIN32) && !defined(__GNUC__)
extern _inline int is_wire(int x, int y);
#else
extern inline int is_wire(int x, int y);
#endif
int is_wire(int x, int y);
#if defined(WIN32) && !defined(__GNUC__)
extern _inline int is_wire_off(int x, int y);
#else
extern inline int is_wire_off(int x, int y);
#endif
int is_wire_off(int x, int y);
void set_emap(int x, int y);
#if defined(WIN32) && !defined(__GNUC__)
extern _inline int parts_avg(int ci, int ni, int t);
#else
extern int parts_avg(int ci, int ni, int t);
#endif
int parts_avg(int ci, int ni, int t);
int nearest_part(int ci, int t);
@ -869,20 +845,11 @@ int flood_parts(int x, int y, int c, int cm, int bm);
int create_parts(int x, int y, int rx, int ry, int c);
void create_line(int x1, int y1, int x2, int y2, int rx, int ry, int c);
void *transform_save(void *odata, int *size, matrix2d transform, vector2d translate);
void orbitalparts_get(int block1, int block2, int resblock1[], int resblock2[]);
#if defined(WIN32) && !defined(__GNUC__)
extern _inline void orbitalparts_get(int block1, int block2, int resblock1[], int resblock2[]);
#else
extern inline void orbitalparts_get(int block1, int block2, int resblock1[], int resblock2[]);
#endif
#if defined(WIN32) && !defined(__GNUC__)
extern _inline void orbitalparts_set(int *block1, int *block2, int resblock1[], int resblock2[]);
#else
extern inline void orbitalparts_set(int *block1, int *block2, int resblock1[], int resblock2[]);
#endif
void orbitalparts_set(int *block1, int *block2, int resblock1[], int resblock2[]);
#endif

1013
src/main.c

File diff suppressed because it is too large Load Diff