Tag functions with attributes pure, const, or noreturn.

* src/bdd.h (__purefn, __constfn, __noreturnfn): Define
new macros.
* src/bdd.h, src/bddio.c, src/bvec.h, src/imatrix.h: Use them
to tag many functions as suggested by -Wsuggest-attribute=pure,
-Wsuggest-attribute=const, -Wsuggest-attribute=noreturn.
This commit is contained in:
Alexandre Duret-Lutz 2011-04-04 19:12:56 +02:00
parent 61d9e721a0
commit 5fdfe28689
5 changed files with 50 additions and 28 deletions

View file

@ -578,7 +578,7 @@ static void loadhash_add(int key, int data)
lh_table[pos].data = data;
}
__purefn
static int loadhash_get(int key)
{
int hash = lh_table[key % lh_nodenum].first;