Skip to content

Commit 80c3993

Browse files
committed
Remove redundant test
It was introduced in github/codeql-go#718 in response to github/codeql-go#717, to check that we don't have type assertions as sinks. We now have other tests covering type assertions.
1 parent 3ad2d90 commit 80c3993

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

go/ql/test/query-tests/Security/CWE-681/IncorrectIntegerConversion.go

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -482,16 +482,6 @@ func parsePositiveInt2(value string) (int, error) {
482482
return int(i64), nil
483483
}
484484

485-
func typeAssertion(s string) {
486-
n, err := strconv.ParseInt(s, 10, 0)
487-
if err == nil {
488-
var itf interface{} = n
489-
i32 := itf.(int32)
490-
println(i32)
491-
}
492-
493-
}
494-
495485
func dealWithArchSizeCorrectly(s string) uint {
496486
if i, err := strconv.ParseUint(s, 10, 64); err == nil && i < math.MaxUint {
497487
return uint(i)

0 commit comments

Comments
 (0)