krakjoe / apcu

APCu - APC User Cache
Other
964 stars 196 forks source link

Warnings while building from master #521

Open andypost opened 1 month ago

andypost commented 1 month ago

Using ti build for PHP 8.4beta5 and see 3 warnings while build

/bin/sh /mnt/testing/php84-pecl-apcu/src/apcu-5.1.23/libtool --tag=CC --mode=compile gcc -I. -I/mnt/testing/php84-pecl-apcu/src/apcu-5.1.23 -I/usr/include/php84 -I/usr/include/php84/main -I/usr/include/php84/TSRM -I/usr/include/php84/Zend -I/usr/include/php84/ext -I/usr/include/php84/ext/date/lib  -DHAVE_CONFIG_H  -Os -fstack-clash-protection -Wformat -Werror=format-security -fno-plt -D_GNU_SOURCE   -D_GNU_SOURCE -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -Wall -Wextra -Wno-unused-parameter -DZEND_COMPILE_DL_EXT=1 -c /mnt/testing/php84-pecl-apcu/src/apcu-5.1.23/apc_signal.c -o apc_signal.lo  -MMD -MF apc_signal.dep -MT apc_signal.lo
/mnt/testing/php84-pecl-apcu/src/apcu-5.1.23/apc_cache.c: In function 'apc_cache_fetch':
/mnt/testing/php84-pecl-apcu/src/apcu-5.1.23/apc_cache.c:827:19: warning: variable 'retval' might be clobbered by 'longjmp' or 'vfork' [-Wclobbered]
  827 |         zend_bool retval = 0;
      |                   ^~~~~~
 gcc -I. -I/mnt/testing/php84-pecl-apcu/src/apcu-5.1.23 -I/usr/include/php84 -I/usr/include/php84/main -I/usr/include/php84/TSRM -I/usr/include/php84/Zend -I/usr/include/php84/ext -I/usr/include/php84/ext/date/lib -DHAVE_CONFIG_H -Os -fstack-clash-protection -Wformat -Werror=format-security -fno-plt -D_GNU_SOURCE -D_GNU_SOURCE -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -Wall -Wextra -Wno-unused-parameter -DZEND_COMPILE_DL_EXT=1 -c /mnt/testing/php84-pecl-apcu/src/apcu-5.1.23/apc_signal.c -MMD -MF apc_signal.dep -MT apc_signal.lo  -fPIC -DPIC -o .libs/apc_signal.o
/bin/sh /mnt/testing/php84-pecl-apcu/src/apcu-5.1.23/libtool --tag=CC --mode=compile gcc -I. -I/mnt/testing/php84-pecl-apcu/src/apcu-5.1.23 -I/usr/include/php84 -I/usr/include/php84/main -I/usr/include/php84/TSRM -I/usr/include/php84/Zend -I/usr/include/php84/ext -I/usr/include/php84/ext/date/lib  -DHAVE_CONFIG_H  -Os -fstack-clash-protection -Wformat -Werror=format-security -fno-plt -D_GNU_SOURCE   -D_GNU_SOURCE -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -Wall -Wextra -Wno-unused-parameter -DZEND_COMPILE_DL_EXT=1 -c /mnt/testing/php84-pecl-apcu/src/apcu-5.1.23/apc_time.c -o apc_time.lo  -MMD -MF apc_time.dep -MT apc_time.lo
 gcc -I. -I/mnt/testing/php84-pecl-apcu/src/apcu-5.1.23 -I/usr/include/php84 -I/usr/include/php84/main -I/usr/include/php84/TSRM -I/usr/include/php84/Zend -I/usr/include/php84/ext -I/usr/include/php84/ext/date/lib -DHAVE_CONFIG_H -Os -fstack-clash-protection -Wformat -Werror=format-security -fno-plt -D_GNU_SOURCE -D_GNU_SOURCE -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -Wall -Wextra -Wno-unused-parameter -DZEND_COMPILE_DL_EXT=1 -c /mnt/testing/php84-pecl-apcu/src/apcu-5.1.23/apc_time.c -MMD -MF apc_time.dep -MT apc_time.lo  -fPIC -DPIC -o .libs/apc_time.o
/bin/sh /mnt/testing/php84-pecl-apcu/src/apcu-5.1.23/libtool --tag=CC --mode=compile gcc -I. -I/mnt/testing/php84-pecl-apcu/src/apcu-5.1.23 -I/usr/include/php84 -I/usr/include/php84/main -I/usr/include/php84/TSRM -I/usr/include/php84/Zend -I/usr/include/php84/ext -I/usr/include/php84/ext/date/lib  -DHAVE_CONFIG_H  -Os -fstack-clash-protection -Wformat -Werror=format-security -fno-plt -D_GNU_SOURCE   -D_GNU_SOURCE -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -Wall -Wextra -Wno-unused-parameter -DZEND_COMPILE_DL_EXT=1 -c /mnt/testing/php84-pecl-apcu/src/apcu-5.1.23/apc_iterator.c -o apc_iterator.lo  -MMD -MF apc_iterator.dep -MT apc_iterator.lo
 gcc -I. -I/mnt/testing/php84-pecl-apcu/src/apcu-5.1.23 -I/usr/include/php84 -I/usr/include/php84/main -I/usr/include/php84/TSRM -I/usr/include/php84/Zend -I/usr/include/php84/ext -I/usr/include/php84/ext/date/lib -DHAVE_CONFIG_H -Os -fstack-clash-protection -Wformat -Werror=format-security -fno-plt -D_GNU_SOURCE -D_GNU_SOURCE -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -Wall -Wextra -Wno-unused-parameter -DZEND_COMPILE_DL_EXT=1 -c /mnt/testing/php84-pecl-apcu/src/apcu-5.1.23/apc_iterator.c -MMD -MF apc_iterator.dep -MT apc_iterator.lo  -fPIC -DPIC -o .libs/apc_iterator.o
/bin/sh /mnt/testing/php84-pecl-apcu/src/apcu-5.1.23/libtool --tag=CC --mode=compile gcc -I. -I/mnt/testing/php84-pecl-apcu/src/apcu-5.1.23 -I/usr/include/php84 -I/usr/include/php84/main -I/usr/include/php84/TSRM -I/usr/include/php84/Zend -I/usr/include/php84/ext -I/usr/include/php84/ext/date/lib  -DHAVE_CONFIG_H  -Os -fstack-clash-protection -Wformat -Werror=format-security -fno-plt -D_GNU_SOURCE   -D_GNU_SOURCE -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -Wall -Wextra -Wno-unused-parameter -DZEND_COMPILE_DL_EXT=1 -c /mnt/testing/php84-pecl-apcu/src/apcu-5.1.23/apc_persist.c -o apc_persist.lo  -MMD -MF apc_persist.dep -MT apc_persist.lo
 gcc -I. -I/mnt/testing/php84-pecl-apcu/src/apcu-5.1.23 -I/usr/include/php84 -I/usr/include/php84/main -I/usr/include/php84/TSRM -I/usr/include/php84/Zend -I/usr/include/php84/ext -I/usr/include/php84/ext/date/lib -DHAVE_CONFIG_H -Os -fstack-clash-protection -Wformat -Werror=format-security -fno-plt -D_GNU_SOURCE -D_GNU_SOURCE -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -Wall -Wextra -Wno-unused-parameter -DZEND_COMPILE_DL_EXT=1 -c /mnt/testing/php84-pecl-apcu/src/apcu-5.1.23/apc_persist.c -MMD -MF apc_persist.dep -MT apc_persist.lo  -fPIC -DPIC -o .libs/apc_persist.o
/mnt/testing/php84-pecl-apcu/src/apcu-5.1.23/apc_iterator.c: In function 'apc_iterator_fetch_deleted':
/mnt/testing/php84-pecl-apcu/src/apcu-5.1.23/apc_iterator.c:254:16: warning: variable 'count' might be clobbered by 'longjmp' or 'vfork' [-Wclobbered]
  254 |         size_t count = 0;
      |                ^~~~~
/mnt/testing/php84-pecl-apcu/src/apcu-5.1.23/apc_iterator.c: In function 'apc_iterator_fetch_active':
/mnt/testing/php84-pecl-apcu/src/apcu-5.1.23/apc_iterator.c:214:16: warning: variable 'count' might be clobbered by 'longjmp' or 'vfork' [-Wclobbered]
  214 |         size_t count = 0;
      |                ^~~~~
nikic commented 1 month ago

Which compiler is this?

andypost commented 1 month ago

Alpine transitioning to gcc14

andypost commented 1 month ago

14.2 to be sure

nikic commented 1 month ago

Hm, maybe this is only reproducible in out of tree builds? I see Zend.m4 adding -Wno-clobbered, but maybe this doesn't happen when building apcu separately.