summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/gd/libgd/gd.c12
-rw-r--r--ext/gd/libgd/gd_topal.c1
-rw-r--r--ext/gd/libgd/gdft.c4
3 files changed, 11 insertions, 6 deletions
diff --git a/ext/gd/libgd/gd.c b/ext/gd/libgd/gd.c
index 454f1bf30e..7d86ab1d9f 100644
--- a/ext/gd/libgd/gd.c
+++ b/ext/gd/libgd/gd.c
@@ -86,6 +86,10 @@ extern int gdSinT[];
static void gdImageBrushApply (gdImagePtr im, int x, int y);
static void gdImageTileApply (gdImagePtr im, int x, int y);
+static int gdFullAlphaBlend(int dst, int src);
+static int gdLayerOverlay(int dst, int src);
+static int gdAlphaBlendColor(int b1, int b2, int a1, int a2);
+static int gdAlphaOverlayColor(int src, int dst, int max);
gdImagePtr
gdImageCreate (int sx, int sy)
@@ -2577,7 +2581,7 @@ gdImageSaveAlpha (gdImagePtr im, int saveAlphaArg)
im->saveAlphaFlag = saveAlphaArg;
}
-int
+static int
gdFullAlphaBlend (int dst, int src)
{
int a1, a2;
@@ -2591,7 +2595,7 @@ gdFullAlphaBlend (int dst, int src)
);
}
-int
+static int
gdAlphaBlendColor( int b1, int b2, int a1, int a2 )
{
int c;
@@ -2617,7 +2621,7 @@ gdAlphaBlendColor( int b1, int b2, int a1, int a2 )
return ( a1 * b1 + ( gdAlphaMax - a1 ) * c ) / gdAlphaMax;
}
-int
+static int
gdLayerOverlay (int dst, int src)
{
int a1, a2;
@@ -2630,7 +2634,7 @@ gdLayerOverlay (int dst, int src)
);
}
-int
+static int
gdAlphaOverlayColor( int src, int dst, int max )
{
/* this function implements the algorithm
diff --git a/ext/gd/libgd/gd_topal.c b/ext/gd/libgd/gd_topal.c
index 33d62741d7..daadaabdf6 100644
--- a/ext/gd/libgd/gd_topal.c
+++ b/ext/gd/libgd/gd_topal.c
@@ -29,6 +29,7 @@
#include "gd.h"
#include "gdhelpers.h"
#include <string.h>
+#include <stdlib.h>
/*
* This module implements the well-known Heckbert paradigm for color
diff --git a/ext/gd/libgd/gdft.c b/ext/gd/libgd/gdft.c
index cc2044b171..520e49f351 100644
--- a/ext/gd/libgd/gdft.c
+++ b/ext/gd/libgd/gdft.c
@@ -703,7 +703,7 @@ gdImageStringFTEx (gdImage * im, int *brect, int fg, char *fontlist,
/* pull in supplied extended settings */
if (strex) {
- if (strex->flags & gdFTEX_LINESPACE == gdFTEX_LINESPACE)
+ if ((strex->flags & gdFTEX_LINESPACE) == gdFTEX_LINESPACE)
linespace = strex->linespacing;
}
@@ -725,7 +725,7 @@ gdImageStringFTEx (gdImage * im, int *brect, int fg, char *fontlist,
if (font->have_char_map_sjis)
{
#endif
- if (tmpstr = (char *) gdMalloc (BUFSIZ))
+ if ((tmpstr = (char *) gdMalloc (BUFSIZ)) != NULL)
{
any2eucjp (tmpstr, string, BUFSIZ);
next = tmpstr;