[Piglit] [PATCH 1/6] glean/pixelformats: Initialize PixelFormatsTest member variables.
Brian Paul
brianp at vmware.com
Wed Jan 2 06:51:52 PST 2013
On 01/01/2013 05:49 PM, Vinson Lee wrote:
> Fixes uninitialized scalar field defect reported by Coverity.
>
> Signed-off-by: Vinson Lee<vlee at freedesktop.org>
> ---
> tests/glean/tpixelformats.h | 19 +++++++++++--------
> 1 file changed, 11 insertions(+), 8 deletions(-)
>
> diff --git a/tests/glean/tpixelformats.h b/tests/glean/tpixelformats.h
> index 20641fe..d0edb94 100644
> --- a/tests/glean/tpixelformats.h
> +++ b/tests/glean/tpixelformats.h
> @@ -42,15 +42,18 @@ class PixelFormatsTest: public MultiTest
> {
> public:
> PixelFormatsTest(const char* testName, const char* filter,
> - const char *extensions, const char* description)
> - : MultiTest(testName, filter, extensions, description)
> + const char *extensions, const char* description):
> + MultiTest(testName, filter, extensions, description),
> + alphaBits(0),
> + defaultAlpha(0),
> + haveHalfFloat(false),
> + haveABGR(false),
> + haveSRGB(false),
> + haveCombine(false),
> + haveRG(false),
> + haveSnorm(false),
> + haveTexSharedExp(false)
> {
> - alphaBits = 0;
> - defaultAlpha = 0;
> - haveHalfFloat = false;
> - haveABGR = false;
> - haveSRGB = false;
> - haveCombine = false;
> }
>
> virtual void runOne(MultiTestResult&r, Window&w);
LGTM. Reviewed-by: Brian Paul <brianp at vmware.com>
I wouldn't spent too much time on glean if I were you. We really want
to convert the tests we care about to regular piglit tests...
-Brian
More information about the Piglit
mailing list