gstvalue: fix compilation warning in "holds" macros
authorAleksandr Slobodeniuk <aslobodeniuk@fluendo.com>
Mon, 25 Jan 2021 21:51:33 +0000 (22:51 +0100)
committerGStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Thu, 28 Jan 2021 16:15:13 +0000 (16:15 +0000)
commitec8343214072be01d63811383d7563d201358b73
tree98dff09eebfe53229e74462ab070907e5af0b4ff
parent9d2825ccffd2ca7dd1eed08f35a51e056393063f
gstvalue: fix compilation warning in "holds" macros

GST_VALUE_HOLDS_... macros may cause -Waddress warning
on gcc if GValue is allocated on stack:

gstvalue.h:145:46: warning: the comparison will always
evaluate as ‘true’ for the address of ‘v’ will never
be NULL [-Waddress]

 #define GST_VALUE_HOLDS_CAPS(x)         ((x) != NULL &&
  G_VALUE_TYPE(x) == _gst_caps_type)

Fixes #653

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/738>
gst/gstvalue.h