[Piglit] [PATCH] util: Initialize Mersenne member variables.

Brian Paul brian.e.paul at gmail.com
Sun Dec 16 08:57:11 PST 2012


On Sat, Dec 15, 2012 at 2:14 AM, Vinson Lee <vlee at freedesktop.org> wrote:
> Fixes uninitialized scalar field defects reported by Coverity.
>
> Signed-off-by: Vinson Lee <vlee at freedesktop.org>
> ---
>  tests/util/mersenne.hpp | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/tests/util/mersenne.hpp b/tests/util/mersenne.hpp
> index 0f39e13..3e311fc 100644
> --- a/tests/util/mersenne.hpp
> +++ b/tests/util/mersenne.hpp
> @@ -48,7 +48,8 @@ public:
>     static const uint32_t rand_max = 0xFFFFFFFF;
>
>  public:
> -   Mersenne()
> +   Mersenne() :
> +      mSeed(0), mIndex(0), mState()
>     {
>     }
>

Reviewed-by: Brian Paul <brianp at vmware.com>


More information about the Piglit mailing list