From 8fd556fb32e6886724d72e99270d429554f28ea6 Mon Sep 17 00:00:00 2001 From: drl7x Date: Mon, 7 Apr 2003 01:09:32 +0000 Subject: [PATCH] Removed /*bee:...*/ comments. These comments contained important about place where the splintme detected potential bounds errors within Splint. They were removed because this information was not particularly useful and it made the code harder to read. --- doc/realloc.doc | Bin 23552 -> 0 bytes src/constraintResolve.c | 6 ++--- src/cppexp.c | 16 ++++++------- src/cstring.c | 43 ++++++++++++++++----------------- src/cstringTable.c | 52 +++++++++++++++++++--------------------- src/ctype.c | 2 +- src/enumNameList.c | 32 ++++++++----------------- src/filelocStack.c | 37 ++++++++++------------------ src/flags.c | 15 +----------- src/macrocache.c | 22 ++++++++--------- 10 files changed, 91 insertions(+), 134 deletions(-) delete mode 100755 doc/realloc.doc diff --git a/doc/realloc.doc b/doc/realloc.doc deleted file mode 100755 index 5712b336e616ac71baefe0f6a6c0183d645b0011..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 23552 zcmeHPeUKc*b?^PUy*qU1BqVW`WVA;SKO>CU-hj6Gs#Tc-QxKat_QY?pZxhfUm7+3yCfGQhTk*ZWFg>hW5Dwc>z znZ#!E`*lz6$8md{gkw8lTKa9z^vCPh@4bHAJ=1f~J-gz}m;P$)zleF^eIg@XtM`bm zmh=>^x0w5WA>NH^roC3L*O@#7;4%sSha_&qKyovuxRd)37x_+nt(dTr9? z$E%nShbXT5@k?~VLh&+W-HUw2ru_TC3sK1&7<^>}U!{5B@H{_pmTZ5rz;`wyV{m)Tv4Jv*=me2f{CC^U zd|HE{)0(!FYr~hJM>@0vL+{^k{|?++Xm0?q;lspBX=9->pNsi7?LUBaXh+po9z2wN z>05M+Dj2)_3*>J^${gx-$9aql-z%Z_QQXu1819bCWiQkB|A6`oyyp-#?W;um82dG` z>0hVV)HAVZ$K0EGY-bFKrk^G@@-_D+HuXEjrriA4*rSO}KN#PW!MMol*wCdsXlJeE zn8$JqX_0E^K&K?Xi3Ab}v`gS{=y=oeNM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}-Jo)0cQtCSU z%ndwQPFa&j#`MLE>7^MbA(22LfkXm{1QH1(5=bPFNFb3wB7sB#i3Ab}EF^)&_W$YU z|MB^UN7nWK@q^g^55M|V?*FgHev^B2?mx=__vKZ9`&B*<;C`9U1Ne;KG2n9G&jId_ zPXhhGHvsP6PXqjt{OM!FBboSK3EPkJjJGrAg2GC8FVpr?`_Be0 zyrs@;T}=C(sa<%^n`xi6oA}gL3BI+iQ_w!YlVh*v`)>M)d1usa^b55L{uq>66MX0( f&#fUztps>IV)94E#80pL+8q~e%Snx2tpxrDh4T2^ diff --git a/src/constraintResolve.c b/src/constraintResolve.c index fc9f964..1616acf 100644 --- a/src/constraintResolve.c +++ b/src/constraintResolve.c @@ -505,7 +505,7 @@ static /*@only@*/ constraint doResolve (/*@only@*/ constraint c, constraintList } constraint_free(c); - /*drl bee: pbr*/ *resolved = TRUE; + *resolved = TRUE; return NULL; } @@ -520,7 +520,7 @@ static /*@only@*/ constraint doResolveOr (/*@observer@*/ /*@temp@*/ constraint c - /*drl bee: pbr*/ *resolved = FALSE; + *resolved = FALSE; llassert(constraint_isDefined(c) ); @@ -557,7 +557,7 @@ static /*@only@*/ constraint doResolveOr (/*@observer@*/ /*@temp@*/ constraint c curr = doResolve (curr, post1, resolved); - /*drl bee: pbr*/ if (*resolved) + if (*resolved) { /* curr is null so we don't try to free it*/ llassert(curr == NULL); diff --git a/src/cppexp.c b/src/cppexp.c index 6f59849..3c97c98 100644 --- a/src/cppexp.c +++ b/src/cppexp.c @@ -256,7 +256,7 @@ cppReader_parseNumber (cppReader *pfile, char *start, int olen) /*@requires maxR for (i = 0; i < len; i++) { - /*drl bee: is*/ if (p[i] == '.') { + if (p[i] == '.') { /* It's a float since it contains a point. */ cppReader_errorLit (pfile, @@ -335,7 +335,7 @@ cppReader_parseNumber (cppReader *pfile, char *start, int olen) /*@requires maxR /*@innerbreak@*/ break; } - /*drl bee: ltc*/ c = *p++; + c = *p++; } /* Don't look for any more digits after the suffixes. */ break; @@ -516,7 +516,7 @@ struct operation cppexp_lex (cppReader *pfile) } ++ptr; - /*drl bee: hda*/ while (ptr < tok_end && ((c = *ptr++) != '\'')) + while (ptr < tok_end && ((c = *ptr++) != '\'')) { if (c == '\\') { @@ -547,7 +547,7 @@ struct operation cppexp_lex (cppReader *pfile) } } - /*drl bee: dad*/ token_buffer[num_chars] = 0; + token_buffer[num_chars] = 0; if (c != '\'') cppReader_errorLit (pfile, @@ -629,8 +629,8 @@ struct operation cppexp_lex (cppReader *pfile) { for (toktab = tokentab2; toktab->operator != NULL; toktab++) { - /*drl bee: hda*/ if (tok_start[0] == /*drl bee: hda*/ toktab->operator[0] - && /*drl bee: hda*/ tok_start[1] == /*drl bee: hda*/ toktab->operator[1]) + if (tok_start[0] == toktab->operator[0] && + tok_start[1] == toktab->operator[1]) { /*@loopbreak@*/ break; } @@ -674,7 +674,7 @@ struct operation cppexp_lex (cppReader *pfile) int cppReader_parseEscape (cppReader *pfile, char **string_ptr) { - /*drl bee: pbr*/ char c = *(*string_ptr)++; + char c = *(*string_ptr)++; switch (c) { @@ -728,7 +728,7 @@ cppReader_parseEscape (cppReader *pfile, char **string_ptr) else { - /*drl bee: pbr*/ (*string_ptr)--; + (*string_ptr)--; /*@loopbreak@*/ break; } } diff --git a/src/cstring.c b/src/cstring.c index c6e1f47..4b125d3 100644 --- a/src/cstring.c +++ b/src/cstring.c @@ -265,7 +265,7 @@ void cstring_stripChars (cstring s, const char *clist) for (i = 0; i < size_toInt (size); i++) { - /*drl bee: is*/ + char c = s[i]; if (strchr (clist, c) != NULL) @@ -277,10 +277,10 @@ void cstring_stripChars (cstring s, const char *clist) for (j = i; j < size_toInt (size); j++) { - /*drl bee: is*/ /*drl bee: is*/ s[j] = s[j+1]; + s[j] = s[j+1]; } - /*drl bee: is*/ s[size] = '\0'; + s[size] = '\0'; i--; } } @@ -375,8 +375,7 @@ cmpcode cstring_genericEqual (cstring s, cstring t, t++; } - /*drl bee: ib*/ - /*drl bee: ib*/ + if (*s == '\0' && *t != '\0') { return CGE_DISTINCT; @@ -592,7 +591,7 @@ cstring_clip (cstring s, size_t len) else { llassert (s != NULL); - /*drl bee: mrms*/ + *(s + len) = '\0'; } @@ -611,7 +610,7 @@ cstring_elide (cstring s, size_t len) cstring sc = cstring_create (len); strncpy (sc, s, len); - /*drl bee: mrms*/ + *(sc + len - 1) = '\0'; *(sc + len - 2) = '.'; *(sc + len - 3) = '.'; @@ -633,8 +632,7 @@ cstring_fill (cstring s, size_t n) /*@requires n >= 0 @*/ { for (i = 0; i < n; i++) { - /*drl bee: is*/ - /*drl bee: is*/ + *t++ = *s++; } *t = '\0'; @@ -643,13 +641,12 @@ cstring_fill (cstring s, size_t n) /*@requires n >= 0 @*/ { for (i = 0; i < len; i++) { - /*drl bee: is*/ -/*drl bee: is*/ + *t++ = *s++; } for (i = 0; i < n - len; i++) { -/*drl bee: is*/ + *t++ = ' '; } *t = '\0'; @@ -667,7 +664,7 @@ cstring_downcase (cstring s) cstring ot = t; char c; - /*drl bee: lhnt*/ while ((c = *s) != '\0') + while ((c = *s) != '\0') { if (c >= 'A' && c <= 'Z') { @@ -676,7 +673,7 @@ cstring_downcase (cstring s) *t++ = c; s++; } - /*drl bee: is*/ *t = '\0'; + *t = '\0'; return ot; } @@ -698,13 +695,13 @@ cstring_appendChar (/*@only@*/ cstring s1, char c) { strcpy (s, s1); *(s + l) = c; - /*drl bee: dm*/ *(s + l + 1) = '\0'; + *(s + l + 1) = '\0'; sfree (s1); } else { *(s) = c; - /*drl bee: dm*/ *(s + 1) = '\0'; + *(s + 1) = '\0'; } return s; @@ -753,7 +750,7 @@ cstring_concat (cstring s, cstring t) /*@requires maxSet(s) >= 0 @*/ if (cstring_isDefined (s)) { - /*drl bee: sl*/ strcpy (ret, s); + strcpy (ret, s); } if (cstring_isDefined (t)) { @@ -778,7 +775,7 @@ cstring_prependChar (char c, /*@temp@*/ cstring s1) size_t l = cstring_length (s1); char *s = (char *) dmalloc (sizeof (*s) * (l + 2)); -/*drl bee: dm*/ *(s) = c; + *(s) = c; if (cstring_isDefined (s1)) { @@ -787,7 +784,7 @@ cstring_prependChar (char c, /*@temp@*/ cstring s1) /*@=mayaliasunique@*/ } - /*drl bee: dm*/ *(s + l + 1) = '\0'; + *(s + l + 1) = '\0'; return s; } @@ -798,7 +795,7 @@ cstring_hasNonAlphaNumBar (cstring s) if (cstring_isUndefined (s)) return FALSE; -/*drl bee: lhnt*/ while ((c = (int) *s) != (int) '\0') + while ((c = (int) *s) != (int) '\0') { if ((isalnum (c) == 0) && (c != (int) '_') && (c != (int) '.') && (c != (int) CONNECTCHAR)) @@ -816,7 +813,7 @@ cstring_create (size_t n) { char *s = dmalloc (sizeof (*s) * (n + 1)); - /*drl bee: dm*/ *s = '\0'; + *s = '\0'; return s; } @@ -880,7 +877,7 @@ cstring cstring_bsearch (cstring key, char **table, int nentries) if (mid != 0 && mid < nentries - 1) { llassert (cstring_compare (key, table[mid - 1]) > 0); - /*drl bee: ndv*/ llassert (cstring_compare (key, table[mid + 1]) < 0); + llassert (cstring_compare (key, table[mid + 1]) < 0); } return res; @@ -894,7 +891,7 @@ extern /*@observer@*/ cstring cstring_advanceWhiteSpace (cstring s) if (cstring_isDefined (s)) { char *t = s; - /*drl bee: lhnt*/ while (*t != '\0' && isspace ((int) *t)) { + while (*t != '\0' && isspace ((int) *t)) { t++; } diff --git a/src/cstringTable.c b/src/cstringTable.c index 9be49ed..5eeb122 100644 --- a/src/cstringTable.c +++ b/src/cstringTable.c @@ -83,7 +83,7 @@ hbucket_unparse (hbucket h) for (i = 0; i < h->size; i++) { - /*drl bee: si*/ s = message ("%q %s:%d", s, h->entries[i]->key, h->entries[i]->val); + s = message ("%q %s:%d", s, h->entries[i]->key, h->entries[i]->val); } } @@ -98,7 +98,7 @@ hbucket_single (/*@only@*/ hentry e) h->size = 1; h->nspace = HBUCKET_BASESIZE - 1; h->entries = (hentry *) dmalloc (HBUCKET_BASESIZE * sizeof (*h->entries)); - /*drl bee: dm*/ h->entries[0] = e; + h->entries[0] = e; return (h); } @@ -116,8 +116,7 @@ hbucket_grow (/*@notnull@*/ hbucket h) for (i = 0; i < h->size; i++) { - /*drl bee: dm*/ - /*drl bee: si*/ newentries[i] = h->entries[i]; + newentries[i] = h->entries[i]; } /*@i32@*/ sfree (h->entries); @@ -148,7 +147,7 @@ hbucket_add (/*@notnull@*/ hbucket h, /*@only@*/ hentry e) } llassert (e->val != HBUCKET_DNE); - /*drl bee: si*/ h->entries[h->size] = e; + h->entries[h->size] = e; h->size++; h->nspace--; } @@ -171,7 +170,7 @@ hbucket_lookup (hbucket h, cstring key) for (i = 0; i < h->size; i++) { - /*drl bee: si*/ if (cstring_equal (h->entries[i]->key, key)) + if (cstring_equal (h->entries[i]->key, key)) { return h->entries[i]->val; } @@ -207,7 +206,7 @@ cstringTable_free (/*@only@*/ cstringTable h) for (i = 0; i < h->size; i++) { - /*drl bee: si*/ hbucket_free (h->buckets[i]); + hbucket_free (h->buckets[i]); } sfree (h->buckets); @@ -224,7 +223,7 @@ cstringTable_countCollisions (cstringTable h) for (i = 0; i < h->size; i++) { - /*drl bee: si*/ nc += hbucket_ncollisions (h->buckets[i]); + nc += hbucket_ncollisions (h->buckets[i]); } return (nc); @@ -241,7 +240,7 @@ cstringTable_countEmpty (cstringTable h) for (i = 0; i < h->size; i++) { - /*drl bee: si*/ if (hbucket_isEmpty (h->buckets[i])) + if (hbucket_isEmpty (h->buckets[i])) { nc++; } @@ -263,7 +262,7 @@ cstringTable_hashValue (/*@notnull@*/ cstringTable h, cstring key) for (p = cstring_toCharsSafe (key); *p != '\0'; p++) { - /*drl bee: nm*/ hash_value = (hash_value << 1) ^ g_randomNumbers[*p % 256]; + hash_value = (hash_value << 1) ^ g_randomNumbers[*p % 256]; } return (hash_value % h->size); @@ -289,7 +288,7 @@ cstringTable_create (int size) /*@+loopexec@*/ for (i = 0; i < size; i++) { - /*drl bee: dm*/ h->buckets[i] = hbucket_undefined; + h->buckets[i] = hbucket_undefined; } /*@-loopexec@*/ return h; @@ -304,7 +303,7 @@ cstring cstringTable_unparse (cstringTable h) { for (i = 0; i < h->size; i++) { - /*drl bee: si*/ hbucket hb = h->buckets[i]; + hbucket hb = h->buckets[i]; if (hb != NULL) { @@ -356,15 +355,15 @@ cstringTable_rehash (/*@notnull@*/ cstringTable h) /*@+loopexec@*/ for (i = 0; i < newsize; i++) { - /*drl bee: dm*/ h->buckets[i] = hbucket_undefined; + h->buckets[i] = hbucket_undefined; } /*@=loopexec@*/ for (i = 0; i < oldsize; i++) { - /*drl bee: dm*/ hbucket bucket = oldbuckets[i]; + hbucket bucket = oldbuckets[i]; - /*drl bee: dm*/ oldbuckets[i] = NULL; + oldbuckets[i] = NULL; if (!hbucket_isNull (bucket)) { @@ -372,7 +371,7 @@ cstringTable_rehash (/*@notnull@*/ cstringTable h) for (j = 0; j < bucket->size; j++) { - /*drl bee: si*/ cstringTable_addEntry (h, bucket->entries[j]); + cstringTable_addEntry (h, bucket->entries[j]); } /* @@ -399,9 +398,9 @@ cstringTable_addEntry (/*@notnull@*/ cstringTable h, /*@only@*/ hentry e) ** instead reveals a bug I don't want to deal with right now! */ - /*drl bee: si*/ if (hbucket_isNull (h->buckets[hindex])) + if (hbucket_isNull (h->buckets[hindex])) { - /*drl bee: si*/ h->buckets[hindex] = hbucket_single (e); + h->buckets[hindex] = hbucket_single (e); h->nentries++; } else @@ -440,11 +439,11 @@ cstringTable_insert (cstringTable h, cstring key, int value) hindex = cstringTable_hashValue (h, key); e = hentry_create (key, value); - /*drl bee: si*/ hb = h->buckets[hindex]; + hb = h->buckets[hindex]; if (hbucket_isNull (hb)) { - /*drl bee: si*/ h->buckets[hindex] = hbucket_single (e); + h->buckets[hindex] = hbucket_single (e); } else { @@ -478,9 +477,9 @@ cstringTable_update (cstringTable h, cstring key, int newval) for (i = 0; i < hb->size; i++) { - /*drl bee: si*/ if (cstring_equal (hb->entries[i]->key, key)) + if (cstring_equal (hb->entries[i]->key, key)) { - /*drl bee: si*/ hb->entries[i]->val = newval; + hb->entries[i]->val = newval; return; } } @@ -508,9 +507,9 @@ cstringTable_replaceKey (cstringTable h, cstring oldkey, /*@only@*/ cstring newk for (i = 0; i < hb->size; i++) { - /*drl bee: si*/ if (cstring_equal (hb->entries[i]->key, oldkey)) + if (cstring_equal (hb->entries[i]->key, oldkey)) { - /*drl bee: si*/ hb->entries[i]->key = newkey; + hb->entries[i]->key = newkey; return; } } @@ -533,12 +532,11 @@ cstringTable_remove (cstringTable h, cstring key) for (i = 0; i < hb->size; i++) { - /*drl bee: si*/ if (cstring_equal (hb->entries[i]->key, key)) + if (cstring_equal (hb->entries[i]->key, key)) { if (i < hb->size - 1) { - /*drl bee: si*/ - hb->entries[i] = hb->entries[hb->size - 1]; + hb->entries[i] = hb->entries[hb->size - 1]; } hb->size--; diff --git a/src/ctype.c b/src/ctype.c index 1cc720a..1ea98e0 100644 --- a/src/ctype.c +++ b/src/ctype.c @@ -1092,7 +1092,7 @@ static bool { ctype cbr = ctype_getConjA (*c); - /*drl bee: si*/ if ((*pred) (cbr)) + if ((*pred) (cbr)) { if ((*pred) (ctype_getConjB (*c))) { diff --git a/src/enumNameList.c b/src/enumNameList.c index 7d32aae..e4a5cd0 100644 --- a/src/enumNameList.c +++ b/src/enumNameList.c @@ -55,8 +55,7 @@ enumNameList_single (/*@keep@*/ enumName t) s->nelements = 1; s->nspace = enumNameListBASESIZE - 1; s->elements = (enumName *) dmalloc (sizeof (*s->elements) * enumNameListBASESIZE); - /*drl bee: dm*/ - s->elements[0] = t; + s->elements[0] = t; return (s); } @@ -70,9 +69,7 @@ enumNameList_match (enumNameList e1, enumNameList e2) for (i = 0; i < e1->nelements; i++) { - /*drl bee: si*/ - /*drl bee: si*/ - if (!cstring_equal (e1->elements[i], e2->elements[i])) + if (!cstring_equal (e1->elements[i], e2->elements[i])) return FALSE; } return TRUE; @@ -94,9 +91,7 @@ enumNameList_grow (enumNameList s) for (i = 0; i < s->nelements; i++) { - /*drl bee: si*/ - /*drl bee: si*/ - newelements[i] = s->elements[i]; + newelements[i] = s->elements[i]; } sfree (s->elements); @@ -110,8 +105,7 @@ enumNameList_addh (enumNameList s, /*@keep@*/ enumName el) enumNameList_grow (s); s->nspace--; - /*drl bee: si*/ - s->elements[s->nelements] = el; + s->elements[s->nelements] = el; s->nelements++; } @@ -172,13 +166,11 @@ enumNameList_unparse (enumNameList s) { if (i == 0) { - /*drl bee: si*/ - st = cstring_copy (s->elements[i]); + st = cstring_copy (s->elements[i]); } else { - /*drl bee: si*/ - st = message ("%q, %s", st, s->elements[i]); + st = message ("%q, %s", st, s->elements[i]); } } @@ -194,8 +186,7 @@ cstring enumNameList_unparseBrief (enumNameList s) { if (i == 0) { - /*drl bee: si*/ - st = cstring_copy (s->elements[i]); + st = cstring_copy (s->elements[i]); } else if (i == 3 && s->nelements > 5) { @@ -204,8 +195,7 @@ cstring enumNameList_unparseBrief (enumNameList s) } else { - /*drl bee: si*/ - st = message ("%q, %s", st, s->elements[i]); + st = message ("%q, %s", st, s->elements[i]); } } @@ -222,12 +212,10 @@ enumNameList_dump (enumNameList s) { if (i == 0) { - /*drl bee: si*/ - st = cstring_copy (s->elements[i]); + st = cstring_copy (s->elements[i]); } else - /*drl bee: si*/ - st = message ("%q,%s", st, s->elements[i]); + st = message ("%q,%s", st, s->elements[i]); } return st; } diff --git a/src/filelocStack.c b/src/filelocStack.c index c667032..547056c 100644 --- a/src/filelocStack.c +++ b/src/filelocStack.c @@ -59,9 +59,7 @@ filelocStack_grow (/*@notnull@*/ filelocStack s) for (i = 0; i < s->nelements; i++) { - /*drl bee: si*/ - /*drl bee: si*/ - s->elements[i] = oldelements[i]; + s->elements[i] = oldelements[i]; } sfree (oldelements); @@ -79,8 +77,7 @@ static void } s->free--; - /*drl bee: si*/ - s->elements[s->nelements] = el; + s->elements[s->nelements] = el; s->nelements++; } @@ -99,8 +96,7 @@ void filelocStack_clear (filelocStack s) for (i = 0; i < s->nelements; i++) { - /*drl bee: si*/ - fileloc_free (s->elements[i]); + fileloc_free (s->elements[i]); } s->free += s->nelements; @@ -120,18 +116,15 @@ bool filelocStack_popPushFile (filelocStack s, fileloc el) for (i = s->nelements - 1; i >= 0; i--) { - /*drl bee: si*/ - if (fileloc_sameBaseFile (s->elements[i], el)) + if (fileloc_sameBaseFile (s->elements[i], el)) { int j; for (j = i; j < s->nelements; j++) { - /*drl bee: si*/ - fileloc_free (s->elements[j]); + fileloc_free (s->elements[j]); } - /*drl bee: si*/ - s->elements[i] = el; + s->elements[i] = el; s->nelements = i + 1; return FALSE; } @@ -153,13 +146,11 @@ filelocStack_unparse (filelocStack s) { if (i == s->nelements - 1) { - /*drl bee: si*/ - st = message ("%q %q", st, fileloc_unparse (s->elements[i])); + st = message ("%q %q", st, fileloc_unparse (s->elements[i])); } else { - /*drl bee: si*/ - st = message ("%q, %q", st, fileloc_unparse (s->elements[i])); + st = message ("%q, %q", st, fileloc_unparse (s->elements[i])); } } } @@ -178,8 +169,7 @@ int filelocStack_includeDepth (filelocStack s) /* the zeroth element doesn't count! */ for (i = s->nelements - 1; i > 0; i--) { - /*drl bee: si*/ - if (!fileloc_isSpecialFile (s->elements[i])) + if (!fileloc_isSpecialFile (s->elements[i])) { depth++; } @@ -206,11 +196,9 @@ filelocStack_printIncludes (filelocStack s) /* don't show last two files pushed */ for (i = s->nelements - 3; i >= 0; i--) { - /*drl bee: si*/ - if (i == 0 || !fileloc_isSpecialFile (s->elements[i])) + if (i == 0 || !fileloc_isSpecialFile (s->elements[i])) { - /*drl bee: si*/ - llgenindentmsg (cstring_makeLiteral ("Include site"), + llgenindentmsg (cstring_makeLiteral ("Include site"), s->elements[i]); } } @@ -230,8 +218,7 @@ filelocStack_free (/*@only@*/ filelocStack s) int i; for (i = 0; i < s->nelements; i++) { - /*drl bee: si*/ - fileloc_free (s->elements[i]); + fileloc_free (s->elements[i]); } sfree (s->elements); diff --git a/src/flags.c b/src/flags.c index 086fae0..b908b15 100644 --- a/src/flags.c +++ b/src/flags.c @@ -341,8 +341,6 @@ flagcode_recordError (flagcode f) } else { - /*drl bee: ec*/ - /*drl bee: ec*/ flags[f].nreported = flags[f].nreported + 1; } } @@ -357,8 +355,7 @@ flagcode_recordSuppressed (flagcode f) { llassertprint (f != INVALID_FLAG, ("flagcode: %s", flagcode_unparse (f))); - /*drl bee: ec*/ - /*drl bee: ec*/ flags[f].nsuppressed = flags[f].nsuppressed + 1; + flags[f].nsuppressed = flags[f].nsuppressed + 1; } int @@ -374,7 +371,6 @@ flagcodeHint (flagcode f) { llassert (f != INVALID_FLAG); - /*drl bee: ec*/ if (mstring_isDefined (flags[f].hint)) { return (cstring_fromChars (flags[f].hint)); @@ -407,7 +403,6 @@ flagkind identifyCategory (cstring s) for (i = 0; categories[i].kind != FK_NONE; i++) { - /*drl bee: mRug*/ if (mstring_isDefined (categories[i].name)) { if (cstring_equalLit (s, categories[i].name)) @@ -426,7 +421,6 @@ static /*@observer@*/ cstring categoryName (flagkind kind) for (i = 0; categories[i].kind != FK_NONE; i++) { - /*drl bee: mrUg*/ if (categories[i].kind == kind) { return (cstring_fromChars (categories[i].name)); @@ -442,7 +436,6 @@ static int categoryIndex (flagkind kind) for (i = 0; categories[i].kind != FK_NONE; i++) { - /*drl bee: mRug*/ if (categories[i].kind == kind) { return i; @@ -457,7 +450,6 @@ void printCategory (flagkind kind) int index = categoryIndex (kind); llassert (index >= 0); - /*drl bee: mRug*/ llmsg (message ("%s (%d flags)\n\3%s\n\n", cstring_fromChars (categories[index].name), categorySize (kind), @@ -480,7 +472,6 @@ listAllCategories (void) for (i = 0; categories[i].kind != FK_NONE; i++) { - /*drl bee: mRug*/ flagkind kind = categories[i].kind ; if (categories[i].describe != NULL) @@ -727,7 +718,6 @@ describeFlagCode (flagcode flag) context_resetAllFlags (); - /*drl bee: mRug*/ f = flags[flag]; ret = cstring_copy (cstring_fromChars (f.desc)); @@ -968,7 +958,6 @@ canonicalizeFlag (cstring s) } ; char *current; - /*drl bee: ia*/ while ((current = transform[i]) != NULL) { if (cstring_containsLit (res, current)) @@ -1489,7 +1478,6 @@ extern int flagcode_valueIndex (flagcode f) { /* static valueFlags must be defined */ /*@-usedef@*/ - /*drl bee: sta*/ if (f == valueFlags[i]) /*@=usedef@*/ { return i; @@ -1533,7 +1521,6 @@ extern int flagcode_stringIndex (flagcode f) for (i = 0; i < NUMSTRINGFLAGS; i++) { - /*drl bee: sta*/ /*@-usedef@*/ if (f == stringFlags[i]) /*@=usedef@*/ { return i; diff --git a/src/macrocache.c b/src/macrocache.c index 0991baa..881b094 100644 --- a/src/macrocache.c +++ b/src/macrocache.c @@ -97,7 +97,7 @@ macrocache_free (macrocache s) for (i = 0; i < s->entries; i++) { - /*drl bee: si*/ mce_free (s->contents[i]); + mce_free (s->contents[i]); } sfree (s->contents); @@ -115,7 +115,7 @@ macrocache_grow (macrocache s) for (i = 0; i < s->entries; i++) { - /*drl bee: dm*/ /*drl bee: si*/ s->contents[i] = oldcontents[i]; + s->contents[i] = oldcontents[i]; } sfree (oldcontents); @@ -136,7 +136,7 @@ macrocache_addGenEntry (macrocache s, /*@only@*/ fileloc fl, if ((i = macrocache_exists (s, fl)) != DNE) { - /*drl bee: si*/ if (cstring_equal (def, s->contents[i]->def)) + if (cstring_equal (def, s->contents[i]->def)) { fileloc_free (fl); cstring_free (def); @@ -153,7 +153,7 @@ macrocache_addGenEntry (macrocache s, /*@only@*/ fileloc fl, */ cstring_free (s->contents[i]->def); - /*drl bee: si*/ s->contents[i]->def = def; + s->contents[i]->def = def; fileloc_free (fl); return; @@ -165,7 +165,7 @@ macrocache_addGenEntry (macrocache s, /*@only@*/ fileloc fl, } s->nspace--; - /*drl bee: si*/ s->contents[s->entries] = mce_create (fl, def, sup); + s->contents[s->entries] = mce_create (fl, def, sup); s->entries++; } @@ -190,7 +190,7 @@ macrocache_exists (macrocache s, fileloc fl) for (i = 0; i < s->entries; i++) { - /*drl bee: si*/ if (fileloc_equal (s->contents[i]->fl, fl)) + if (fileloc_equal (s->contents[i]->fl, fl)) return (i); } @@ -205,7 +205,7 @@ macrocache_unparse (macrocache m) for (i = 0; i < m->entries; i++) { - /*drl bee: si*/ fileloc fl = m->contents[i]->fl; + fileloc fl = m->contents[i]->fl; cstring def = m->contents[i]->def; bool defined = m->contents[i]->defined; @@ -277,9 +277,9 @@ static void pushString (/*@only@*/ cstring s) static void macrocache_processMacro (macrocache m, int i) { - /*drl bee: si*/ fileloc fl = m->contents[i]->fl; + fileloc fl = m->contents[i]->fl; - /*drl bee: si*/ m->contents[i]->defined = TRUE; + m->contents[i]->defined = TRUE; if (!fileId_equal (currentFile (), fileloc_fileId (fl))) { @@ -339,7 +339,7 @@ extern void macrocache_processUndefinedElements (macrocache m) { for (i = 0; i < m->entries; i++) { - /*drl bee: si*/ if (m->contents[i]->defined) + if (m->contents[i]->defined) { ; } @@ -380,7 +380,7 @@ extern /*@observer@*/ fileloc macrocache_processFileElements (macrocache m, cstr for (i = 0; i < m->entries; i++) { - /*drl bee: si*/ if (m->contents[i]->defined) + if (m->contents[i]->defined) { ; } -- 2.45.1