mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
runtime: return 0 from C function in test
This function's prototype includes a return value, so return a value.
Otherwise clang gets upset:
--- FAIL: TestDLLPreloadMitigation (1.40s)
syscall_windows_test.go:986: failed to build dll: exit status 1 - nojack.c:7:1: error: non-void function does not return a value [-Werror,-Wreturn-type]
}
^
1 error generated.
Fixes #42860.
Change-Id: I65b8eb9ccb502692c5b65bd34829f331cd86eef0
Reviewed-on: https://go-review.googlesource.com/c/go/+/273726
Trust: Jason A. Donenfeld <Jason@zx2c4.com>
Trust: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
926994fd7c
commit
91f77ca2f8
1 changed files with 2 additions and 1 deletions
|
|
@ -969,8 +969,9 @@ func TestDLLPreloadMitigation(t *testing.T) {
|
|||
#include <stdint.h>
|
||||
#include <windows.h>
|
||||
|
||||
uintptr_t cfunc() {
|
||||
uintptr_t cfunc(void) {
|
||||
SetLastError(123);
|
||||
return 0;
|
||||
}
|
||||
`
|
||||
srcname := "nojack.c"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue