mirror of
https://github.com/github/codeql.git
synced 2026-06-19 03:41:07 +02:00
Update test output
This commit is contained in:
@@ -50,6 +50,3 @@ nodes
|
||||
| tests.go:162:2:162:74 | ... := ...[0] | semmle.label | ... := ...[0] |
|
||||
| tests.go:166:8:166:8 | f | semmle.label | f |
|
||||
subpaths
|
||||
testFailures
|
||||
| tests.go:109:94:109:114 | comment | Fixed spurious result: Source |
|
||||
| tests.go:112:19:112:38 | comment | Fixed spurious result: Alert |
|
||||
|
||||
@@ -106,10 +106,10 @@ func deferredCloseWithSync() {
|
||||
|
||||
func deferredCloseWithSync2() {
|
||||
// open file for writing
|
||||
if f, err := os.OpenFile("foo.txt", os.O_WRONLY|os.O_TRUNC|os.O_CREATE, 0666); err != nil { // $ SPURIOUS: Source
|
||||
if f, err := os.OpenFile("foo.txt", os.O_WRONLY|os.O_TRUNC|os.O_CREATE, 0666); err != nil {
|
||||
// a call to `Close` is deferred, but we have a call to `Sync` later which
|
||||
// precedes the call to `Close` during execution
|
||||
defer f.Close() // $ SPURIOUS: Alert
|
||||
defer f.Close()
|
||||
|
||||
if err := f.Sync(); err != nil {
|
||||
log.Fatal(err)
|
||||
|
||||
Reference in New Issue
Block a user