From a366fe41cba261002832611fae909a6f2077b4ba Mon Sep 17 00:00:00 2001 From: Xiaodong Liu Date: Tue, 26 May 2020 14:50:06 +0800 Subject: [PATCH] fix "stat.Rdev" invalid operation mismatched types on mips64el compile error the "stat.Rdev" variable and "s.Rdev" mismatched types on mips64el convert "stat.Rdev" type to uint64 explicitly Signed-off-by: Xiaodong Liu --- pkg/system/stat_unix_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/system/stat_unix_test.go b/pkg/system/stat_unix_test.go index d1001a9e25..3c25d7812d 100644 --- a/pkg/system/stat_unix_test.go +++ b/pkg/system/stat_unix_test.go @@ -31,7 +31,8 @@ func TestFromStatT(t *testing.T) { if stat.Gid != s.GID() { t.Fatal("got invalid gid") } - if stat.Rdev != s.Rdev() { + //nolint:unconvert // conversion needed to fix mismatch types on mips64el + if uint64(stat.Rdev) != s.Rdev() { t.Fatal("got invalid rdev") } if stat.Mtim != s.Mtim() {