From ab2855ffacdad0ff4229551f8cac5e7d2c7b126b Mon Sep 17 00:00:00 2001 From: Arnaud Le Blanc Date: Wed, 11 Nov 2026 17:57:22 +0100 Subject: [PATCH 1/2] Fix -Wunused-but-set-global warning --- ext/pcntl/pcntl.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ext/pcntl/pcntl.c b/ext/pcntl/pcntl.c index 3492444925ca..f1d4e0bb0377 100644 --- a/ext/pcntl/pcntl.c +++ b/ext/pcntl/pcntl.c @@ -155,7 +155,6 @@ typedef psetid_t cpu_set_t; #include "pcntl_arginfo.h" #include "pcntl_decl.h" -static zend_class_entry *QosClass_ce; ZEND_DECLARE_MODULE_GLOBALS(pcntl) static PHP_GINIT_FUNCTION(pcntl); @@ -220,7 +219,7 @@ PHP_RINIT_FUNCTION(pcntl) PHP_MINIT_FUNCTION(pcntl) { - QosClass_ce = register_class_Pcntl_QosClass(); + register_class_Pcntl_QosClass(); register_pcntl_symbols(module_number); orig_interrupt_function = zend_interrupt_function; zend_interrupt_function = pcntl_interrupt_function; From 9b4b1065467f59bee94933141508289fe8f7c858 Mon Sep 17 00:00:00 2001 From: Arnaud Le Blanc Date: Wed, 11 Nov 2026 18:07:04 +0100 Subject: [PATCH 2/2] Fix -Wunused-but-set-global warning --- TSRM/TSRM.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/TSRM/TSRM.c b/TSRM/TSRM.c index 0cc192473116..df54d8bb4b05 100644 --- a/TSRM/TSRM.c +++ b/TSRM/TSRM.c @@ -73,10 +73,10 @@ static tsrm_shutdown_func_t tsrm_thread_free_handler = NULL; int tsrm_error(int level, const char *format, ...); /* Read a resource from a thread's resource storage */ +#ifdef TSRM_DEBUG static int tsrm_error_level; static FILE *tsrm_error_file; -#ifdef TSRM_DEBUG #define TSRM_ERROR(args) tsrm_error args #define TSRM_SAFE_RETURN_RSRC(array, offset, range) \ { \ @@ -140,7 +140,9 @@ TSRM_API bool tsrm_startup(int expected_threads, int expected_resources, int deb in_main_thread = true; is_thread_shutdown = false; +#ifdef TSRM_DEBUG tsrm_error_file = stderr; +#endif tsrm_error_set(debug_level, debug_filename); tsrm_tls_table_size = expected_threads; @@ -238,9 +240,11 @@ TSRM_API void tsrm_shutdown(void) tsrm_mutex_free(tsmm_mutex); tsrm_mutex_free(tsrm_env_mutex); TSRM_ERROR((TSRM_ERROR_LEVEL_CORE, "Shutdown TSRM")); +#ifdef TSRM_DEBUG if (tsrm_error_file!=stderr) { fclose(tsrm_error_file); } +#endif #ifdef TSRM_WIN32 TlsFree(tls_key); tls_key = TLS_OUT_OF_INDEXES; @@ -838,9 +842,9 @@ int tsrm_error(int level, const char *format, ...) void tsrm_error_set(int level, const char *debug_filename) {/*{{{*/ +#ifdef TSRM_DEBUG tsrm_error_level = level; -#ifdef TSRM_DEBUG if (tsrm_error_file!=stderr) { /* close files opened earlier */ fclose(tsrm_error_file); }