Revision: 45577
          http://brlcad.svn.sourceforge.net/brlcad/?rev=45577&view=rev
Author:   brlcad
Date:     2011-07-23 02:32:51 +0000 (Sat, 23 Jul 2011)

Log Message:
-----------
cast the BU_ASSERT pointers through void* in order to hopefully get past the 
compiler (correctly) warning that the comparison will always evaluate as true.

Modified Paths:
--------------
    brlcad/trunk/include/bu.h

Modified: brlcad/trunk/include/bu.h
===================================================================
--- brlcad/trunk/include/bu.h   2011-07-22 17:43:15 UTC (rev 45576)
+++ brlcad/trunk/include/bu.h   2011-07-23 02:32:51 UTC (rev 45577)
@@ -818,12 +818,12 @@
  * the head, e.g.  * BU_LIST_INSERT(&(head.l), &((p)->l));
  */
 #define BU_LIST_INSERT(old, new) { \
-       BU_ASSERT((old) != NULL); \
-       BU_ASSERT((new) != NULL); \
+       BU_ASSERT((void *)(old) != (void *)NULL); \
+       BU_ASSERT((void *)(new) != (void *)NULL); \
        (new)->back = (old)->back; \
        (old)->back = (new); \
        (new)->forw = (old); \
-       BU_ASSERT((new)->back != NULL); \
+       BU_ASSERT((void *)((new)->back) != (void *)NULL); \
        (new)->back->forw = (new);  }
 
 /**
@@ -832,19 +832,19 @@
  * e.g.  * BU_LIST_APPEND(&(head.l), &((p)->l));
  */
 #define BU_LIST_APPEND(old, new) { \
-       BU_ASSERT((old) != NULL); \
-       BU_ASSERT((new) != NULL); \
+       BU_ASSERT((void *)(old) != (void *)NULL); \
+       BU_ASSERT((void *)(new) != (void *)NULL); \
        (new)->forw = (old)->forw; \
        (new)->back = (old); \
        (old)->forw = (new); \
-       BU_ASSERT((old)->forw != NULL); \
+       BU_ASSERT((void *)((old)->forw) != (void *)NULL); \
        (new)->forw->back = (new);  }
 
 /**
  * Dequeue "cur" item from anywhere in doubly-linked list
  */
 #define BU_LIST_DEQUEUE(cur) { \
-       BU_ASSERT((cur) != NULL); \
+       BU_ASSERT((void *)(cur) != (void *)NULL); \
        if (LIKELY((cur)->forw != NULL)) (cur)->forw->back = (cur)->back; \
        if (LIKELY((cur)->back != NULL)) (cur)->back->forw = (cur)->forw; \
        (cur)->forw = (cur)->back = BU_LIST_NULL;  /* sanity */ }
@@ -853,7 +853,7 @@
  * Dequeue "cur" but do not fix its links
  */
 #define BU_LIST_DQ(cur) {\
-       BU_ASSERT((cur) != NULL); \
+       BU_ASSERT((void *)(cur) != (void *)NULL); \
        if (LIKELY((cur)->forw != NULL)) (cur)->forw->back = (cur)->back; \
        if (LIKELY((cur)->back != NULL)) (cur)->back->forw = (cur)->forw; }
 


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Storage Efficiency Calculator
This modeling tool is based on patent-pending intellectual property that
has been used successfully in hundreds of IBM storage optimization engage-
ments, worldwide.  Store less, Store more with what you own, Move data to 
the right place. Try It Now! http://www.accelacomm.com/jaw/sfnl/114/51427378/
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to