From 5fc137b63b8574fa17502619b4d1b02c87811cc6 Mon Sep 17 00:00:00 2001 From: Pirama Arumuga Nainar Date: Tue, 25 Jan 2022 15:42:39 -0800 Subject: [PATCH] [cc/tidy] Disable cert-err33-c Bug: http://b/216364337 This check warns when return values of standard-library functions (including fprintf, snprintf) are not checked. Some of these warnings turn to error when tidy_checks_as_errors in Android.bp. Disable this for now and follow-up after compiler update to disable or fix individual instances. Test: Build with new compiler Change-Id: I5af89b3f9cea4961c69708c51d22c510d478405b --- cc/tidy.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cc/tidy.go b/cc/tidy.go index 97418fe17..1f5f56d5b 100644 --- a/cc/tidy.go +++ b/cc/tidy.go @@ -156,6 +156,9 @@ func (tidy *tidyFeature) flags(ctx ModuleContext, flags Flags) Flags { // Too many existing functions trigger this rule, and fixing it requires large code // refactoring. The cost of maintaining this tidy rule outweighs the benefit it brings. tidyChecks = tidyChecks + ",-bugprone-easily-swappable-parameters" + // http://b/216364337 - TODO: Follow-up after compiler update to + // disable or fix individual instances. + tidyChecks = tidyChecks + ",-cert-err33-c" flags.TidyFlags = append(flags.TidyFlags, tidyChecks) if ctx.Config().IsEnvTrue("WITH_TIDY") {