Skip to content

Commit a014b7f

Browse files
committed
Fix [-Wstrict-prototypes] in GD extension .c files
1 parent 4d2e0f8 commit a014b7f

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

ext/gd/config.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ dnl
138138
if test "$PHP_GD" != "no"; then
139139

140140
if test "$PHP_EXTERNAL_GD" = "no"; then
141-
GD_CFLAGS=""
141+
GD_CFLAGS="-Wno-strict-prototypes"
142142
extra_sources="libgd/gd.c libgd/gd_gd.c libgd/gd_gd2.c libgd/gd_io.c libgd/gd_io_dp.c \
143143
libgd/gd_io_file.c libgd/gd_ss.c libgd/gd_io_ss.c libgd/gd_webp.c \
144144
libgd/gd_png.c libgd/gd_jpeg.c libgd/gdxpm.c libgd/gdfontt.c libgd/gdfonts.c \

ext/gd/gd.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ static void _php_image_create_from(INTERNAL_FUNCTION_PARAMETERS, int image_type,
137137
static void _php_image_output(INTERNAL_FUNCTION_PARAMETERS, int image_type, char *tn, void (*func_p)());
138138
static gdIOCtx *create_stream_context_from_zval(zval *to_zval);
139139
static gdIOCtx *create_stream_context(php_stream *stream, int close_stream);
140-
static gdIOCtx *create_output_context();
140+
static gdIOCtx *create_output_context(void);
141141
static int _php_image_type(char data[12]);
142142

143143
/* output streaming (formerly gd_ctx.c) */
@@ -217,7 +217,7 @@ void php_gd_assign_libgdimageptr_as_extgdimage(zval *val, gdImagePtr image)
217217
php_gd_exgdimage_from_zobj_p(Z_OBJ_P(val))->image = image;
218218
}
219219

220-
static void php_gd_object_minit_helper()
220+
static void php_gd_object_minit_helper(void)
221221
{
222222
zend_class_entry ce;
223223
INIT_CLASS_ENTRY(ce, "GdImage", class_GdImage_methods);
@@ -1446,7 +1446,7 @@ static int _php_image_type (char data[12])
14461446
/* }}} */
14471447

14481448
/* {{{ _php_image_create_from_string */
1449-
gdImagePtr _php_image_create_from_string(zend_string *data, char *tn, gdImagePtr (*ioctx_func_p)())
1449+
gdImagePtr _php_image_create_from_string(zend_string *data, char *tn, gdImagePtr (*ioctx_func_p)(gdIOCtx * infile))
14501450
{
14511451
gdImagePtr im;
14521452
gdIOCtx *io_ctx;

ext/gd/libgd/gdft.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -774,7 +774,7 @@ void gdFontCacheShutdown()
774774
gdMutexUnlock(gdFontCacheMutex);
775775
}
776776

777-
void gdFreeFontCache()
777+
void gdFreeFontCache(void)
778778
{
779779
gdFontCacheShutdown();
780780
}

0 commit comments

Comments
 (0)