Skip to content

Commit

Permalink
chore: fix lint for unused return value
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathongardner committed Jan 18, 2025
1 parent 0442ace commit 672e208
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions filesystem/squashfs/const_internal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,12 +199,12 @@ func testGetFilesystem(f fs.File) (*FileSystem, []byte, error) {
return testFs, b, nil
}

func testGetInodeMetabytes() (inodeBytes []byte, inodesStart uint64, err error) {
func testGetInodeMetabytes() (inodeBytes []byte, err error) {
testFs, b, err := testGetFilesystem(nil)
if err != nil {
return nil, 0, err
return nil, err
}
return b[testFs.superblock.inodeTableStart+2:], testFs.superblock.inodeTableStart, nil
return b[testFs.superblock.inodeTableStart+2:], nil
}

//nolint:deadcode // we need these references in the future
Expand Down
12 changes: 6 additions & 6 deletions filesystem/squashfs/inode_internal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ func TestInodeSize(t *testing.T) {
}

func TestInodeHeader(t *testing.T) {
b, _, err := testGetInodeMetabytes()
b, err := testGetInodeMetabytes()
if err != nil {
t.Fatal(err)
}
Expand Down Expand Up @@ -142,7 +142,7 @@ func TestBlockData(t *testing.T) {

func TestBasicDirectory(t *testing.T) {
dir := testBasicDirectory
b, _, err := testGetInodeMetabytes()
b, err := testGetInodeMetabytes()
if err != nil {
t.Fatal(err)
}
Expand Down Expand Up @@ -203,7 +203,7 @@ func TestExtendedDirectory(t *testing.T) {

func TestBasicFile(t *testing.T) {
f := testBasicFile
b, _, err := testGetInodeMetabytes()
b, err := testGetInodeMetabytes()
if err != nil {
t.Fatal(err)
}
Expand Down Expand Up @@ -279,7 +279,7 @@ func TestBasicFile(t *testing.T) {
func TestExtendedFile(t *testing.T) {
fd := testExtendedFile
f := &fd
b, _, err := testGetInodeMetabytes()
b, err := testGetInodeMetabytes()
if err != nil {
t.Fatal(err)
}
Expand Down Expand Up @@ -332,7 +332,7 @@ func TestExtendedFile(t *testing.T) {

func TestBasicSymlink(t *testing.T) {
s := testBasicSymlink
b, _, err := testGetInodeMetabytes()
b, err := testGetInodeMetabytes()
if err != nil {
t.Fatal(err)
}
Expand Down Expand Up @@ -430,7 +430,7 @@ func TestExtendedIPC(t *testing.T) {
}

func TestInode(t *testing.T) {
b, _, err := testGetInodeMetabytes()
b, err := testGetInodeMetabytes()
if err != nil {
t.Fatal(err)
}
Expand Down
2 changes: 1 addition & 1 deletion filesystem/squashfs/squashfs_internal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func TestValidateBlocksize(t *testing.T) {

func TestParseXAttrsTable(t *testing.T) {
// parseXattrsTable(bUIDXattr, bIndex []byte, offset uint64, c compressor) (*xAttrTable, error) {
b, _, err := testGetInodeMetabytes()
b, err := testGetInodeMetabytes()
if err != nil {
t.Fatalf("error getting metadata bytes: %v", err)
}
Expand Down

0 comments on commit 672e208

Please sign in to comment.