Various minor fixes for compiler/linter (other then splint itself) warnings.
[splint-patched.git] / test / modifies.c
blob854d01d42f2ae5e665d4f6e3fa05c8ef1c4a1b8e
1 # include "modifies.h"
3 static int mstat;
4 static /*@unused@*/ int internalState;
6 int f3 (int p[])
7 /*@modifies internalState, fileSystem;@*/ ; /* 1. Modifies list uses ... */
9 int f4 (int p[])
10 /*@modifies p[3];@*/;
12 int f5 (int fileSystem)
13 /*@modifies fileSystem;@*/ ; /* 2. Modifies list uses fileSystem ... */
15 int f6 (void);
17 int f6 (void) /*@modifies mstat;@*/ /* 3. Implementation modifies list for ... */
19 return (mstat++);
22 int f1 (/*@unused@*/ int p[])
24 mstat++; /* 4. Suspect modification of mstat: mstat++ */
25 return mstat;
28 int f2 (/*@unused@*/ int p[]) /*@modifies mstat;@*/
30 mstat++;
31 return 3;
34 int g2 (/*@unused@*/ int p[])
36 return 3;
37 } /* 5. Function g2 specified to modify internal state but no internal */