Skip to content

Commit 68654e0

Browse files
authored
Merge branch 'main' into lcartey/improve-identifier-performance
2 parents 51aa4d0 + dcd22fd commit 68654e0

File tree

81 files changed

+1214
-130
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+1214
-130
lines changed

.github/workflows/bump-version.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,5 @@ jobs:
2727
title: "Release Engineering: Version bump to ${{ github.event.inputs.new_version }}."
2828
body: "This PR updates codeql-coding-standards to version ${{ github.event.inputs.new_version }}."
2929
commit-message: "Version bump to ${{ github.event.inputs.new_version }}."
30-
team-reviewers: github/codeql-coding-standards
3130
delete-branch: true
3231
branch: "automation/version-bump-${{ github.event.inputs.new_version }}"

.github/workflows/code-scanning-pack-gen.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: Code Scanning Query Pack Generation
22

33
on:
4+
merge_group:
45
pull_request:
56
branches:
67
- main

.github/workflows/codeql_unit_tests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: CodeQL Unit Testing
22

33
on:
4+
merge_group:
45
push:
56
branches:
67
- main

.github/workflows/create-draft-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
inputs:
66
release_version_tag:
77
description: |
8-
The tag for the new draft release, e.g. v0.5.1.
8+
The tag for the new draft release, e.g. 0.5.1 - do not include the `v`.
99
required: true
1010
codeql_analysis_threads:
1111
description: |

.github/workflows/extra-rule-validation.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: ⚙️ Extra Rule Validation
22

33
on:
4+
merge_group:
45
push:
56
branches:
67
- main

.github/workflows/generate-html-docs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: Generate HTML documentation
22

33
on:
4+
merge_group:
45
push:
56
branches:
67
- main

.github/workflows/tooling-unit-tests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: 🧰 Tooling unit tests
22

33
on:
4+
merge_group:
45
push:
56
branches:
67
- main

.github/workflows/validate-coding-standards.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: Validating Coding Standards
22

33
on:
4+
merge_group:
45
push:
56
branches:
67
- main

.github/workflows/verify-standard-library-dependencies.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ name: Verify Standard Library Dependencies
22

33
# Run this workflow every time the "supported_codeql_configs.json" file or a "qlpack.yml" file is changed
44
on:
5+
merge_group:
56
pull_request:
67
branches:
78
- main

c/cert/src/qlpack.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: codeql/cert-c-coding-standards
2-
version: 2.14.0-dev
2+
version: 2.15.0-dev
33
description: CERT C 2016
44
suites: codeql-suites
55
license: MIT

c/cert/src/rules/CON40-C/AtomicVariableTwiceInExpression.ql

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
import cpp
1616
import codingstandards.c.cert
17+
import codingstandards.cpp.Concurrency
1718

1819
from MacroInvocation mi, Variable v, Locatable whereFound
1920
where
@@ -22,13 +23,13 @@ where
2223
// There isn't a way to safely use this construct in a way that is also
2324
// possible the reliably detect so advise against using it.
2425
(
25-
mi.getMacroName() = ["atomic_store", "atomic_store_explicit"]
26+
mi instanceof AtomicStore
2627
or
2728
// This construct is generally safe, but must be used in a loop. To lower
2829
// the false positive rate we don't look at the conditions of the loop and
2930
// instead assume if it is found in a looping construct that it is likely
3031
// related to the safety property.
31-
mi.getMacroName() = ["atomic_compare_exchange_weak", "atomic_compare_exchange_weak_explicit"] and
32+
mi instanceof AtomicCompareExchange and
3233
not exists(Loop l | mi.getAGeneratedElement().(Expr).getParent*() = l)
3334
) and
3435
whereFound = mi

c/cert/src/rules/CON41-C/WrapFunctionsThatCanFailSpuriouslyInLoop.ql

Lines changed: 14 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -12,28 +12,18 @@
1212
* external/cert/obligation/rule
1313
*/
1414

15-
import cpp
16-
import codingstandards.c.cert
15+
import cpp
16+
import codingstandards.c.cert
17+
import codingstandards.cpp.Concurrency
18+
1719

18-
/**
19-
* Models calls to routines in the `stdatomic` library. Note that these
20-
* are typically implemented as macros within Clang and GCC's standard
21-
* libraries.
22-
*/
23-
class SpuriouslyFailingFunctionCallType extends MacroInvocation {
24-
SpuriouslyFailingFunctionCallType() {
25-
getMacroName() = ["atomic_compare_exchange_weak", "atomic_compare_exchange_weak_explicit"]
26-
}
27-
}
28-
29-
from SpuriouslyFailingFunctionCallType fc
30-
where
31-
not isExcluded(fc, Concurrency3Package::wrapFunctionsThatCanFailSpuriouslyInLoopQuery()) and
32-
(
33-
exists(StmtParent sp | sp = fc.getStmt() and not sp.(Stmt).getParentStmt*() instanceof Loop)
34-
or
35-
exists(StmtParent sp |
36-
sp = fc.getExpr() and not sp.(Expr).getEnclosingStmt().getParentStmt*() instanceof Loop
37-
)
38-
)
39-
select fc, "Function that can spuriously fail not wrapped in a loop."
20+
from AtomicCompareExchange ace
21+
where
22+
not isExcluded(ace, Concurrency3Package::wrapFunctionsThatCanFailSpuriouslyInLoopQuery()) and
23+
(
24+
forex(StmtParent sp | sp = ace.getStmt() | not sp.(Stmt).getParentStmt*() instanceof Loop) or
25+
forex(Expr e | e = ace.getExpr() | not e.getEnclosingStmt().getParentStmt*()
26+
instanceof Loop)
27+
)
28+
select ace, "Function that can spuriously fail not wrapped in a loop."
29+

c/cert/test/qlpack.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: codeql/cert-c-coding-standards-tests
2-
version: 2.14.0-dev
2+
version: 2.15.0-dev
33
extractor: cpp
44
license: MIT
55
dependencies:
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
edges
2+
| test.c:7:13:7:14 | p1 | test.c:9:9:9:10 | p1 |
3+
| test.c:16:19:16:41 | __builtin_offsetof | test.c:18:26:18:31 | offset |
4+
| test.c:16:19:16:41 | __builtin_offsetof | test.c:29:6:29:11 | offset |
5+
| test.c:17:17:17:26 | sizeof(<expr>) | test.c:23:9:23:12 | size |
6+
| test.c:29:6:29:11 | offset | test.c:7:13:7:14 | p1 |
7+
nodes
8+
| test.c:7:13:7:14 | p1 | semmle.label | p1 |
9+
| test.c:9:9:9:10 | p1 | semmle.label | p1 |
10+
| test.c:16:19:16:41 | __builtin_offsetof | semmle.label | __builtin_offsetof |
11+
| test.c:17:17:17:26 | sizeof(<expr>) | semmle.label | sizeof(<expr>) |
12+
| test.c:18:26:18:31 | offset | semmle.label | offset |
13+
| test.c:23:9:23:12 | size | semmle.label | size |
14+
| test.c:25:9:25:18 | sizeof(<expr>) | semmle.label | sizeof(<expr>) |
15+
| test.c:27:17:27:26 | sizeof(<expr>) | semmle.label | sizeof(<expr>) |
16+
| test.c:29:6:29:11 | offset | semmle.label | offset |
17+
subpaths
18+
#select
19+
| test.c:9:9:9:10 | p1 | test.c:16:19:16:41 | __builtin_offsetof | test.c:9:9:9:10 | p1 | Scaled integer used in pointer arithmetic. |
20+
| test.c:18:26:18:31 | offset | test.c:16:19:16:41 | __builtin_offsetof | test.c:18:26:18:31 | offset | Scaled integer used in pointer arithmetic. |
21+
| test.c:23:9:23:12 | size | test.c:17:17:17:26 | sizeof(<expr>) | test.c:23:9:23:12 | size | Scaled integer used in pointer arithmetic. |
22+
| test.c:25:9:25:18 | sizeof(<expr>) | test.c:25:9:25:18 | sizeof(<expr>) | test.c:25:9:25:18 | sizeof(<expr>) | Scaled integer used in pointer arithmetic. |
23+
| test.c:27:17:27:26 | sizeof(<expr>) | test.c:27:17:27:26 | sizeof(<expr>) | test.c:27:17:27:26 | sizeof(<expr>) | Scaled integer used in pointer arithmetic. |
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
edges
2+
| test.c:7:13:7:14 | p1 | test.c:9:9:9:10 | p1 |
3+
| test.c:16:19:16:41 | __builtin_offsetof | test.c:18:26:18:31 | offset |
4+
| test.c:16:19:16:41 | __builtin_offsetof | test.c:29:6:29:11 | offset |
5+
| test.c:17:17:17:26 | sizeof(<expr>) | test.c:23:9:23:12 | size |
6+
| test.c:29:6:29:11 | offset | test.c:7:13:7:14 | p1 |
7+
nodes
8+
| test.c:7:13:7:14 | p1 | semmle.label | p1 |
9+
| test.c:9:9:9:10 | p1 | semmle.label | p1 |
10+
| test.c:16:19:16:41 | __builtin_offsetof | semmle.label | __builtin_offsetof |
11+
| test.c:17:17:17:26 | sizeof(<expr>) | semmle.label | sizeof(<expr>) |
12+
| test.c:18:26:18:31 | offset | semmle.label | offset |
13+
| test.c:23:9:23:12 | size | semmle.label | size |
14+
| test.c:25:9:25:18 | sizeof(<expr>) | semmle.label | sizeof(<expr>) |
15+
| test.c:27:17:27:26 | sizeof(<expr>) | semmle.label | sizeof(<expr>) |
16+
| test.c:29:6:29:11 | offset | semmle.label | offset |
17+
subpaths
18+
#select
19+
| test.c:9:9:9:10 | p1 | test.c:16:19:16:41 | __builtin_offsetof | test.c:9:9:9:10 | p1 | Scaled integer used in pointer arithmetic. |
20+
| test.c:18:26:18:31 | offset | test.c:16:19:16:41 | __builtin_offsetof | test.c:18:26:18:31 | offset | Scaled integer used in pointer arithmetic. |
21+
| test.c:23:9:23:12 | size | test.c:17:17:17:26 | sizeof(<expr>) | test.c:23:9:23:12 | size | Scaled integer used in pointer arithmetic. |
22+
| test.c:25:9:25:18 | sizeof(<expr>) | test.c:25:9:25:18 | sizeof(<expr>) | test.c:25:9:25:18 | sizeof(<expr>) | Scaled integer used in pointer arithmetic. |
23+
| test.c:27:17:27:26 | sizeof(<expr>) | test.c:27:17:27:26 | sizeof(<expr>) | test.c:27:17:27:26 | sizeof(<expr>) | Scaled integer used in pointer arithmetic. |
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
| test.c:6:19:6:40 | ATOMIC_VAR_INIT(value) | Atomic variable possibly referred to twice in an $@. | test.c:32:3:32:10 | ... += ... | expression |
2-
| test.c:6:19:6:40 | ATOMIC_VAR_INIT(value) | Atomic variable possibly referred to twice in an $@. | test.c:33:3:33:13 | ... = ... | expression |
3-
| test.c:10:3:10:23 | atomic_store(a,b) | Atomic variable possibly referred to twice in an $@. | test.c:10:3:10:23 | atomic_store(a,b) | expression |
4-
| test.c:11:3:11:35 | atomic_store_explicit(a,b,c) | Atomic variable possibly referred to twice in an $@. | test.c:11:3:11:35 | atomic_store_explicit(a,b,c) | expression |
5-
| test.c:24:3:24:48 | atomic_compare_exchange_weak(a,b,c) | Atomic variable possibly referred to twice in an $@. | test.c:24:3:24:48 | atomic_compare_exchange_weak(a,b,c) | expression |
6-
| test.c:25:3:26:45 | atomic_compare_exchange_weak_explicit(a,b,c,d,e) | Atomic variable possibly referred to twice in an $@. | test.c:25:3:26:45 | atomic_compare_exchange_weak_explicit(a,b,c,d,e) | expression |
1+
| test.c:7:18:7:39 | ATOMIC_VAR_INIT(value) | Atomic variable possibly referred to twice in an $@. | test.c:33:3:33:10 | ... += ... | expression |
2+
| test.c:7:18:7:39 | ATOMIC_VAR_INIT(value) | Atomic variable possibly referred to twice in an $@. | test.c:34:3:34:13 | ... = ... | expression |
3+
| test.c:11:3:11:23 | atomic_store(a,b) | Atomic variable possibly referred to twice in an $@. | test.c:11:3:11:23 | atomic_store(a,b) | expression |
4+
| test.c:12:3:12:35 | atomic_store_explicit(a,b,c) | Atomic variable possibly referred to twice in an $@. | test.c:12:3:12:35 | atomic_store_explicit(a,b,c) | expression |
5+
| test.c:25:3:25:49 | atomic_compare_exchange_weak(a,b,c) | Atomic variable possibly referred to twice in an $@. | test.c:25:3:25:49 | atomic_compare_exchange_weak(a,b,c) | expression |
6+
| test.c:26:3:27:42 | atomic_compare_exchange_weak_explicit(a,b,c,d,e) | Atomic variable possibly referred to twice in an $@. | test.c:26:3:27:42 | atomic_compare_exchange_weak_explicit(a,b,c,d,e) | expression |
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
| test.c:7:18:7:39 | ATOMIC_VAR_INIT(value) | Atomic variable possibly referred to twice in an $@. | test.c:33:3:33:10 | ... += ... | expression |
2+
| test.c:7:18:7:39 | ATOMIC_VAR_INIT(value) | Atomic variable possibly referred to twice in an $@. | test.c:34:3:34:13 | ... = ... | expression |
3+
| test.c:11:3:11:23 | atomic_store(object,desired) | Atomic variable possibly referred to twice in an $@. | test.c:11:3:11:23 | atomic_store(object,desired) | expression |
4+
| test.c:12:3:12:23 | atomic_store_explicit | Atomic variable possibly referred to twice in an $@. | test.c:12:3:12:23 | atomic_store_explicit | expression |
5+
| test.c:25:3:25:49 | atomic_compare_exchange_weak(object,expected,desired) | Atomic variable possibly referred to twice in an $@. | test.c:25:3:25:49 | atomic_compare_exchange_weak(object,expected,desired) | expression |
6+
| test.c:26:3:26:39 | atomic_compare_exchange_weak_explicit | Atomic variable possibly referred to twice in an $@. | test.c:26:3:26:39 | atomic_compare_exchange_weak_explicit | expression |
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
| test.c:7:18:7:39 | ATOMIC_VAR_INIT(VALUE) | Atomic variable possibly referred to twice in an $@. | test.c:33:3:33:10 | ... += ... | expression |
2+
| test.c:7:18:7:39 | ATOMIC_VAR_INIT(VALUE) | Atomic variable possibly referred to twice in an $@. | test.c:34:3:34:13 | ... = ... | expression |
3+
| test.c:11:3:11:23 | atomic_store(PTR,VAL) | Atomic variable possibly referred to twice in an $@. | test.c:11:3:11:23 | atomic_store(PTR,VAL) | expression |
4+
| test.c:12:3:12:35 | atomic_store_explicit(PTR,VAL,MO) | Atomic variable possibly referred to twice in an $@. | test.c:12:3:12:35 | atomic_store_explicit(PTR,VAL,MO) | expression |
5+
| test.c:25:3:25:49 | atomic_compare_exchange_weak(PTR,VAL,DES) | Atomic variable possibly referred to twice in an $@. | test.c:25:3:25:49 | atomic_compare_exchange_weak(PTR,VAL,DES) | expression |
6+
| test.c:26:3:27:42 | atomic_compare_exchange_weak_explicit(PTR,VAL,DES,SUC,FAIL) | Atomic variable possibly referred to twice in an $@. | test.c:26:3:27:42 | atomic_compare_exchange_weak_explicit(PTR,VAL,DES,SUC,FAIL) | expression |

c/cert/test/rules/CON40-C/test.c

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
#include <stdatomic.h>
22
#include <stdbool.h>
33

4-
static bool fl1 = ATOMIC_VAR_INIT(false);
5-
static bool fl2 = ATOMIC_VAR_INIT(false);
6-
static bool fl3 = ATOMIC_VAR_INIT(false);
7-
static bool fl4 = ATOMIC_VAR_INIT(false);
4+
static _Atomic int fl1 = ATOMIC_VAR_INIT(false);
5+
static _Atomic int fl2 = ATOMIC_VAR_INIT(false);
6+
static int fl2a = ATOMIC_VAR_INIT(false);
7+
static int fl3 = ATOMIC_VAR_INIT(false);
8+
static int fl4 = ATOMIC_VAR_INIT(false);
89

910
void f1() {
1011
atomic_store(&fl1, 0); // NON_COMPLIANT
@@ -13,17 +14,17 @@ void f1() {
1314

1415
void f2() {
1516
do {
16-
} while (!atomic_compare_exchange_weak(&fl2, &fl2, &fl2)); // COMPLIANT
17+
} while (!atomic_compare_exchange_weak(&fl2, &fl2a, fl2a)); // COMPLIANT
1718

1819
do {
19-
} while (!atomic_compare_exchange_weak_explicit(&fl2, &fl2, &fl2, &fl2,
20-
&fl2)); // COMPLIANT
20+
} while (!atomic_compare_exchange_weak_explicit(&fl2, &fl2a, fl2a, 0,
21+
0)); // COMPLIANT
2122
}
2223

2324
void f3() {
24-
atomic_compare_exchange_weak(&fl2, &fl2, &fl2); // NON_COMPLIANT
25-
atomic_compare_exchange_weak_explicit(&fl2, &fl2, &fl2, &fl2,
26-
&fl2); // NON_COMPLIANT
25+
atomic_compare_exchange_weak(&fl2, &fl2a, fl2a); // NON_COMPLIANT
26+
atomic_compare_exchange_weak_explicit(&fl2, &fl2a, fl2a, 0,
27+
0); // NON_COMPLIANT
2728
}
2829

2930
void f4() { fl3 ^= true; }
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
| test.c:5:8:5:46 | atomic_compare_exchange_weak(a,b,c) | Function that can spuriously fail not wrapped in a loop. |
2-
| test.c:9:3:9:41 | atomic_compare_exchange_weak(a,b,c) | Function that can spuriously fail not wrapped in a loop. |
3-
| test.c:11:8:12:47 | atomic_compare_exchange_weak_explicit(a,b,c,d,e) | Function that can spuriously fail not wrapped in a loop. |
4-
| test.c:16:3:16:56 | atomic_compare_exchange_weak_explicit(a,b,c,d,e) | Function that can spuriously fail not wrapped in a loop. |
1+
| test.c:6:8:6:46 | atomic_compare_exchange_weak(a,b,c) | Function that can spuriously fail not wrapped in a loop. |
2+
| test.c:10:3:10:41 | atomic_compare_exchange_weak(a,b,c) | Function that can spuriously fail not wrapped in a loop. |
3+
| test.c:12:8:13:47 | atomic_compare_exchange_weak_explicit(a,b,c,d,e) | Function that can spuriously fail not wrapped in a loop. |
4+
| test.c:17:3:17:56 | atomic_compare_exchange_weak_explicit(a,b,c,d,e) | Function that can spuriously fail not wrapped in a loop. |
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
| test.c:6:8:6:46 | atomic_compare_exchange_weak(object,expected,desired) | Function that can spuriously fail not wrapped in a loop. |
2+
| test.c:10:3:10:41 | atomic_compare_exchange_weak(object,expected,desired) | Function that can spuriously fail not wrapped in a loop. |
3+
| test.c:12:8:12:44 | atomic_compare_exchange_weak_explicit | Function that can spuriously fail not wrapped in a loop. |
4+
| test.c:17:3:17:39 | atomic_compare_exchange_weak_explicit | Function that can spuriously fail not wrapped in a loop. |
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
| test.c:6:8:6:46 | atomic_compare_exchange_weak(PTR,VAL,DES) | Function that can spuriously fail not wrapped in a loop. |
2+
| test.c:10:3:10:41 | atomic_compare_exchange_weak(PTR,VAL,DES) | Function that can spuriously fail not wrapped in a loop. |
3+
| test.c:12:8:13:47 | atomic_compare_exchange_weak_explicit(PTR,VAL,DES,SUC,FAIL) | Function that can spuriously fail not wrapped in a loop. |
4+
| test.c:17:3:17:56 | atomic_compare_exchange_weak_explicit(PTR,VAL,DES,SUC,FAIL) | Function that can spuriously fail not wrapped in a loop. |

c/cert/test/rules/CON41-C/test.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
#include "stdatomic.h"
22

33
void f1() {
4-
int a, b, c;
4+
_Atomic int a;
5+
int b, c;
56
if (!atomic_compare_exchange_weak(&a, &b, c)) { // NON_COMPLIANT
67
(void)0; /* no-op */
78
}
@@ -17,7 +18,8 @@ void f1() {
1718
}
1819

1920
void f2() {
20-
int a, b, c;
21+
_Atomic int a;
22+
int b, c;
2123
while (1 == 1) {
2224
if (!atomic_compare_exchange_weak(&a, &b, c)) { // COMPLIANT
2325
(void)0; /* no-op */
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
| test.c:83:12:83:16 | call to atan2 | Argument $@ in call to atan2 is incompatible with parameter double __y. | test.c:83:18:83:18 | c | c |
2+
| test.c:93:3:93:12 | call to test_func1 | Argument $@ in call to test_func1 is incompatible with parameter short p1. | test.c:93:14:93:15 | p1 | p1 |
3+
| test.c:94:3:94:12 | call to test_func1 | Argument $@ in call to test_func1 is incompatible with parameter short p1. | test.c:94:14:94:15 | p2 | p2 |
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
| test.c:83:12:83:16 | call to atan2 | Argument $@ in call to atan2 is incompatible with parameter double __y. | test.c:83:18:83:18 | c | c |
2+
| test.c:93:3:93:12 | call to test_func1 | Argument $@ in call to test_func1 is incompatible with parameter short p1. | test.c:93:14:93:15 | p1 | p1 |
3+
| test.c:94:3:94:12 | call to test_func1 | Argument $@ in call to test_func1 is incompatible with parameter short p1. | test.c:94:14:94:15 | p2 | p2 |
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
edges
2+
| test.c:20:15:20:23 | array to pointer conversion | test.c:21:8:21:16 | (const char *)... |
3+
| test.c:20:15:20:23 | array to pointer conversion | test.c:21:8:21:16 | file_name |
4+
| test.c:20:15:20:23 | array to pointer conversion | test.c:21:8:21:16 | file_name indirection |
5+
| test.c:20:15:20:23 | file_name | test.c:21:8:21:16 | (const char *)... |
6+
| test.c:20:15:20:23 | file_name | test.c:21:8:21:16 | file_name |
7+
| test.c:20:15:20:23 | file_name | test.c:21:8:21:16 | file_name indirection |
8+
| test.c:20:15:20:23 | scanf output argument | test.c:21:8:21:16 | (const char *)... |
9+
| test.c:20:15:20:23 | scanf output argument | test.c:21:8:21:16 | file_name |
10+
| test.c:20:15:20:23 | scanf output argument | test.c:21:8:21:16 | file_name indirection |
11+
| test.c:45:15:45:23 | array to pointer conversion | test.c:46:29:46:37 | (LPCTSTR)... |
12+
| test.c:45:15:45:23 | array to pointer conversion | test.c:46:29:46:37 | file_name |
13+
| test.c:45:15:45:23 | array to pointer conversion | test.c:46:29:46:37 | file_name indirection |
14+
| test.c:45:15:45:23 | file_name | test.c:46:29:46:37 | (LPCTSTR)... |
15+
| test.c:45:15:45:23 | file_name | test.c:46:29:46:37 | file_name |
16+
| test.c:45:15:45:23 | file_name | test.c:46:29:46:37 | file_name indirection |
17+
| test.c:45:15:45:23 | scanf output argument | test.c:46:29:46:37 | (LPCTSTR)... |
18+
| test.c:45:15:45:23 | scanf output argument | test.c:46:29:46:37 | file_name |
19+
| test.c:45:15:45:23 | scanf output argument | test.c:46:29:46:37 | file_name indirection |
20+
subpaths
21+
nodes
22+
| test.c:20:15:20:23 | array to pointer conversion | semmle.label | array to pointer conversion |
23+
| test.c:20:15:20:23 | file_name | semmle.label | file_name |
24+
| test.c:20:15:20:23 | scanf output argument | semmle.label | scanf output argument |
25+
| test.c:21:8:21:16 | (const char *)... | semmle.label | (const char *)... |
26+
| test.c:21:8:21:16 | (const char *)... | semmle.label | (const char *)... |
27+
| test.c:21:8:21:16 | file_name | semmle.label | file_name |
28+
| test.c:21:8:21:16 | file_name indirection | semmle.label | file_name indirection |
29+
| test.c:21:8:21:16 | file_name indirection | semmle.label | file_name indirection |
30+
| test.c:45:15:45:23 | array to pointer conversion | semmle.label | array to pointer conversion |
31+
| test.c:45:15:45:23 | file_name | semmle.label | file_name |
32+
| test.c:45:15:45:23 | scanf output argument | semmle.label | scanf output argument |
33+
| test.c:46:29:46:37 | (LPCTSTR)... | semmle.label | (LPCTSTR)... |
34+
| test.c:46:29:46:37 | (LPCTSTR)... | semmle.label | (LPCTSTR)... |
35+
| test.c:46:29:46:37 | file_name | semmle.label | file_name |
36+
| test.c:46:29:46:37 | file_name indirection | semmle.label | file_name indirection |
37+
| test.c:46:29:46:37 | file_name indirection | semmle.label | file_name indirection |
38+
#select
39+
| test.c:21:8:21:16 | file_name | test.c:20:15:20:23 | file_name | test.c:21:8:21:16 | file_name | This argument to a file access function is derived from $@ and then passed to func(file_name), which calls fopen(__filename) | test.c:20:15:20:23 | file_name | user input (scanf) |
40+
| test.c:46:29:46:37 | file_name | test.c:45:15:45:23 | file_name | test.c:46:29:46:37 | file_name | This argument to a file access function is derived from $@ and then passed to CreateFile(lpFileName) | test.c:45:15:45:23 | file_name | user input (scanf) |

0 commit comments

Comments
 (0)