modesetting: Fix warning of unused variable if not GLAMOR_HAS_GBM
../hw/xfree86/drivers/modesetting/driver.c: In function ‘redisplay_dirty’: ../hw/xfree86/drivers/modesetting/driver.c:586:20: warning: unused variable ‘ms’ [-Wunused-variable] modesettingPtr ms = modesettingPTR(xf86ScreenToScrn(screen)); Move the variable ms into #ifdef GLAMOR_HAS_GBM, where it is used. Signed-off-by: Daniel Martin <consume.noise@gmail.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
This commit is contained in:
parent
6d7e1d1de0
commit
66d8cbf8ce
|
@ -585,7 +585,6 @@ dispatch_slave_dirty(ScreenPtr pScreen)
|
||||||
static void
|
static void
|
||||||
redisplay_dirty(ScreenPtr screen, PixmapDirtyUpdatePtr dirty, int *timeout)
|
redisplay_dirty(ScreenPtr screen, PixmapDirtyUpdatePtr dirty, int *timeout)
|
||||||
{
|
{
|
||||||
modesettingPtr ms = modesettingPTR(xf86ScreenToScrn(screen));
|
|
||||||
RegionRec pixregion;
|
RegionRec pixregion;
|
||||||
|
|
||||||
PixmapRegionInit(&pixregion, dirty->slave_dst);
|
PixmapRegionInit(&pixregion, dirty->slave_dst);
|
||||||
|
@ -594,6 +593,7 @@ redisplay_dirty(ScreenPtr screen, PixmapDirtyUpdatePtr dirty, int *timeout)
|
||||||
|
|
||||||
if (!screen->isGPU) {
|
if (!screen->isGPU) {
|
||||||
#ifdef GLAMOR_HAS_GBM
|
#ifdef GLAMOR_HAS_GBM
|
||||||
|
modesettingPtr ms = modesettingPTR(xf86ScreenToScrn(screen));
|
||||||
/*
|
/*
|
||||||
* When copying from the master framebuffer to the shared pixmap,
|
* When copying from the master framebuffer to the shared pixmap,
|
||||||
* we must ensure the copy is complete before the slave starts a
|
* we must ensure the copy is complete before the slave starts a
|
||||||
|
|
Loading…
Reference in New Issue