Skip to content

Commit

Permalink
xvimageallocator: Fix build warning error
Browse files Browse the repository at this point in the history
Fix unused variable build error if HAVE_XSHM is undefined

https://bugzilla.gnome.org/show_bug.cgi?id=790329
  • Loading branch information
seungha-yang authored and ndufresne committed Dec 6, 2017
1 parent 427df2d commit e1e46b6
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions sys/xvimage/xvimageallocator.c
Expand Up @@ -351,7 +351,9 @@ gst_xvimage_allocator_alloc (GstXvImageAllocator * allocator, gint im_format,
GstXvContext *context;
gint align, offset;
GstXvImageMemory *mem;
#ifdef HAVE_XSHM
gint expected_size = 0;
#endif

context = allocator->context;

Expand Down Expand Up @@ -529,14 +531,6 @@ gst_xvimage_allocator_alloc (GstXvImageAllocator * allocator, gint im_format,
return GST_MEMORY_CAST (mem);

/* ERRORS */
unexpected_size:
{
g_mutex_unlock (&context->lock);
g_set_error (error, GST_RESOURCE_ERROR, GST_RESOURCE_ERROR_WRITE,
"unexpected XShm image size (got %d, expected %d)",
mem->xvimage->data_size, expected_size);
goto beach;
}
create_failed:
{
g_mutex_unlock (&context->lock);
Expand All @@ -550,6 +544,14 @@ gst_xvimage_allocator_alloc (GstXvImageAllocator * allocator, gint im_format,
goto beach;
}
#ifdef HAVE_XSHM
unexpected_size:
{
g_mutex_unlock (&context->lock);
g_set_error (error, GST_RESOURCE_ERROR, GST_RESOURCE_ERROR_WRITE,
"unexpected XShm image size (got %d, expected %d)",
mem->xvimage->data_size, expected_size);
goto beach;
}
shmget_failed:
{
g_mutex_unlock (&context->lock);
Expand Down

0 comments on commit e1e46b6

Please sign in to comment.