Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a6428535 authored by Cole Faust's avatar Cole Faust Committed by Gerrit Code Review
Browse files

Merge "Log warnings to stdout instead of stderr" into main

parents 44789260 3b30067f
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -149,9 +149,12 @@ func DisableWarnings() {
	disableWarnings = true
}

// warnf will log to stdout if warnings are enabled. In make code,
// stdout is redirected to a file, so the warnings will not be shown
// in the terminal.
func warnf(format string, args ...any) (n int, err error) {
	if !disableWarnings {
		return fmt.Fprintf(os.Stderr, format, args...)
		return fmt.Printf(format, args...)
	}
	return 0, nil
}