diff options
author | Max Romanov <max.romanov@nginx.com> | 2021-03-02 18:31:03 +0300 |
---|---|---|
committer | Max Romanov <max.romanov@nginx.com> | 2021-03-02 18:31:03 +0300 |
commit | 73ac0496feb38ef2098163847206d304cf2c9a73 (patch) | |
tree | 9769607a02ceaa01fc8f4656731297760710da9a /src/nxt_unit.c | |
parent | fddde539c9cde818857f46c24eaa7d4e57eb9b44 (diff) | |
download | unit-73ac0496feb38ef2098163847206d304cf2c9a73.tar.gz unit-73ac0496feb38ef2098163847206d304cf2c9a73.tar.bz2 |
Fixing warnings on Solaris.
pthread_t on Solaris is an integer type with size not equal to pointer size.
To avoid warnings, type casts to and from pointer needs to be done via
uintptr_t type.
This change originally proposed by Juraj Lutter <juraj@lutter.sk>.
Diffstat (limited to 'src/nxt_unit.c')
-rw-r--r-- | src/nxt_unit.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nxt_unit.c b/src/nxt_unit.c index 2fef17c5..ae4499d8 100644 --- a/src/nxt_unit.c +++ b/src/nxt_unit.c @@ -3785,7 +3785,7 @@ nxt_unit_shm_open(nxt_unit_ctx_t *ctx, size_t size) char name[64]; snprintf(name, sizeof(name), NXT_SHM_PREFIX "unit.%d.%p", - lib->pid, (void *) pthread_self()); + lib->pid, (void *) (uintptr_t) pthread_self()); #endif #if (NXT_HAVE_MEMFD_CREATE) |