summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/pcre2/src/sljit/sljitProtExecAllocator.c
diff options
context:
space:
mode:
authorTarja Sundqvist <tarja.sundqvist@qt.io>2023-04-24 16:43:14 +0300
committerTarja Sundqvist <tarja.sundqvist@qt.io>2023-04-24 16:43:14 +0300
commit29400a683f96867133b28299c0d0bd6bcf40df35 (patch)
treeb616dfb91ce111d61a34a67b28069561306575da /src/3rdparty/pcre2/src/sljit/sljitProtExecAllocator.c
parent42e4ae042a4c86e58bcb8b6d2d59ba4a988285b4 (diff)
parent9c60c8b122e5eb74fe74e11b929c30aa19ec0dd3 (diff)
Merge remote-tracking branch 'origin/tqtc/lts-5.15.10' into tqtc/lts-5.15-opensourcev5.15.10-lts-lgpl
Diffstat (limited to 'src/3rdparty/pcre2/src/sljit/sljitProtExecAllocator.c')
-rw-r--r--src/3rdparty/pcre2/src/sljit/sljitProtExecAllocator.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/3rdparty/pcre2/src/sljit/sljitProtExecAllocator.c b/src/3rdparty/pcre2/src/sljit/sljitProtExecAllocator.c
index 147175afa6..915411fbed 100644
--- a/src/3rdparty/pcre2/src/sljit/sljitProtExecAllocator.c
+++ b/src/3rdparty/pcre2/src/sljit/sljitProtExecAllocator.c
@@ -66,7 +66,7 @@
/* --------------------------------------------------------------------- */
/* 64 KByte. */
-#define CHUNK_SIZE 0x10000
+#define CHUNK_SIZE (sljit_uw)0x10000
struct chunk_header {
void *executable;
@@ -194,7 +194,7 @@ static SLJIT_INLINE struct chunk_header* alloc_chunk(sljit_uw size)
if (fd == -1)
return NULL;
- if (ftruncate(fd, size)) {
+ if (ftruncate(fd, (off_t)size)) {
close(fd);
return NULL;
}
@@ -281,7 +281,7 @@ struct free_block {
#define AS_FREE_BLOCK(base, offset) \
((struct free_block*)(((sljit_u8*)base) + offset))
#define MEM_START(base) ((void*)((base) + 1))
-#define ALIGN_SIZE(size) (((size) + sizeof(struct block_header) + 7) & ~7)
+#define ALIGN_SIZE(size) (((size) + sizeof(struct block_header) + 7u) & ~(sljit_uw)7)
static struct free_block* free_blocks;
static sljit_uw allocated_size;