mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-10 17:35:59 +00:00
rpicamsrc: fix and silence some compiler warnings
Some are in system headers, and in Raspi files we want to keep modifications to a minimum. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/667>
This commit is contained in:
parent
4a4de61c23
commit
996d2389af
4 changed files with 17 additions and 4 deletions
|
@ -1627,7 +1627,7 @@ static void check_disable_port(MMAL_PORT_T *port)
|
|||
mmal_port_disable(port);
|
||||
}
|
||||
|
||||
void raspicapture_init()
|
||||
void raspicapture_init(void)
|
||||
{
|
||||
bcm_host_init();
|
||||
|
||||
|
|
|
@ -126,7 +126,7 @@ typedef struct
|
|||
|
||||
typedef struct RASPIVID_STATE_T RASPIVID_STATE;
|
||||
|
||||
void raspicapture_init();
|
||||
void raspicapture_init(void);
|
||||
void raspicapture_default_config(RASPIVID_CONFIG *config);
|
||||
RASPIVID_STATE *raspi_capture_setup(RASPIVID_CONFIG *config);
|
||||
gboolean raspi_capture_start(RASPIVID_STATE *state);
|
||||
|
|
|
@ -246,7 +246,9 @@ G_DEFINE_TYPE_WITH_CODE (GstRpiCamSrc, gst_rpi_cam_src,
|
|||
|
||||
#define C_ENUM(v) ((gint) v)
|
||||
|
||||
GType
|
||||
static GType gst_rpi_cam_src_sensor_mode_get_type (void);
|
||||
|
||||
static GType
|
||||
gst_rpi_cam_src_sensor_mode_get_type (void)
|
||||
{
|
||||
static const GEnumValue values[] = {
|
||||
|
|
|
@ -49,6 +49,17 @@ foreach rpi_lib : ['mmal_core', 'mmal_util', 'mmal_vc_client', 'vcos', 'bcm_host
|
|||
mmal_deps += [l]
|
||||
endforeach
|
||||
|
||||
rpi_warn_flags = cc.get_supported_arguments([
|
||||
# vcos/mmal headers
|
||||
'-Wno-redundant-decls',
|
||||
# RaspiCapture.c + RaspiCamControl.c
|
||||
'-Wno-discarded-qualifiers',
|
||||
'-Wno-declaration-after-statement',
|
||||
'-Wno-missing-prototypes',
|
||||
'-Wno-missing-declarations',
|
||||
'-Wno-stringop-truncation',
|
||||
])
|
||||
|
||||
gnome = import('gnome')
|
||||
|
||||
enums = gnome.mkenums_simple('gstrpicam-enum-types',
|
||||
|
@ -59,7 +70,7 @@ enums = gnome.mkenums_simple('gstrpicam-enum-types',
|
|||
# we might need '-Wl,--no-as-needed' or b_asneeded=false on ubuntu, tbd
|
||||
gstrpicamsrc = library('gstrpicamsrc',
|
||||
rpicamsrc_sources, enums,
|
||||
c_args: [gst_plugins_good_args, rpi_inc_args],
|
||||
c_args: [gst_plugins_good_args, rpi_inc_args, rpi_warn_flags],
|
||||
include_directories: [configinc, libsinc],
|
||||
dependencies: [gst_dep, gstbase_dep, gstvideo_dep] + mmal_deps,
|
||||
install_dir: plugins_install_dir,
|
||||
|
|
Loading…
Reference in a new issue