Skip to content

Commit 4d9fc50

Browse files
authored
Autotools, ext/gd: Ensure test program compiles without warnings (#19116)
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 d40b603 commit 4d9fc50

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
@@ -163,17 +163,22 @@ AC_CACHE_CHECK([for working gdImageCreateFrom$1 in libgd], [php_var],
163163
164164
/* A custom gdErrorMethod */
165165
void exit1(int priority, const char *format, va_list args) {
166+
(void)priority;
167+
(void)format;
168+
(void)args;
166169
_exit(1);
167170
}
168171
169172
/* Override the default gd_error_method with one that
170173
actually causes the program to return an error. */
171-
int main(int argc, char** argv) {
174+
int main(void)
175+
{
172176
m4_if([$1],[Xpm],
173177
[char* f = "test.xpm"],
174178
[FILE* f = NULL]);
175179
gdSetErrorMethod(exit1);
176180
gdImagePtr p = gdImageCreateFrom$1(f);
181+
(void)p;
177182
return 0;
178183
}])],
179184
[AS_VAR_SET([php_var], [yes])],

0 commit comments

Comments
 (0)