diff --git a/src/buttons.c b/src/buttons.c index 777ed189..fc236da8 100644 --- a/src/buttons.c +++ b/src/buttons.c @@ -77,10 +77,6 @@ #include "tiles.h" #include "setup.h" -#ifdef __VBCC__ - #define __attribute__(x) -#endif - #if defined(__amigaos4__) || defined(__AROS__) || defined(__MORPHOS__) || defined(__amigaos__) #include #include diff --git a/src/fileformats.c b/src/fileformats.c index 8f8d25a5..9ba6bb39 100644 --- a/src/fileformats.c +++ b/src/fileformats.c @@ -3723,8 +3723,9 @@ void Test_PNG(T_IO_Context * context) /// Used by a callback in Load_PNG T_IO_Context * PNG_current_context; -int PNG_read_unknown_chunk(__attribute__((unused)) png_structp ptr, png_unknown_chunkp chunk) +int PNG_read_unknown_chunk(png_structp ptr, png_unknown_chunkp chunk) { + (void)ptr; // unused // png_unknown_chunkp members: // png_byte name[5]; // png_byte *data; diff --git a/src/graph.c b/src/graph.c index 2344134e..4a696e77 100644 --- a/src/graph.c +++ b/src/graph.c @@ -51,10 +51,6 @@ #include "brush.h" #include "tiles.h" -#ifdef __VBCC__ - #define __attribute__(x) -#endif - #if defined(__VBCC__) || defined(__GP2X__) || defined(__WIZ__) || defined(__CAANOO__) #define M_PI 3.141592653589793238462643 #endif @@ -1225,8 +1221,10 @@ void Fill_general(byte fill_color) } // Affichage d'un point pour une preview en xor - void Pixel_figure_preview_xor(word x_pos,word y_pos,__attribute__((unused)) byte color) + void Pixel_figure_preview_xor(word x_pos,word y_pos,byte color) { + (void)color; // unused + if ( (x_pos>=Limit_left) && (x_pos<=Limit_right) && (y_pos>=Limit_top) && @@ -1237,8 +1235,10 @@ void Fill_general(byte fill_color) // Affichage d'un point pour une preview en xor additif // (Il lit la couleur depuis la page backup) - void Pixel_figure_preview_xorback(word x_pos,word y_pos,__attribute__((unused)) byte color) + void Pixel_figure_preview_xorback(word x_pos,word y_pos,byte color) { + (void)color; // unused + if ( (x_pos>=Limit_left) && (x_pos<=Limit_right) && (y_pos>=Limit_top) && @@ -1248,8 +1248,10 @@ void Fill_general(byte fill_color) // Effacement d'un point de preview - void Pixel_figure_clear_preview(word x_pos,word y_pos,__attribute__((unused)) byte color) + void Pixel_figure_clear_preview(word x_pos,word y_pos,byte color) { + (void)color; // unused + if ( (x_pos>=Limit_left) && (x_pos<=Limit_right) && (y_pos>=Limit_top) && @@ -2818,15 +2820,20 @@ void Display_pixel(word x,word y,byte color) // -- Aucun effet en cours -- -byte No_effect(__attribute__((unused)) word x,__attribute__((unused)) word y,byte color) +byte No_effect(word x, word y, byte color) { + (void)x; // unused + (void)y; // unused + return color; } // -- Effet de Shading -- -byte Effect_shade(word x,word y,__attribute__((unused)) byte color) +byte Effect_shade(word x,word y,byte color) { + (void)color; // unused + return Shade_table[Read_pixel_from_feedback_screen(x,y)]; } @@ -2879,21 +2886,24 @@ byte Effect_quick_shade(word x,word y,byte color) // -- Effet de Tiling -- -byte Effect_tiling(word x,word y,__attribute__((unused)) byte color) +byte Effect_tiling(word x,word y,byte color) { + (void)color; // unused + return Read_pixel_from_brush((x+Brush_width-Tiling_offset_X)%Brush_width, (y+Brush_height-Tiling_offset_Y)%Brush_height); } // -- Effet de Smooth -- -byte Effect_smooth(word x,word y,__attribute__((unused)) byte color) +byte Effect_smooth(word x,word y,byte color) { int r,g,b; byte c; int weight,total_weight; byte x2=((x+1)