summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEleni Maria Stea <elene.mst@gmail.com>2022-05-09 14:56:11 +0300
committerEleni Maria Stea <elene.mst@gmail.com>2022-05-09 14:56:11 +0300
commitc907d4ade13a0ef883972f4bafdc94bc8c1f3573 (patch)
treec96829310c72192a2a32866cf7bf2994241c41e7
parent678a32b98fc39fe385b3bb824d58d2927821c5f6 (diff)
downloadlibdrm-c907d4ade13a0ef883972f4bafdc94bc8c1f3573.tar.gz
libdrm-c907d4ade13a0ef883972f4bafdc94bc8c1f3573.tar.bz2
libdrm-c907d4ade13a0ef883972f4bafdc94bc8c1f3573.zip
xf86drm.c: fix C99 warning
Moved declaration to the top to resolve C99 compliance warning. Signed-off-by: Eleni Maria Stea <elene.mst@gmail.com> Reviewed-by: Simon Ser <contact@emersion.fr>
-rw-r--r--xf86drm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/xf86drm.c b/xf86drm.c
index 5933e4bc..76fdfaab 100644
--- a/xf86drm.c
+++ b/xf86drm.c
@@ -261,6 +261,7 @@ drmGetAfbcFormatModifierNameFromArm(uint64_t modifier, FILE *fp)
static bool
drmGetAfrcFormatModifierNameFromArm(uint64_t modifier, FILE *fp)
{
+ bool scan_layout;
for (unsigned int i = 0; i < 2; ++i) {
uint64_t coding_unit_block =
(modifier >> (i * 4)) & AFRC_FORMAT_MOD_CU_SIZE_MASK;
@@ -292,7 +293,7 @@ drmGetAfrcFormatModifierNameFromArm(uint64_t modifier, FILE *fp)
}
}
- bool scan_layout =
+ scan_layout =
(modifier & AFRC_FORMAT_MOD_LAYOUT_SCAN) == AFRC_FORMAT_MOD_LAYOUT_SCAN;
if (scan_layout) {
fprintf(fp, "SCAN");