diff options
| author | Greg Steuck <greg@nest.cx> | 2022-09-04 09:11:23 +0200 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2022-09-05 10:51:00 +0200 |
| commit | 922294abb4c0bc72b24d8526d625110d73fa1b5a (patch) | |
| tree | a723c3df5be67c6d3dbc3eb1fe6fe13aa162117f /pkg/csource/csource.go | |
| parent | 4b7a93a60c7dd4f6ef7dd11c83ba528bd751cb5f (diff) | |
pkg/csource: inline void* cast into generated code
The previous indirection via conditional macros in platform specific
places was needless obfuscation.
Diffstat (limited to 'pkg/csource/csource.go')
| -rw-r--r-- | pkg/csource/csource.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/csource/csource.go b/pkg/csource/csource.go index 8671a57db..cec1d7847 100644 --- a/pkg/csource/csource.go +++ b/pkg/csource/csource.go @@ -343,7 +343,7 @@ func (ctx *context) emitCallBody(w *bytes.Buffer, call prog.ExecCall, native boo if args != "" { args = args[1:] } - fmt.Fprintf(w, "((intptr_t(*)(%v))CAST(%v))(", args, callName) + fmt.Fprintf(w, "((intptr_t(*)(%v))(void*)(%v))(", args, callName) } for ai, arg := range call.Args { if native || ai > 0 { |
