]> git.ipfire.org Git - thirdparty/git.git/blob - contrib/coccinelle/tests/unused.res
Merge branch 'jk/clone-allow-bare-and-o-together'
[thirdparty/git.git] / contrib / coccinelle / tests / unused.res
1 void test_strbuf(void)
2 {
3 struct strbuf sb3 = STRBUF_INIT;
4 struct strbuf sb4 = STRBUF_INIT;
5 struct strbuf sb7 = STRBUF_INIT;
6 struct strbuf *sp1;
7 struct strbuf *sp3;
8 struct strbuf *sp6 = xmalloc(sizeof(struct strbuf));
9 strbuf_init(sp1, 0);
10 strbuf_init(sp3, 0);
11 strbuf_init(sp6, 0);
12
13 use_before(&sb3);
14 use_as_str("%s", sb7.buf);
15 use_as_str("%s", sp1->buf);
16 use_as_str("%s", sp6->buf);
17 pass_pp(&sp3);
18
19 strbuf_release(&sb3);
20 strbuf_release(&sb4);
21 strbuf_release(&sb7);
22 strbuf_release(sp1);
23 strbuf_release(sp3);
24 strbuf_release(sp6);
25
26 use_after(&sb4);
27
28 if (when_strict())
29 return;
30 }
31
32 void test_other(void)
33 {
34 }
35
36 void test_worktrees(void)
37 {
38 struct worktree **w4;
39
40 w4 = get_worktrees();
41
42 use_it(w4);
43
44 free_worktrees(w4);
45 }