amd/addrlib: fix forgotten char -> enum conversions
authorPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Wed, 20 May 2020 13:26:29 +0000 (15:26 +0200)
committerPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Fri, 22 May 2020 07:11:47 +0000 (09:11 +0200)
clang warning:
  result of comparison of constant 115 with expression of type
  'const enum Dim' is always false

Fixes: e3e704c7e7e ("amd/addrlib: Use enum instead of sparse chars to identify dimensions")
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5119>

src/amd/addrlib/src/core/coord.cpp

index b46149e7f83277581772e0d95aa40d5d8d8c3d78..3cf066daa94de5fc99b1ee99946b056b673580ef 100644 (file)
@@ -83,11 +83,11 @@ BOOL_32 Coordinate::operator<(const Coordinate& b)
     }
     else
     {
     }
     else
     {
-        if (dim == 's' || b.dim == 'm')
+        if (dim == DIM_S || b.dim == DIM_M)
         {
             ret = TRUE;
         }
         {
             ret = TRUE;
         }
-        else if (b.dim == 's' || dim == 'm')
+        else if (b.dim == DIM_S || dim == DIM_M)
         {
             ret = FALSE;
         }
         {
             ret = FALSE;
         }