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:
parent
13f359fa83
commit
0331153b22
|
@ -1008,6 +1008,10 @@ drmmode_create_bo(drmmode_ptr drmmode, drmmode_bo *bo,
|
||||||
|
|
||||||
#ifdef GLAMOR_HAS_GBM
|
#ifdef GLAMOR_HAS_GBM
|
||||||
if (drmmode->glamor) {
|
if (drmmode->glamor) {
|
||||||
|
#ifdef GBM_BO_WITH_MODIFIERS
|
||||||
|
uint32_t num_modifiers;
|
||||||
|
uint64_t *modifiers = NULL;
|
||||||
|
#endif
|
||||||
uint32_t format;
|
uint32_t format;
|
||||||
|
|
||||||
if (drmmode->scrn->depth == 30)
|
if (drmmode->scrn->depth == 30)
|
||||||
|
@ -1016,9 +1020,6 @@ drmmode_create_bo(drmmode_ptr drmmode, drmmode_bo *bo,
|
||||||
format = GBM_FORMAT_ARGB8888;
|
format = GBM_FORMAT_ARGB8888;
|
||||||
|
|
||||||
#ifdef GBM_BO_WITH_MODIFIERS
|
#ifdef GBM_BO_WITH_MODIFIERS
|
||||||
uint32_t num_modifiers;
|
|
||||||
uint64_t *modifiers = NULL;
|
|
||||||
|
|
||||||
num_modifiers = get_modifiers_set(drmmode->scrn, format, &modifiers,
|
num_modifiers = get_modifiers_set(drmmode->scrn, format, &modifiers,
|
||||||
FALSE, TRUE);
|
FALSE, TRUE);
|
||||||
if (num_modifiers > 0 &&
|
if (num_modifiers > 0 &&
|
||||||
|
|
Loading…
Reference in New Issue