mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
31 lines
629 B
Go
31 lines
629 B
Go
// autoformat-ignore (gofmt adds new style build constraints)
|
|
//go:build (amd64 || arm64 || arm64be || ppc64 || ppc64le || mips64 || mips64le || s390x || sparc64) && gc && go1.4
|
|
// +build amd64 arm64 arm64be ppc64 ppc64le mips64 mips64le s390x sparc64
|
|
// +build gc
|
|
// +build go1.4
|
|
|
|
package main
|
|
|
|
import (
|
|
"strconv"
|
|
)
|
|
|
|
func oldTestIntSink64() {
|
|
{
|
|
parsed, err := strconv.ParseInt("3456", 10, 64)
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
_ = int(parsed)
|
|
_ = uint(parsed)
|
|
}
|
|
{
|
|
parsed, err := strconv.ParseUint("3456", 10, 64) // $ Source
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
_ = int(parsed) // $ Alert
|
|
_ = uint(parsed)
|
|
}
|
|
}
|