diff options
author | copilot-swe-agent[bot] | 2025-07-07 18:18:12 +0000 |
---|---|---|
committer | rfjakob | 2025-07-08 19:54:14 +0200 |
commit | 386232f39ede046d6453a0990ad40f2d86a26f53 (patch) | |
tree | 8703ecc54e402af3dbcd3122f840c21f57242437 /tests/reverse/inomap_test.go | |
parent | 8f5df19b353e02ffba842fd1b15ccf93da7ee3b4 (diff) |
Fix all staticcheck errors in gocryptfs codebase
Co-authored-by: rfjakob <286847+rfjakob@users.noreply.github.com>
Add staticcheck to test.bash for continuous static analysis
Co-authored-by: rfjakob <286847+rfjakob@users.noreply.github.com>
Fix nil pointer dereference in timesToTimespec function
The previous fix for deprecated fuse.UtimeToTimespec caused a panic
because unix.TimeToTimespec doesn't handle nil pointers. This fix
properly handles nil pointers by using unix.UTIME_OMIT while still
using the non-deprecated unix.TimeToTimespec function.
Co-authored-by: rfjakob <286847+rfjakob@users.noreply.github.com>
Undo SA6002 changes and add staticcheck ignore directive instead
Co-authored-by: rfjakob <286847+rfjakob@users.noreply.github.com>
Diffstat (limited to 'tests/reverse/inomap_test.go')
-rw-r--r-- | tests/reverse/inomap_test.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/reverse/inomap_test.go b/tests/reverse/inomap_test.go index ff78f4c..fadf6a5 100644 --- a/tests/reverse/inomap_test.go +++ b/tests/reverse/inomap_test.go @@ -85,7 +85,7 @@ func TestVirtualFileIno(t *testing.T) { if err != nil { t.Fatal(err) } - dirents, err := fd.Readdirnames(0) + _, err = fd.Readdirnames(0) if err != nil { t.Fatal(err) } @@ -104,7 +104,7 @@ func TestVirtualFileIno(t *testing.T) { if err != nil { t.Fatal(err) } - dirents, err = fd.Readdirnames(0) + dirents, err := fd.Readdirnames(0) if err != nil { t.Fatal(err) } |