diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2018-03-30 20:04:20 +0200 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2018-03-30 20:08:05 +0200 |
| commit | 8fbce0e4423f701145e111531f6f41cc02e086cf (patch) | |
| tree | 5843ecc545550778645e1b4e32a80b2e0000a196 /pkg/csource/csource.go | |
| parent | 7c923cf8d45b650c4251503c11e74653779c74c4 (diff) | |
executor: fix compilation warnings
SYS_memfd_create define produces warning in scource
if system headers already contain the definition (we strip all ifdefs!).
The same is true for CLONE_NEWCGROUP but we just never hit it yet.
Also fix format string for 32 bits.
Also fix potential uninit var in csource, and a missing new line.
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 7031849b4..05bead91d 100644 --- a/pkg/csource/csource.go +++ b/pkg/csource/csource.go @@ -217,7 +217,7 @@ func (ctx *context) generateTestFunc(calls []string, hasVars bool, name string) if !opts.Threaded && !opts.Collide { ctx.printf("void %v()\n{\n", name) if hasVars { - ctx.printf("\tlong res;") + ctx.printf("\tlong res = 0;\n") } if opts.Debug { // Use debug to avoid: error: ‘debug’ defined but not used. |
