Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2014-09-26 01:51:09 +0400
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2014-09-26 01:59:38 +0400
commit32f83a298cc7f1e0d367a199866d3f6483f97675 (patch)
treefb2cbedf53be20d81bc44a5227d9a98d0c83b019
parentaf069cd013e14642cecb46026f929cd5c897fd05 (diff)
Fix build errors in atomic ops and warning in aligned malloc on OS X.
-rw-r--r--intern/atomic/atomic_ops.h4
-rw-r--r--intern/guardedalloc/intern/mallocn.c1
2 files changed, 3 insertions, 2 deletions
diff --git a/intern/atomic/atomic_ops.h b/intern/atomic/atomic_ops.h
index 5ffc32a7b5a..f63ff630c40 100644
--- a/intern/atomic/atomic_ops.h
+++ b/intern/atomic/atomic_ops.h
@@ -128,7 +128,7 @@ ATOMIC_INLINE uint64_t
atomic_cas_uint64(uint64_t *v, uint64_t old, uint64_t _new)
{
uint64_t init_val = *v;
- OSAtomicCompareAndSwap64(old, _new, v);
+ OSAtomicCompareAndSwap64((int64_t)old, (int64_t)_new, (int64_t *)v);
return init_val;
}
# elif (defined(__amd64__) || defined(__x86_64__))
@@ -273,7 +273,7 @@ ATOMIC_INLINE uint32_t
atomic_cas_uint32(uint32_t *v, uint32_t old, uint32_t _new)
{
uint32_t init_val = *v;
- OSAtomicCompareAndSwap32(old, _new, v);
+ OSAtomicCompareAndSwap32((int32_t)old, (int32_t)_new, (int32_t *)v);
return init_val;
}
#elif (defined(__i386__) || defined(__amd64__) || defined(__x86_64__))
diff --git a/intern/guardedalloc/intern/mallocn.c b/intern/guardedalloc/intern/mallocn.c
index 40f406d0ae2..be0a8aadf84 100644
--- a/intern/guardedalloc/intern/mallocn.c
+++ b/intern/guardedalloc/intern/mallocn.c
@@ -72,6 +72,7 @@ void *aligned_malloc(size_t size, size_t alignment)
* they work natively with SSE types with no further work.
*/
assert(alignment == 16);
+ (void)alignment;
return malloc(size);
#elif defined(__FreeBSD__) || defined(__NetBSD__)
void *result;