label: Remove a redundant assignment

clang-tidy says:

gtklabel.c:1188:15: warning: Although the value stored to 'mid' is used in the enclosing expression, the value is never actually read from 'mid'
        min = mid = text_width;
              ^     ~~~~~~~~~~

Which seems right since mid will be assigned to at the beginning of the
next loop iteration anyway.
This commit is contained in:
Timm Bäder
2022-01-02 09:46:28 +01:00
parent fef179b625
commit b408967278

View File

@@ -1186,7 +1186,7 @@ my_pango_layout_get_width_for_height (PangoLayout *layout,
pango_layout_get_size (layout, &text_width, &text_height);
text_width = PANGO_PIXELS_CEIL (text_width);
if (text_width > mid)
min = mid = text_width;
min = text_width;
else if (text_height > for_height)
min = mid + 1;
else