]> andersk Git - splint.git/blobdiff - src/exprData.i
EXtensive code clean up. Almost passes LCLint.
[splint.git] / src / exprData.i
index e71f1761832511132d188df9d9a1d2d177282839..3e5c88e88b74d3325fa59df641d6fb05e1c0a9b9 100644 (file)
@@ -5,6 +5,10 @@
 **    All but the innermost storage is free'd.
 */
 
+/*@i777*/
+/*@-fcnuse*/
+/*@-shadow*/
+
 static void exprData_freeShallow (/*@only@*/ exprData data, exprKind kind)
 {
   /*@-compdestroy@*/ 
@@ -37,6 +41,7 @@ static void exprData_freeShallow (/*@only@*/ exprData data, exprKind kind)
       sfree (data->op);
       break;
 
+    case XPR_STMT:
     case XPR_PREOP: 
     case XPR_POSTOP:
     case XPR_PARENS: 
@@ -48,7 +53,6 @@ static void exprData_freeShallow (/*@only@*/ exprData data, exprKind kind)
     case XPR_CASE:      
     case XPR_RETURN:
     case XPR_WHILEPRED:
-    case XPR_STMT:
     case XPR_BLOCK:
       exprNode_freeShallow (data->single);
       break;
@@ -170,6 +174,7 @@ static void exprData_free (/*@only@*/ exprData data, exprKind kind)
       sfree (data->op);
       break;
 
+    case XPR_STMT:
     case XPR_PREOP: 
     case XPR_POSTOP:
     case XPR_PARENS: 
@@ -194,7 +199,6 @@ static void exprData_free (/*@only@*/ exprData data, exprKind kind)
     case XPR_ALIGNOF:
     case XPR_RETURN:
     case XPR_WHILEPRED:
-    case XPR_STMT:
     case XPR_BLOCK:
       exprNode_free (data->single);
       break;
@@ -484,31 +488,6 @@ static /*@exposed@*/ exprNode exprData_getSingle (exprData data)
   return (ret);
 }
 
-/*@only@*/ exprData exprData_makeLiteral (/*@only@*/ cstring s)
-{
-  exprData ed = (exprData) dmalloc (sizeof (*ed));
-  
-  ed->literal = s;
-  return ed;
-}
-
-/*@only@*/ exprData exprData_makeId (/*@temp@*/ uentry id)
-{
-  exprData ed = (exprData) dmalloc (sizeof (*ed));
-  ed->id = cstring_copy (uentry_rawName (id));
-  return ed;
-}
-
-/*@only@*/ exprData exprData_makePair (/*@keep@*/ exprNode a, /*@keep@*/ exprNode b)
-{
-  exprData ed = (exprData) dmalloc (sizeof (*ed));
-
-  ed->pair = (exprPair) dmalloc (sizeof (*ed->pair));
-  ed->pair->a = a;
-  ed->pair->b = b;
-
-  return ed;
-}
 
 static /*@only@*/ exprData 
   exprData_makeOp (/*@keep@*/ exprNode a, /*@keep@*/ exprNode b, /*@keep@*/ lltok op)
@@ -675,10 +654,6 @@ static /*@only@*/ exprData exprData_makeFor (/*@keep@*/ exprNode init,
 
 
 
+/*@=fcnuse*/
 
-
-
-
-
-
-
+/*@=shadow*/
This page took 0.03205 seconds and 4 git commands to generate.