Commit 7dfd1290 authored by Hana (Hyang-Ah) Kim's avatar Hana (Hyang-Ah) Kim Committed by Brad Fitzpatrick

windows: address vet reports

Found in https://storage.googleapis.com/go-build-log/300ed876/misc-vet-vetall_dd96a388.log

cmd/vendor/golang.org/x/sys/windows/asm_windows_386.s:9: [386] getprocaddress: wrong argument size 8; expected $...-16
cmd/vendor/golang.org/x/sys/windows/asm_windows_386.s:12: [386] loadlibrary: wrong argument size 4; expected $...-12
cmd/vendor/golang.org/x/sys/windows/svc/service.go:337: cmd/vendor/golang.org/x/sys/windows.SERVICE_TABLE_ENTRY composite literal uses unkeyed fields
cmd/vendor/golang.org/x/sys/windows/svc/service.go:338: cmd/vendor/golang.org/x/sys/windows.SERVICE_TABLE_ENTRY composite literal uses unkeyed fields
cmd/vendor/golang.org/x/sys/windows/svc/debug/service.go:34: cmd/vendor/golang.org/x/sys/windows/svc.ChangeRequest composite literal uses unkeyed fields
cmd/vendor/golang.org/x/sys/windows/svc/mgr/config.go:124: cmd/vendor/golang.org/x/sys/windows.SERVICE_DESCRIPTION composite literal uses unkeyed fields

Change-Id: Ic08cfcc802aac89cfa1eb98661ec556c844e8013
Reviewed-on: https://go-review.googlesource.com/112557Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent 64746a42
......@@ -6,8 +6,8 @@
// System calls for 386, Windows are implemented in runtime/syscall_windows.goc
//
TEXT ·getprocaddress(SB), 7, $0-8
TEXT ·getprocaddress(SB), 7, $0-16
JMP syscall·getprocaddress(SB)
TEXT ·loadlibrary(SB), 7, $0-4
TEXT ·loadlibrary(SB), 7, $0-12
JMP syscall·loadlibrary(SB)
......@@ -31,7 +31,7 @@ func Run(name string, handler svc.Handler) error {
for {
select {
case <-sig:
cmds <- svc.ChangeRequest{svc.Stop, 0, 0, status}
cmds <- svc.ChangeRequest{Cmd: svc.Stop, CurrentStatus: status}
case status = <-changes:
}
}
......
......@@ -121,7 +121,7 @@ func (s *Service) Config() (Config, error) {
}
func updateDescription(handle windows.Handle, desc string) error {
d := windows.SERVICE_DESCRIPTION{toPtr(desc)}
d := windows.SERVICE_DESCRIPTION{Description: toPtr(desc)}
return windows.ChangeServiceConfig2(handle,
windows.SERVICE_CONFIG_DESCRIPTION, (*byte)(unsafe.Pointer(&d)))
}
......
......@@ -334,8 +334,8 @@ func Run(name string, handler Handler) error {
var svcmain uintptr
getServiceMain(&svcmain)
t := []windows.SERVICE_TABLE_ENTRY{
{syscall.StringToUTF16Ptr(s.name), svcmain},
{nil, 0},
{ServiceName: syscall.StringToUTF16Ptr(s.name), ServiceProc: svcmain},
{ServiceName: nil, ServiceProc: 0},
}
goWaitsH = uintptr(s.goWaits.h)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment