modesetting: Fix compiler warning

Fix the following compiler warning:

drmmode_display.c: In function ‘drmmode_create_bo’:
drmmode_display.c:1019:9: warning: ISO C90 forbids mixed declarations and code [
 1019 |         uint32_t num_modifiers;
      |         ^~~~~~~~

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
This commit is contained in:
Hans de Goede 2019-06-24 21:49:59 +02:00
parent 13f359fa83
commit 0331153b22

View File

@ -1008,6 +1008,10 @@ drmmode_create_bo(drmmode_ptr drmmode, drmmode_bo *bo,
#ifdef GLAMOR_HAS_GBM
if (drmmode->glamor) {
#ifdef GBM_BO_WITH_MODIFIERS
uint32_t num_modifiers;
uint64_t *modifiers = NULL;
#endif
uint32_t format;
if (drmmode->scrn->depth == 30)
@ -1016,9 +1020,6 @@ drmmode_create_bo(drmmode_ptr drmmode, drmmode_bo *bo,
format = GBM_FORMAT_ARGB8888;
#ifdef GBM_BO_WITH_MODIFIERS
uint32_t num_modifiers;
uint64_t *modifiers = NULL;
num_modifiers = get_modifiers_set(drmmode->scrn, format, &modifiers,
FALSE, TRUE);
if (num_modifiers > 0 &&