]> Cypherpunks repositories - gostls13.git/commitdiff
syscall: delete unreachable code
authorJosh Bleecher Snyder <josharian@gmail.com>
Thu, 21 Jul 2016 22:25:22 +0000 (15:25 -0700)
committerJosh Bleecher Snyder <josharian@gmail.com>
Mon, 22 Aug 2016 19:50:49 +0000 (19:50 +0000)
Change-Id: Iacedb792c73591b7fd75e836aab8e0e117c8e738
Reviewed-on: https://go-review.googlesource.com/27494
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/syscall/dll_windows.go
src/syscall/exec_plan9.go
src/syscall/exec_windows.go

index e5638480b7c87d204912542b0d6ed5b93d3b239c..864473b43b2909303317b5a82b511d8a5dd65adb 100644 (file)
@@ -176,7 +176,6 @@ func (p *Proc) Call(a ...uintptr) (r1, r2 uintptr, lastErr error) {
        default:
                panic("Call " + p.Name + " with too many arguments " + itoa(len(a)) + ".")
        }
-       return
 }
 
 // A LazyDLL implements access to a single DLL.
index 6551bcb1c1f21570d767751fe040a51eba44b646..47ccbdc384e93a8f826cf0de3b19f5f0e349aa5b 100644 (file)
@@ -298,11 +298,6 @@ childerror1:
        for {
                RawSyscall(SYS_EXITS, 0, 0, 0)
        }
-
-       // Calling panic is not actually safe,
-       // but the for loop above won't break
-       // and this shuts up the compiler.
-       panic("unreached")
 }
 
 // close the numbered file descriptor, unless it is fd1, fd2, or a member of fds.
index 5a01843d2bef08e6cb35dc71918a2c21e8255c3c..cafce1eff6914cabf99955b553ea13f36e6697cb 100644 (file)
@@ -209,8 +209,6 @@ func joinExeDirAndFName(dir, p string) (name string, err error) {
                        return FullPath(d + "\\" + p)
                }
        }
-       // we shouldn't be here
-       return "", EINVAL
 }
 
 type ProcAttr struct {