[php-src] master: Fix defined but not used warnings (#13678)
| From: | Peter Kokot via GitHub | Date: | Tue, 12 Mar 2024 17:02:56 +0000 |
| Subject: | [php-src] master: Fix defined but not used warnings (#13678) | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-127709@lists.php.net to get a copy of this message | ||
Author: Peter Kokot (petk)
Committer: GitHub (web-flow)
Pusher: petk
Date: 2024-03-12T17:49:07+01:00
Commit: https://github.com/php/php-src/commit/18dffa6b7315881a9c9c8fdf351831690fbfe423
Raw diff: https://github.com/php/php-src/commit/18dffa6b7315881a9c9c8fdf351831690fbfe423.diff
Fix defined but not used warnings (#13678)
This fixes two warnings when building litespeed SAPI:
```
.../php-src/sapi/litespeed/lscriu.c:312:14: warning:
'LSCRIU_Error_File_Name' defined but not used
[-Wunused-function]
312 | static char *LSCRIU_Error_File_Name(char *pchFile, int max_len)
| ^~~~~~~~~~~~~~~~~~~~~~
.../php-src/sapi/litespeed/lscriu.c:102:12: warning:
's_criu_debug' defined but not used [-Wunused-variable]
102 | static int s_criu_debug = 0;
| ^~~~~~~~~~~~
```
Changed paths:
M sapi/litespeed/lscriu.c
Diff:
diff --git a/sapi/litespeed/lscriu.c b/sapi/litespeed/lscriu.c
index 2854fefe596e5..23ea436ab8126 100644
--- a/sapi/litespeed/lscriu.c
+++ b/sapi/litespeed/lscriu.c
@@ -99,7 +99,9 @@ static int (*s_lscapi_dump_me)(void) = NULL;
static int (*s_lscapi_prepare_me)(void) = NULL;
static int s_native = 0;
static int s_tried_checkpoint = 0;
+#ifdef LSAPILIB_DEBUG_CRIU
static int s_criu_debug = 0;
+#endif
static int s_fd_native = -1;
static char *s_criu_image_path = NULL;
static int s_pid = 0;
@@ -309,6 +311,7 @@ static void LSCRIU_Wink_Server_is_Ready(void)
}
+#ifdef LSAPILIB_DEBUG_CRIU
static char *LSCRIU_Error_File_Name(char *pchFile, int max_len)
{
const char *pchDefaultSocketPath = "/tmp/";
@@ -319,7 +322,6 @@ static char *LSCRIU_Error_File_Name(char *pchFile, int max_len)
}
-#ifdef LSAPILIB_DEBUG_CRIU
static void LSCRIU_Debugging(void) {
char *pchCRIUDebug;
pchCRIUDebug = getenv("LSAPI_CRIU_DEBUG");