summaryrefslogtreecommitdiff
path: root/shmem
diff options
context:
space:
mode:
authorJeff Trawick <trawick@apache.org>2002-02-04 19:33:38 +0000
committerJeff Trawick <trawick@apache.org>2002-02-04 19:33:38 +0000
commit8add8f47617f5f3f40b3932857bb022a6eb04b4a (patch)
tree475b63717d36674fd04d0224065e48db25f36226 /shmem
parent1a84ba2cb4f530f36941ceb0f344331f035a095e (diff)
downloadapr-8add8f47617f5f3f40b3932857bb022a6eb04b4a.tar.gz
Fix a few attempts to add to a void *ptr in the Unix shared memory
code. PR: 9710 Submitted by: Per Ekman [pek@pdc.kth.se] Reviewed by: Jeff Trawick, who expanded Per's fix to a couple of more places (so all breakage is mine :) ) git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@62911 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'shmem')
-rw-r--r--shmem/unix/shm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/shmem/unix/shm.c b/shmem/unix/shm.c
index 7a2dd9cf3..284622f27 100644
--- a/shmem/unix/shm.c
+++ b/shmem/unix/shm.c
@@ -189,7 +189,7 @@ APR_DECLARE(apr_status_t) apr_shm_create(apr_shm_t **m,
/* store the real size in the metadata */
*(apr_size_t*)(new_m->base) = new_m->realsize;
/* metadata isn't usable */
- new_m->usable = new_m->base + sizeof(apr_size_t);
+ new_m->usable = (char *)new_m->base + sizeof(apr_size_t);
apr_pool_cleanup_register(new_m->pool, new_m, shm_cleanup_owner,
apr_pool_cleanup_null);
@@ -345,7 +345,7 @@ APR_DECLARE(apr_status_t) apr_shm_create(apr_shm_t **m,
/* store the real size in the metadata */
*(apr_size_t*)(new_m->base) = new_m->realsize;
/* metadata isn't usable */
- new_m->usable = new_m->base + sizeof(apr_size_t);
+ new_m->usable = (char *)new_m->base + sizeof(apr_size_t);
apr_pool_cleanup_register(new_m->pool, new_m, shm_cleanup_owner,
apr_pool_cleanup_null);
@@ -508,7 +508,7 @@ APR_DECLARE(apr_status_t) apr_shm_attach(apr_shm_t **m,
}
/* metadata isn't part of the usable segment */
- new_m->usable = new_m->base + sizeof(apr_size_t);
+ new_m->usable = (char *)new_m->base + sizeof(apr_size_t);
apr_pool_cleanup_register(new_m->pool, new_m, shm_cleanup_attach,
apr_pool_cleanup_null);