summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2014-04-14 21:53:40 +0200
committerSebastian Dröge <sebastian@centricular.com>2014-04-14 21:53:40 +0200
commit5e9c4ec97324f27b1b23cd118325f4cfa1db6d73 (patch)
treeea9f4f946c46662c89eb66e6596325c428cb27f3
parent6ba1214f371c56c9c6b0b319d8abccafc3d3f953 (diff)
downloadorc-5e9c4ec97324f27b1b23cd118325f4cfa1db6d73.tar.gz
orcarray: Fix compiler warning with gcc 4.9
In file included from ../orc/orcprogram.h:5:0, from ../orc/orc.h:5, from ../orc-test/orctest.h:5, from orcarray.c:6: ../orc/orcutils.h:124:37: error: 'data' may be used uninitialized in this function [-Werror=maybe-uninitialized] #define ORC_PTR_OFFSET(ptr,offset) ((void *)(((unsigned char *)(ptr)) + (offset))) ^ orcarray.c:42:9: note: 'data' was declared here void *data;
-rw-r--r--orc-test/orcarray.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/orc-test/orcarray.c b/orc-test/orcarray.c
index 9860204..089b0d1 100644
--- a/orc-test/orcarray.c
+++ b/orc-test/orcarray.c
@@ -42,7 +42,7 @@ orc_array_new (int n, int m, int element_size, int misalignment,
void *data;
#ifndef USE_MMAP
#ifdef HAVE_POSIX_MEMALIGN
- int ret ORC_GNUC_UNUSED;
+ int ret;
#endif
#endif
int offset;
@@ -71,6 +71,7 @@ orc_array_new (int n, int m, int element_size, int misalignment,
#else
#ifdef HAVE_POSIX_MEMALIGN
ret = posix_memalign (&data, ALIGNMENT, ar->alloc_len);
+ ORC_ASSERT (ret == 0);
ar->alloc_data = data;
ar->aligned_data = data;
#else