Summary: | [nir] src/compiler/nir/nir_loop_analyze.c uninitialized variable | ||
---|---|---|---|
Product: | Mesa | Reporter: | oschowa |
Component: | Mesa core | Assignee: | mesa-dev |
Status: | RESOLVED FIXED | QA Contact: | mesa-dev |
Severity: | normal | ||
Priority: | medium | CC: | t_arceri |
Version: | git | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
oschowa
2019-01-06 13:39:01 UTC
The first two conditions of the if can never be true on the first iteration of the loop so we will never actually do a comparison with an uninitialized variable. Unfortunately the compiler can't know that. Ok, that makes sense, thanks. Would it be a good idea to zero-initialize the variable anyways, just to silence the warning? Anyways, feel free to close this. I've sent a patch to avoid the warning: https://patchwork.freedesktop.org/patch/275164/ Fixed by: commit 6dade5d534a752ba769f2ea91153c6c5d2acb956 Author: Timothy Arceri <tarceri@itsqueeze.com> Date: Mon Jan 7 10:33:43 2019 +1100 nir: avoid uninitialized variable warning Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109231 |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.