Commit 8c762ad
authored
Fix #14423: Add support for Cairo, GLib, GTK and ATK version check macros (danmar#8147)
Without those known to cppcheck, it now bails out with something like
this:
```
test/cfg/gtk.c:16:2: error: failed to evaluate #if condition, undefined function-like macro invocation: GLIB_CHECK_VERSION( ... ) [syntaxError]
#if GLIB_CHECK_VERSION(2, 3, 4)
^
```
So define them in a best-effort fashion:
* Cairo is actually using the real value (not that it's likely to
matter)
* GLib, GTK and ATK make them result to `1` as there's no better
alternative than an arbitrary boolean value, and those checks are
usually guarding newer or optional code paths, so it conceptually makes
more sense to have a truthy value.1 parent 6f53cda commit 8c762ad
4 files changed
+16
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23079 | 23079 | | |
23080 | 23080 | | |
23081 | 23081 | | |
| 23082 | + | |
| 23083 | + | |
| 23084 | + | |
| 23085 | + | |
23082 | 23086 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
12 | 15 | | |
13 | 16 | | |
14 | 17 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
16 | 24 | | |
17 | 25 | | |
18 | 26 | | |
| |||
0 commit comments