[PATCH libdrm 1/1] tests/exynos: Fix warnings
Tobias Jakobi
tjakobi at math.uni-bielefeld.de
Wed Mar 18 13:17:10 PDT 2015
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Jan Vesely wrote:
>>
>>> @@ -573,6 +573,7 @@ static int g2d_checkerboard_test(struct
>>> exynos_device *dev, src_img.user_ptr[0].userptr = (unsigned
>>> long)checkerboard; src_img.user_ptr[0].size = img_w * img_h *
>>> 4; break; + case G2D_IMGBUF_COLOR: default: ret = -EFAULT; goto
>>> fail;
>>>
>> Hmm, I don't see the reason why this label should be added to the
>> switch statement?
>
> This is mostly to appease the compiler. -Wswitch-enum warns about
> missing enumeration cases even if default is present. On the other
> hand it also warns against branches that use values outside of the
> enumeration (which might be useful).
Ah, that makes sense. I guess adding the label is a good thing then!
With best wishes,
Tobias
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iEYEARECAAYFAlUJ3UYACgkQ6bCODwikBXd6xgCdG4sZERoY6KalhPn6AhyoxfbO
8EQAnRrCZrPXN/fjqwZT4X6a/7wLofeJ
=C/FO
-----END PGP SIGNATURE-----
More information about the dri-devel
mailing list