]> andersk Git - splint.git/blobdiff - src/constraintResolve.c
Fixed problem with unnamed unions within struct definitions.
[splint.git] / src / constraintResolve.c
index 9af334b7874a99fbfd457022a7028084c96ec206..9cbc788d2feed66d4cdd39d7e2cdf0a3987efddd 100644 (file)
@@ -17,8 +17,8 @@
 ** the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
 ** MA 02111-1307, USA.
 **
-** For information on lclint: lclint-request@cs.virginia.edu
-** To report a bug: lclint-bug@cs.virginia.edu
+** For information on splint: info@splint.org
+** To report a bug: splint-bug@splint.org
 ** For more information: http://www.splint.org
 */
 
@@ -30,7 +30,7 @@
 /* #define DEBUGPRINT 1 */
 
 # include <ctype.h> /* for isdigit */
-# include "lclintMacros.nf"
+# include "splintMacros.nf"
 # include "basic.h"
 # include "cgrammar.h"
 # include "cgrammar_tokens.h"
 # include "exprNodeSList.h"
 
 
-/*@access constraint, exprNode @*/
+/*@access constraint, exprNode @*/ /*!!! NO! Don't do this so recklessly - design your code more carefully so you don't need to! */
+
+/*@-nullderef@*/ /* !!! DRL needs to fix this code! */
+/*@-nullstate@*/ /* !!! DRL needs to fix this code! */
+/*@-nullpass@*/ /* !!! DRL needs to fix this code! */
+/*@-temptrans@*/ /* !!! DRL needs to fix this code! */
+
 
 
 static constraint  inequalitySubstitute  (/*@returned@*/ constraint p_c, constraintList p_p);
@@ -125,6 +131,13 @@ static /*@only@*/ constraintList reflectChangesEnsuresFree1 (/*@only@*/ constrai
 
   DPRINTF((message ("constraintList_mergeRequires: merging  %s and %s ", constraintList_print (list1), constraintList_print(list2) ) ) );
 
+  if (context_getFlag (FLG_REDUNDANTCONSTRAINTS) )
+    {
+      ret = constraintList_copy(list1);
+      ret = constraintList_addList(ret, list2); 
+      return ret;
+    }
+    
   /* get constraints in list1 not satified by list2 */
   temp = constraintList_reflectChanges(list1, list2);
   DPRINTF((message ("constraintList_mergeRequires: temp = %s", constraintList_print(temp) ) ) );
@@ -432,7 +445,7 @@ static /*@only@*/ constraint doResolve (/*@only@*/ constraint c, constraintList
     }
   constraint_free(c);
   
-  *resolved = TRUE;
+  /*drl bee: pbr*/ *resolved = TRUE;
   return NULL;
 }
 
@@ -447,7 +460,7 @@ static /*@only@*/ constraint doResolveOr (/*@observer@*/ /*@temp@*/ constraint c
 
 
   
-  *resolved = FALSE;
+   /*drl bee: pbr*/ *resolved = FALSE;
 
 
   ret = constraint_copy(c);
@@ -481,7 +494,7 @@ static /*@only@*/ constraint doResolveOr (/*@observer@*/ /*@temp@*/ constraint c
 
       curr = doResolve (curr, post1, resolved);
       
-      if (*resolved)
+    /*drl bee: pbr*/    if (*resolved)
        {
          /* curr is null so we don't try to free it*/
          llassert(curr == NULL);
This page took 0.112989 seconds and 4 git commands to generate.