Commits

Lenard Lindstrom committed e2cfd06

freetype: remove last gcc warning from build

  • Participants
  • Parent commits 0aaf55f

Comments (0)

Files changed (1)

File src/freetype/ft_render_cb.c

                                 (off_y * bitmap->pitch);                \
         const FT_Byte *_src;                                            \
                                                                         \
+	_DECLARE_full_color##_bpp(surface, color)			\
+        /*                                                              \
         const FT_UInt32 full_color =                                    \
             SDL_MapRGBA(surface->format, (FT_Byte)color->r,             \
                     (FT_Byte)color->g, (FT_Byte)color->b, 255);         \
+	*/                                                              \
                                                                         \
         FT_UInt32 bgR, bgG, bgB, bgA;                                   \
         int j, i;                                                       \
         }                                                               \
     }
 
+/* These macros removes a gcc unused variable warning for __render_glyph_RGB3 */
+#define _DECLARE_full_color(s, c) const FT_UInt32 full_color =          \
+    SDL_MapRGBA((s)->format, (FT_Byte)(c)->r, (FT_Byte)(c)->g,          \
+                (FT_Byte)(c)->b, 255);
+#define _DECLARE_full_color1(s, c) _DECLARE_full_color(s, c)
+#define _DECLARE_full_color2(s, c) _DECLARE_full_color(s, c)
+#define _DECLARE_full_color3(s, c)
+#define _DECLARE_full_color4(s, c) _DECLARE_full_color(s, c)
+
 
 #define _SET_PIXEL_24   \
     SET_PIXEL24_RGB(_dst, surface->format, color->r, color->g, color->b);