Module: xenomai-forge
Branch: master
Commit: 9b83a4a1672b8ec7bd2154e00c5905cef3565a24
URL:    
http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=9b83a4a1672b8ec7bd2154e00c5905cef3565a24

Author: Gilles Chanteperdrix <gilles.chanteperd...@xenomai.org>
Date:   Wed Dec 19 20:47:04 2012 +0100

nucleus/bheap: avoid array bound checking warning

---

 include/cobalt/nucleus/bheap.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/cobalt/nucleus/bheap.h b/include/cobalt/nucleus/bheap.h
index 4ff1a9e..180c987 100644
--- a/include/cobalt/nucleus/bheap.h
+++ b/include/cobalt/nucleus/bheap.h
@@ -44,13 +44,13 @@ typedef struct bheaph {
 typedef struct bheap {
        unsigned sz;
        unsigned last;
-       bheaph_t *elems[1]; /* only padding, indexing starts at 1 */
+       bheaph_t *elems[]; /* only padding, indexing starts at 1 */
 } bheap_t;
 
 #define DECLARE_BHEAP_CONTAINER(name, sz)       \
        struct {                                \
                bheap_t bheap;                  \
-               bheaph_t *elems[sz];            \
+               bheaph_t *elems[sz + 1];        \
        } name
 
 /* Check the binary heap invariant. */


_______________________________________________
Xenomai-git mailing list
Xenomai-git@xenomai.org
http://www.xenomai.org/mailman/listinfo/xenomai-git

Reply via email to