-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Enable -Wstrict-prototypes #5888
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
33194c3
8f91638
3580150
1933288
31a2603
dc9d72f
d01d78d
3703b10
52b28df
9293d08
b30ddf9
7c277af
7343e8e
ee584d1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -138,7 +138,8 @@ dnl | |
if test "$PHP_GD" != "no"; then | ||
|
||
if test "$PHP_EXTERNAL_GD" = "no"; then | ||
GD_CFLAGS="" | ||
dnl Disable strict prototypes as GD takes advantages of variadic function signatures for function pointers. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can gd be fixed somehow too? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, because libgd does that and not the PHP implementation. |
||
GD_CFLAGS="-Wno-strict-prototypes" | ||
extra_sources="libgd/gd.c libgd/gd_gd.c libgd/gd_gd2.c libgd/gd_io.c libgd/gd_io_dp.c \ | ||
libgd/gd_io_file.c libgd/gd_ss.c libgd/gd_io_ss.c libgd/gd_webp.c \ | ||
libgd/gd_png.c libgd/gd_jpeg.c libgd/gdxpm.c libgd/gdfontt.c libgd/gdfonts.c \ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -89,7 +89,8 @@ static void pcntl_siginfo_to_zval(int, siginfo_t*, zval*); | |
#else | ||
static void pcntl_signal_handler(int); | ||
#endif | ||
static void pcntl_signal_dispatch(); | ||
static void pcntl_signal_dispatch(void); | ||
static void pcntl_signal_dispatch_tick_function(int dummy_int, void *dummy_pointer); | ||
static void pcntl_interrupt_function(zend_execute_data *execute_data); | ||
|
||
void php_register_signal_constants(INIT_FUNC_ARGS) | ||
|
@@ -424,7 +425,7 @@ static PHP_GINIT_FUNCTION(pcntl) | |
|
||
PHP_RINIT_FUNCTION(pcntl) | ||
{ | ||
php_add_tick_function(pcntl_signal_dispatch, NULL); | ||
php_add_tick_function(pcntl_signal_dispatch_tick_function, NULL); | ||
zend_hash_init(&PCNTL_G(php_signal_table), 16, NULL, ZVAL_PTR_DTOR, 0); | ||
PCNTL_G(head) = PCNTL_G(tail) = PCNTL_G(spares) = NULL; | ||
PCNTL_G(async_signals) = 0; | ||
|
@@ -1385,6 +1386,11 @@ void pcntl_signal_dispatch() | |
sigprocmask(SIG_SETMASK, &old_mask, NULL); | ||
} | ||
|
||
static void pcntl_signal_dispatch_tick_function(int dummy_int, ZEND_ATTRIBUTE_UNUSED void *dummy_pointer) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is one of these marked as unused and the other isn't? As we disable this warning, I'd not add the attribute. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Because somehow I thought this function used the first param, clearly being drunk. Will remove the attribute. |
||
{ | ||
return pcntl_signal_dispatch(); | ||
} | ||
|
||
/* {{{ Enable/disable asynchronous signal handling and return the old setting. */ | ||
PHP_FUNCTION(pcntl_async_signals) | ||
{ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.