Skip to content

fix werror build with clang

Matthew Waters requested to merge ystreet/gst-plugins-bad:clang into master

commit 47624798

mpeg2enc: fix werror build with clang

/usr/include/mjpegtools/mpeg2enc/ontheflyratectlpass1.hh:1:9: error: '_ONTHEFLYRATECTLPASS1_HH' is used as a header guard here, followed by #define of a different macro [-Werror,-Wheader-guard]
#ifndef _ONTHEFLYRATECTLPASS1_HH
        ^~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/mjpegtools/mpeg2enc/ontheflyratectlpass1.hh:2:9: note: '_ONTHELFYRATECTLPASS1_HH' is defined here; did you mean '_ONTHEFLYRATECTLPASS1_HH'?
#define _ONTHELFYRATECTLPASS1_HH
        ^~~~~~~~~~~~~~~~~~~~~~~~
        _ONTHEFLYRATECTLPASS1_HH
In file included from ../subprojects/gst-plugins-bad/ext/mpeg2enc/gstmpeg2encoder.cc:31:
/usr/include/mjpegtools/mpeg2enc/ontheflyratectlpass2.hh:1:9: error: '_ONTHEFLYRATECTLPASS2_HH' is used as a header guard here, followed by #define of a different macro [-Werror,-Wheader-guard]
#ifndef _ONTHEFLYRATECTLPASS2_HH
        ^~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/mjpegtools/mpeg2enc/ontheflyratectlpass2.hh:2:9: note: '_ONTHELFYRATECTLPASS2_HH' is defined here; did you mean '_ONTHEFLYRATECTLPASS2_HH'?
#define _ONTHELFYRATECTLPASS2_HH
        ^~~~~~~~~~~~~~~~~~~~~~~~
        _ONTHEFLYRATECTLPASS2_HH

/usr/include/mjpegtools/mpeg2enc/encoderparams.hh:82:1: error: struct 'RateCtl' was previously declared as a class; this is valid, but may result in linker errors under the Microsoft C++ ABI [-Werror,-Wmismatched-tags]
struct RateCtl;
^
/usr/include/mjpegtools/mpeg2enc/ratectl.hh:50:7: note: previous use is here
class RateCtl
      ^
/usr/include/mjpegtools/mpeg2enc/encoderparams.hh:82:1: note: did you mean class here?
struct RateCtl;
^~~~~~
class

commit c9f79e30

uvch264: fix werror build with clang

../subprojects/gst-plugins-bad/sys/uvch264/gstuvch264deviceprovider.c:48:1: warning: unused function 'GST__UVC_H264_DEVICE' [-Wunused-function]
G_DECLARE_FINAL_TYPE (GstUvcH264Device, gst_uvc_h264_device, GST_,
^
/usr/include/glib-2.0/gobject/gtype.h:1405:33: note: expanded from macro 'G_DECLARE_FINAL_TYPE'
  static inline ModuleObjName * MODULE##_##OBJ_NAME (gpointer ptr) {                                     \
                                ^
<scratch space>:75:1: note: expanded from here
GST__UVC_H264_DEVICE
^
../subprojects/gst-plugins-bad/sys/uvch264/gstuvch264deviceprovider.c:48:1: warning: unused function 'GST__IS_UVC_H264_DEVICE' [-Wunused-function]
/usr/include/glib-2.0/gobject/gtype.h:1407:26: note: expanded from macro 'G_DECLARE_FINAL_TYPE'
  static inline gboolean MODULE##_IS_##OBJ_NAME (gpointer ptr) {                                         \
                         ^
<scratch space>:78:1: note: expanded from here
GST__IS_UVC_H264_DEVICE
^
../subprojects/gst-plugins-bad/sys/uvch264/gstuvch264deviceprovider.c:139:1: warning: unused function 'GST_UVC_H264_DEVICE_PROVIDER' [-Wunused-function]
G_DECLARE_FINAL_TYPE (GstUvcH264DeviceProvider, gst_uvc_h264_device_provider, GST, UVC_H264_DEVICE_PROVIDER, GstDeviceProvider)
^
/usr/include/glib-2.0/gobject/gtype.h:1405:33: note: expanded from macro 'G_DECLARE_FINAL_TYPE'
  static inline ModuleObjName * MODULE##_##OBJ_NAME (gpointer ptr) {                                     \
                                ^
<scratch space>:137:1: note: expanded from here
GST_UVC_H264_DEVICE_PROVIDER
^
../subprojects/gst-plugins-bad/sys/uvch264/gstuvch264deviceprovider.c:139:1: warning: unused function 'GST_IS_UVC_H264_DEVICE_PROVIDER' [-Wunused-function]
/usr/include/glib-2.0/gobject/gtype.h:1407:26: note: expanded from macro 'G_DECLARE_FINAL_TYPE'
  static inline gboolean MODULE##_IS_##OBJ_NAME (gpointer ptr) {                                         \
                         ^
<scratch space>:140:1: note: expanded from here
GST_IS_UVC_H264_DEVICE_PROVIDER
^

commit 2f83ded5

av1enc: fix werror build with clang

../subprojects/gst-plugins-bad/ext/aom/gstav1enc.c:415:34: warning: implicit conversion from enumeration type 'GstAV1EncEndUsageMode' to different enumeration type 'enum aom_rc_mode' [-Wenum-conversion]
  av1enc->aom_cfg.rc_end_usage = DEFAULT_END_USAGE;
                               ~ ^~~~~~~~~~~~~~~~~
../subprojects/gst-plugins-bad/ext/aom/gstav1enc.c:162:41: note: expanded from macro 'DEFAULT_END_USAGE'
#define DEFAULT_END_USAGE               GST_AV1_ENC_END_USAGE_VBR
                                        ^~~~~~~~~~~~~~~~~~~~~~~~~
Edited by Matthew Waters

Merge request reports