[PATCH 1/2] KMS: Fix output properties logic error.

Alex Deucher alexdeucher at gmail.com
Thu May 12 07:41:12 PDT 2011


2011/5/12 Michel Dänzer <michel at daenzer.net>:
> From: Michel Dänzer <daenzer at vmware.com>
>
> Pointed out by clang:
>
> ../../src/drmmode_display.c:1023:30: error: use of logical && with constant operand; switch to bitwise & or remove constant [-Werror,-Wconstant-logical-operand]
>                if (props && (props->flags && DRM_MODE_PROP_ENUM)) {
>                                           ^  ~~~~~~~~~~~~~~~~~~

Reviewed-by: Alex Deucher <alexdeucher at gmail.com>

> ---
>  src/drmmode_display.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/src/drmmode_display.c b/src/drmmode_display.c
> index 7873d57..afa4c26 100644
> --- a/src/drmmode_display.c
> +++ b/src/drmmode_display.c
> @@ -1020,7 +1020,7 @@ drmmode_output_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, int num, int *num_dv
>
>        for (i = 0; i < koutput->count_props; i++) {
>                props = drmModeGetProperty(drmmode->fd, koutput->props[i]);
> -               if (props && (props->flags && DRM_MODE_PROP_ENUM)) {
> +               if (props && (props->flags & DRM_MODE_PROP_ENUM)) {
>                        if (!strcmp(props->name, "DPMS")) {
>                                drmmode_output->dpms_enum_id = koutput->props[i];
>                                drmModeFreeProperty(props);
> --
> 1.7.5.1
>
> _______________________________________________
> xorg-driver-ati mailing list
> xorg-driver-ati at lists.x.org
> http://lists.x.org/mailman/listinfo/xorg-driver-ati
>


More information about the xorg-driver-ati mailing list