Skip to content
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

Fix -Wundef warnings #519

Merged
merged 1 commit into from
Sep 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions apc_cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ PHP_APCU_API int APC_UNSERIALIZER_NAME(php) (APC_UNSERIALIZER_ARGS)
result = php_var_unserialize(value, &tmp, buf + buf_len, &var_hash);
PHP_VAR_UNSERIALIZE_DESTROY(var_hash);
BG(serialize_lock)--;

if (!result) {
php_error_docref(NULL, E_NOTICE, "Error at offset %td of %zd bytes", tmp - buf, buf_len);
ZVAL_NULL(value);
Expand Down Expand Up @@ -1210,7 +1210,7 @@ PHP_APCU_API zend_bool apc_cache_defense(apc_cache_t *cache, zend_string *key, t
last->len == ZSTR_LEN(key) &&
last->mtime == t &&
(last->owner_pid != owner_pid
#if ZTS
#ifdef ZTS
|| last->owner_thread != owner_thread
#endif
)
Expand Down
2 changes: 1 addition & 1 deletion apc_signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

#include "apc.h"

#if HAVE_SIGACTION
#ifdef HAVE_SIGACTION
#include <signal.h>
#include "apc_globals.h"
#include "apc_sma.h"
Expand Down
2 changes: 1 addition & 1 deletion apc_sma.c
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ PHP_APCU_API void apc_sma_init(apc_sma_t* sma, void** data, apc_sma_expunge_f ex
#else
{
int j = apc_shm_create(i, sma->size);
#if PHP_WIN32
#ifdef PHP_WIN32
/* TODO remove the line below after 7.1 EOL. */
SetLastError(0);
#endif
Expand Down
6 changes: 3 additions & 3 deletions php_apc.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
#include "SAPI.h"
#include "php_apc.h"

#if HAVE_SIGACTION
#ifdef HAVE_SIGACTION
#include "apc_signal.h"
#endif

Expand Down Expand Up @@ -300,7 +300,7 @@ static PHP_MSHUTDOWN_FUNCTION(apcu)
APCG(initialized) = 0;
}

#if HAVE_SIGACTION
#ifdef HAVE_SIGACTION
apc_shutdown_signals();
#endif
}
Expand All @@ -325,7 +325,7 @@ static PHP_RINIT_FUNCTION(apcu)
apc_cache_serializer(apc_user_cache, APCG(serializer_name));
}

#if HAVE_SIGACTION
#ifdef HAVE_SIGACTION
apc_set_signals();
#endif
}
Expand Down
Loading