github-vet / github-vet/rangeloop-pointer-findings
turutcrane/cefingo: tools/gen-cefingo/parser/parse.go; 13 LoC
- Dominant language
- No language data
- Stars
- 0
- Forks
- 0
- PR merge metrics
- PR metrics pending
Description
Found a possible issue in [turutcrane/cefingo](https://www.github.com/turutcrane/cefingo) at [tools/gen-cefingo/parser/parse.go](https://github.com/turutcrane/cefingo/blob/d87ce77344dee6ea58f4b51a0903f311046c8b1d/tools/gen-cefingo/parser/parse.go#L1205-L1217)
Below is the message reported by the analyzer for this snippet of code. Beware that the analyzer only reports the first issue it finds, so please do not limit your consideration to the contents of the below message.
> reference to m was used in a composite literal at line 1216
[Click here to see the code in its original context.](https://github.com/turutcrane/cefingo/blob/d87ce77344dee6ea58f4b51a0903f311046c8b1d/tools/gen-cefingo/parser/parse.go#L1205-L1217)
Click here to show the 13 line(s) of Go which triggered the analyzer.
```go
for _, m := range sm {
ts := getTypeSpecifier(m)
ty := getTsType(ts)
d := getDeclarator(m)
if d.PointerOpt != nil {
ty.Pointer++
if d.PointerOpt.Pointer.Case == 1 {
log.Panicf("T1103: %s, %v\n", ty.Ty, m)
}
}
dd := d.DirectDeclarator
stDecl.Members = append(stDecl.Members, Member{Token(dd.Token), ty, &m, stDecl})
}
```
Leave a reaction on this issue to contribute to the project by classifying this instance as a **Bug** :-1:, **Mitigated** :+1:, or **Desirable Behavior** :rocket:
See the descriptions of the classifications [here](https://github.com/github-vet/rangeclosure-findings#how-can-i-help) for more information.
commit ID: d87ce77344dee6ea58f4b51a0903f311046c8b1d
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.