Skip to content

Commit 643f283

Browse files
committed
Autotools, ext/gd: Ensure test program compiles without warnings
In case compiler is configured in some strict way it might emit warnings or even errors in the future if these aren't casted to void.
1 parent ba68cbe commit 643f283

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

ext/gd/config.m4

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,17 +162,22 @@ AC_CACHE_CHECK([for working gdImageCreateFrom$1 in libgd], [php_var],
162162
163163
/* A custom gdErrorMethod */
164164
void exit1(int priority, const char *format, va_list args) {
165+
(void)priority;
166+
(void)format;
167+
(void)args;
165168
_exit(1);
166169
}
167170
168171
/* Override the default gd_error_method with one that
169172
actually causes the program to return an error. */
170-
int main(int argc, char** argv) {
173+
int main(void)
174+
{
171175
m4_if([$1],[Xpm],
172176
[char* f = "test.xpm"],
173177
[FILE* f = NULL]);
174178
gdSetErrorMethod(exit1);
175179
gdImagePtr p = gdImageCreateFrom$1(f);
180+
(void)p;
176181
return 0;
177182
}])],
178183
[AS_VAR_SET([php_var], [yes])],

0 commit comments

Comments
 (0)