From a14d88b8159d262778eef9b62e957fecb7b894ba Mon Sep 17 00:00:00 2001 From: Bill Robinson Date: Fri, 2 Sep 2016 11:57:11 -0700 Subject: [PATCH] *: fix assignments to make the new version of ineffassign happy Signed-off-by: Bill Robinson --- db/test/etcd_test.go | 1 + storage/backend/nfs/nfs.go | 2 +- systemtests/integrated_test.go | 2 +- systemtests/volsupervisor_test.go | 2 +- watch/watch.go | 5 ++--- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/db/test/etcd_test.go b/db/test/etcd_test.go index 941fd13e..b3620fce 100644 --- a/db/test/etcd_test.go +++ b/db/test/etcd_test.go @@ -116,6 +116,7 @@ func (s *testSuite) TestCRUD(c *C) { te := newTestEntity("test", "data") path, err := te.Path() + c.Assert(err, IsNil) c.Assert(path, Equals, "test/test") c.Assert(volClient.Get(te), NotNil) diff --git a/storage/backend/nfs/nfs.go b/storage/backend/nfs/nfs.go index 1b22abb7..0c5af574 100644 --- a/storage/backend/nfs/nfs.go +++ b/storage/backend/nfs/nfs.go @@ -85,7 +85,7 @@ func (d *Driver) mkOpts(do storage.DriverOptions) (string, error) { return "", err } - host := "" + var host string if !strings.Contains(do.Source, ":") { res, ok := mapOpts["addr"] diff --git a/systemtests/integrated_test.go b/systemtests/integrated_test.go index 2e4d93bb..602353ad 100644 --- a/systemtests/integrated_test.go +++ b/systemtests/integrated_test.go @@ -354,7 +354,7 @@ func (s *systemtestSuite) TestIntegratedMultipleFileSystems(c *C) { c.Assert(s.createVolume("mon0", ext4vol, map[string]string{"filesystem": "ext4"}), IsNil) - out, err = s.dockerRun("mon0", false, true, ext4vol, "sleep 10m") + _, err = s.dockerRun("mon0", false, true, ext4vol, "sleep 10m") c.Assert(err, IsNil) out, err = s.vagrant.GetNode("mon0").RunCommandWithOutput("mount -l -t ext4") diff --git a/systemtests/volsupervisor_test.go b/systemtests/volsupervisor_test.go index 5aecaafe..a2137141 100644 --- a/systemtests/volsupervisor_test.go +++ b/systemtests/volsupervisor_test.go @@ -84,7 +84,7 @@ func (s *systemtestSuite) TestVolsupervisorStopStartSnapshot(c *C) { c.Assert(err, IsNil) c.Assert(len(strings.Split(out, "\n")) > 2, Equals, true) - out, err = s.volcli("volume remove " + fqVolName) + _, err = s.volcli("volume remove " + fqVolName) c.Assert(err, IsNil) _, err = s.vagrant.GetNode("mon0").RunCommandWithOutput("sudo rbd snap ls policy1." + volName) diff --git a/watch/watch.go b/watch/watch.go index 3d901156..d1872d1d 100644 --- a/watch/watch.go +++ b/watch/watch.go @@ -110,10 +110,9 @@ func Create(w *Watcher) { } }(w) - wary, ok := watchers[w.Path] + _, ok := watchers[w.Path] if !ok { - wary = []*Watcher{} - watchers[w.Path] = wary + watchers[w.Path] = []*Watcher{} } watchers[w.Path] = append(watchers[w.Path], w) }