]> andersk Git - splint.git/blobdiff - src/sRef.c
Passes the standard LCLint test suite. YAAAAAAYYYY!!!!!
[splint.git] / src / sRef.c
index 34025217a6c08a0c6e0a8c8d798ad595618c1821..9c8e80250c61723939f179a68482059d906df3e0 100644 (file)
@@ -3472,7 +3472,7 @@ sRef_mergeStateAux (/*@notnull@*/ sRef res, /*@notnull@*/ sRef other,
          res->definfo = alinfo_update (res->definfo, other->definfo);
          sRef_clearDerived (other);
          sRef_clearDerived (res);
-               }
+       }
       else if (res->defstate == SS_DEAD 
               && ((sRef_isOnly (other) && sRef_definitelyNull (other))
                   || (other->defstate == SS_UNDEFINED
@@ -3487,7 +3487,7 @@ sRef_mergeStateAux (/*@notnull@*/ sRef res, /*@notnull@*/ sRef other,
            {
              res->defstate = SS_DEAD;
            }
-
+         
          sRef_clearDerived (other);
          sRef_clearDerived (res);
        }
@@ -4985,7 +4985,7 @@ void sRef_setNullState (sRef s, nstate n, fileloc loc)
     }
 }
 
-void sRef_setNullTerminatedStateInnerComplete (sRef s, struct _bbufinfo b, fileloc loc) {
+void sRef_setNullTerminatedStateInnerComplete (sRef s, struct _bbufinfo b, /*@unused@*/ fileloc loc) {
    
   switch (b.bufstate) {
      case BB_NULLTERMINATED:
@@ -5978,7 +5978,8 @@ void sRef_setArrayFetchState (/*@notnull@*/ /*@exposed@*/ sRef s,
       
       if (ctype_isMutable (s->type) 
          && !ctype_isPointer (arr->type) 
-         && !alkind_isStatic (arr->aliaskind))
+         && !alkind_isStatic (arr->aliaskind)
+         && !alkind_isStack (arr->aliaskind)) /* evs - 2000-06-20: don't pass stack allocation to members */
        {
          s->aliaskind = arr->aliaskind;
        }
@@ -8806,7 +8807,7 @@ cstring sRef_nullMessage (sRef s)
   BADEXIT;
 }
 
-cstring sRef_ntMessage (sRef s)
+/*@observer@*/ cstring sRef_ntMessage (sRef s)
 {
   llassert (sRef_isValid (s));
 
@@ -9034,7 +9035,8 @@ struct _bbufinfo sRef_getNullTerminatedState (sRef p_s) {
    struct _bbufinfo BUFSTATE_UNKNOWN;
    BUFSTATE_UNKNOWN.bufstate = BB_NOTNULLTERMINATED;
    BUFSTATE_UNKNOWN.size = 0;
-
+   BUFSTATE_UNKNOWN.len = 0;
+   
    if (sRef_isValid(p_s))
       return p_s->bufinfo;
    return BUFSTATE_UNKNOWN; 
@@ -9089,3 +9091,23 @@ void sRef_resetLen(sRef p_s) {
                llfatalbug (message ("sRef_setLen passed an invalid sRef\n"));
        }
 }
+
+/*drl7x 11/28/2000 */
+
+bool sRef_isFixedArray (sRef p_s) {
+  ctype c;
+  c = sRef_getType (p_s);
+  return ( ctype_isFixedArray (c) );
+}
+
+int sRef_getArraySize (sRef p_s) {
+  ctype c;
+  llassert (sRef_isFixedArray(p_s) );
+
+  c = sRef_getType (p_s);
+
+  return (ctype_getArraySize (c) );
+}
+
+
+
This page took 0.086002 seconds and 4 git commands to generate.