Skip to content

Commit

Permalink
observer: Silence gcc warning
Browse files Browse the repository at this point in the history
GCC complains that:

cairo-surface-observer.c:289:26: warning: ignoring return value of
'cairo_device_acquire', declared with attribute warn_unused_result
[-Wunused-result]

Explain why it's safe to ignore it in a comment.
  • Loading branch information
Andrea Canciani committed Feb 11, 2012
1 parent f2567e9 commit 469994a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/cairo-surface-observer.c
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,11 @@ static void
_cairo_device_observer_lock (void *_device)
{
cairo_device_observer_t *device = (cairo_device_observer_t *) _device;
cairo_device_acquire (device->target);
cairo_status_t ignored;

/* cairo_device_acquire() can fail for nil and finished
* devices. We don't care about observing them. */
ignored = cairo_device_acquire (device->target);
}

static void
Expand Down

0 comments on commit 469994a

Please sign in to comment.