Skip to content

Commit c170002

Browse files
committed
Update test output
1 parent 14e3ee2 commit c170002

2 files changed

Lines changed: 2 additions & 5 deletions

File tree

go/ql/test/query-tests/InconsistentCode/UnhandledCloseWritableHandle/UnhandledCloseWritableHandle.expected

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,3 @@ nodes
5050
| tests.go:162:2:162:74 | ... := ...[0] | semmle.label | ... := ...[0] |
5151
| tests.go:166:8:166:8 | f | semmle.label | f |
5252
subpaths
53-
testFailures
54-
| tests.go:109:94:109:114 | comment | Fixed spurious result: Source |
55-
| tests.go:112:19:112:38 | comment | Fixed spurious result: Alert |

go/ql/test/query-tests/InconsistentCode/UnhandledCloseWritableHandle/tests.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,10 @@ func deferredCloseWithSync() {
106106

107107
func deferredCloseWithSync2() {
108108
// open file for writing
109-
if f, err := os.OpenFile("foo.txt", os.O_WRONLY|os.O_TRUNC|os.O_CREATE, 0666); err != nil { // $ SPURIOUS: Source
109+
if f, err := os.OpenFile("foo.txt", os.O_WRONLY|os.O_TRUNC|os.O_CREATE, 0666); err != nil {
110110
// a call to `Close` is deferred, but we have a call to `Sync` later which
111111
// precedes the call to `Close` during execution
112-
defer f.Close() // $ SPURIOUS: Alert
112+
defer f.Close()
113113

114114
if err := f.Sync(); err != nil {
115115
log.Fatal(err)

0 commit comments

Comments
 (0)