Skip to content

Commit

Permalink
compiler: fixup Sprintf uses
Browse files Browse the repository at this point in the history
  • Loading branch information
dgryski authored and deadprogram committed Aug 15, 2024
1 parent 9932f2e commit 4d60d67
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion compiler/symbol.go
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ func (c *compilerContext) checkWasmImport(f *ssa.Function, pragma string) {
}
if f.Blocks != nil {
// Defined functions cannot be exported.
c.addError(f.Pos(), fmt.Sprintf("can only use //go:wasmimport on declarations"))
c.addError(f.Pos(), "can only use //go:wasmimport on declarations")
return
}
if f.Signature.Results().Len() > 1 {
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -958,7 +958,7 @@ func buildAndRun(pkgName string, config *compileopts.Config, stdout io.Writer, c
err = run(cmd, result)
if err != nil {
if ctx != nil && ctx.Err() == context.DeadlineExceeded {
stdout.Write([]byte(fmt.Sprintf("--- timeout of %s exceeded, terminating...\n", timeout)))
fmt.Fprintf(stdout, "--- timeout of %s exceeded, terminating...\n", timeout)
err = ctx.Err()
}
return result, &commandError{"failed to run compiled binary", result.Binary, err}
Expand Down

0 comments on commit 4d60d67

Please sign in to comment.