From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Mon, 22 Nov 2021 06:58:41 +0100 From: Zbigniew =?utf-8?Q?Kempczy=C5=84ski?= Message-ID: <20211122055841.GA4959@zkempczy-mobl2> References: <20211119125945.55056-1-tvrtko.ursulin@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20211119125945.55056-1-tvrtko.ursulin@linux.intel.com> Subject: Re: [igt-dev] [PATCH i-g-t 1/6] tests/api_intel_allocator: Fix build warning List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" To: Tvrtko Ursulin Cc: igt-dev@lists.freedesktop.org, Intel-gfx@lists.freedesktop.org, Tvrtko Ursulin List-ID: On Fri, Nov 19, 2021 at 12:59:40PM +0000, Tvrtko Ursulin wrote: > From: Tvrtko Ursulin > > .../tests/i915/api_intel_allocator.c: In function ‘basic_alloc’: > .../tests/i915/api_intel_allocator.c:158:25: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] > 158 | if (j == i) > | ^~ > > Signed-off-by: Tvrtko Ursulin > Cc: Zbigniew Kempczyński I've already seen this on gcc 11.2.0 (Ubuntu 21.10) and got locally same fix, so: Reviewed-by: Zbigniew Kempczyński -- Zbigniew > --- > tests/i915/api_intel_allocator.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tests/i915/api_intel_allocator.c b/tests/i915/api_intel_allocator.c > index 4b74317ed3d0..6d7764ca3f51 100644 > --- a/tests/i915/api_intel_allocator.c > +++ b/tests/i915/api_intel_allocator.c > @@ -157,7 +157,7 @@ static void basic_alloc(int fd, int cnt, uint8_t type) > for (j = 0; j < cnt; j++) { > if (j == i) > continue; > - igt_assert(!overlaps(&obj[i], &obj[j])); > + igt_assert(!overlaps(&obj[i], &obj[j])); > } > } > > -- > 2.32.0 >