Skip to content

Commit 18dffa6

Browse files
authored
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; | ^~~~~~~~~~~~ ```
1 parent 980f7bd commit 18dffa6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

sapi/litespeed/lscriu.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,9 @@ static int (*s_lscapi_dump_me)(void) = NULL;
9999
static int (*s_lscapi_prepare_me)(void) = NULL;
100100
static int s_native = 0;
101101
static int s_tried_checkpoint = 0;
102+
#ifdef LSAPILIB_DEBUG_CRIU
102103
static int s_criu_debug = 0;
104+
#endif
103105
static int s_fd_native = -1;
104106
static char *s_criu_image_path = NULL;
105107
static int s_pid = 0;
@@ -309,6 +311,7 @@ static void LSCRIU_Wink_Server_is_Ready(void)
309311
}
310312

311313

314+
#ifdef LSAPILIB_DEBUG_CRIU
312315
static char *LSCRIU_Error_File_Name(char *pchFile, int max_len)
313316
{
314317
const char *pchDefaultSocketPath = "/tmp/";
@@ -319,7 +322,6 @@ static char *LSCRIU_Error_File_Name(char *pchFile, int max_len)
319322
}
320323

321324

322-
#ifdef LSAPILIB_DEBUG_CRIU
323325
static void LSCRIU_Debugging(void) {
324326
char *pchCRIUDebug;
325327
pchCRIUDebug = getenv("LSAPI_CRIU_DEBUG");

0 commit comments

Comments
 (0)