mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-08 16:35:40 +00:00
build: Add all kinds of compiler warning flags and fix the resulting warnings
This commit is contained in:
parent
47f9aba42d
commit
a450bd027f
10 changed files with 31 additions and 11 deletions
|
@ -144,7 +144,11 @@ dnl set location of plugin directory
|
|||
AG_GST_SET_PLUGINDIR
|
||||
|
||||
dnl define an ERROR_CFLAGS Makefile variable
|
||||
AG_GST_SET_ERROR_CFLAGS($GST_GIT)
|
||||
AG_GST_SET_ERROR_CFLAGS($GST_GIT, [
|
||||
-Wmissing-declarations -Wmissing-prototypes -Wredundant-decls -Wundef
|
||||
-Wwrite-strings -Wformat-nonliteral -Wformat-security -Wold-style-definition
|
||||
-Wcast-align -Winit-self -Wmissing-include-dirs -Waddress
|
||||
-Waggregate-return -Wno-multichar -Wnested-externs ])
|
||||
|
||||
dnl define correct level for debugging messages
|
||||
AG_GST_SET_LEVEL_DEFAULT($GST_GIT)
|
||||
|
|
|
@ -65,6 +65,8 @@ typedef struct _GstFFMpegAudioResampleClass
|
|||
#define GST_IS_FFMPEGAUDIORESAMPLE_CLASS(klass) \
|
||||
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_FFMPEGAUDIORESAMPLE))
|
||||
|
||||
GType gst_ffmpegaudioresample_get_type (void);
|
||||
|
||||
static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src",
|
||||
GST_PAD_SRC,
|
||||
GST_PAD_ALWAYS,
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
|
||||
#include "gstffmpeg.h"
|
||||
#include "gstffmpegenc.h"
|
||||
#include "gstffmpegcfg.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
|
@ -381,7 +382,7 @@ static gint huffyuv[] = {
|
|||
* or some may have slightly varying enum-types with more or less options.
|
||||
* The enum-types themselves should be declared above. */
|
||||
void
|
||||
gst_ffmpeg_cfg_init ()
|
||||
gst_ffmpeg_cfg_init (void)
|
||||
{
|
||||
GParamSpec *pspec;
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
void gst_ffmpeg_cfg_init ();
|
||||
void gst_ffmpeg_cfg_init (void);
|
||||
|
||||
void gst_ffmpeg_cfg_install_property (GstFFMpegEncClass * klass, guint base);
|
||||
|
||||
|
|
|
@ -1268,7 +1268,7 @@ gst_ffmpeg_codecid_to_caps (enum CodecID codec_id,
|
|||
case CODEC_ID_ADPCM_EA_XAS:
|
||||
case CODEC_ID_ADPCM_THP:
|
||||
{
|
||||
gchar *layout = NULL;
|
||||
const gchar *layout = NULL;
|
||||
|
||||
switch (codec_id) {
|
||||
case CODEC_ID_ADPCM_IMA_QT:
|
||||
|
@ -1417,7 +1417,7 @@ gst_ffmpeg_codecid_to_caps (enum CodecID codec_id,
|
|||
case CODEC_ID_XAN_DPCM:
|
||||
case CODEC_ID_SOL_DPCM:
|
||||
{
|
||||
gchar *layout = NULL;
|
||||
const gchar *layout = NULL;
|
||||
|
||||
switch (codec_id) {
|
||||
case CODEC_ID_ROQ_DPCM:
|
||||
|
|
|
@ -125,7 +125,4 @@ gst_ffmpeg_formatid_get_codecids (const gchar *format_name,
|
|||
|
||||
|
||||
|
||||
GstBuffer *
|
||||
new_aligned_buffer (gint size, GstCaps * caps);
|
||||
|
||||
#endif /* __GST_FFMPEG_CODECMAP_H__ */
|
||||
|
|
|
@ -66,6 +66,8 @@ typedef struct _GstFFMpegDeinterlaceClass
|
|||
#define GST_IS_FFMPEGDEINTERLACE_CLASS(klass) \
|
||||
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_FFMPEGDEINTERLACE))
|
||||
|
||||
GType gst_ffmpegdeinterlace_get_type (void);
|
||||
|
||||
static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src",
|
||||
GST_PAD_SRC,
|
||||
GST_PAD_ALWAYS,
|
||||
|
|
|
@ -934,6 +934,18 @@ gst_ffmpegdemux_aggregated_flow (GstFFMpegDemux * demux)
|
|||
return res;
|
||||
}
|
||||
|
||||
static gchar *
|
||||
gst_ffmpegdemux_create_padname (const gchar * templ, gint n)
|
||||
{
|
||||
GString *string;
|
||||
|
||||
string = g_string_new (templ);
|
||||
g_string_truncate (string, string->len - 4);
|
||||
g_string_append_printf (string, "%02d", n);
|
||||
|
||||
return g_string_free (string, FALSE);
|
||||
}
|
||||
|
||||
static GstFFStream *
|
||||
gst_ffmpegdemux_get_stream (GstFFMpegDemux * demux, AVStream * avstream)
|
||||
{
|
||||
|
@ -988,7 +1000,9 @@ gst_ffmpegdemux_get_stream (GstFFMpegDemux * demux, AVStream * avstream)
|
|||
stream->unknown = FALSE;
|
||||
|
||||
/* create new pad for this stream */
|
||||
padname = g_strdup_printf (GST_PAD_TEMPLATE_NAME_TEMPLATE (templ), num);
|
||||
padname =
|
||||
gst_ffmpegdemux_create_padname (GST_PAD_TEMPLATE_NAME_TEMPLATE (templ),
|
||||
num);
|
||||
pad = gst_pad_new_from_template (templ, padname);
|
||||
g_free (padname);
|
||||
|
||||
|
|
|
@ -92,7 +92,7 @@ typedef struct PixFmtInfo
|
|||
/* this table gives more information about formats */
|
||||
static PixFmtInfo pix_fmt_info[PIX_FMT_NB];
|
||||
void
|
||||
gst_ffmpeg_init_pix_fmt_info ()
|
||||
gst_ffmpeg_init_pix_fmt_info (void)
|
||||
{
|
||||
/* YUV formats */
|
||||
pix_fmt_info[PIX_FMT_YUV420P].name = g_strdup ("yuv420p");
|
||||
|
|
|
@ -78,7 +78,7 @@ gst_ffmpeg_time_gst_to_ff (guint64 time, AVRational base)
|
|||
}
|
||||
|
||||
void
|
||||
gst_ffmpeg_init_pix_fmt_info();
|
||||
gst_ffmpeg_init_pix_fmt_info(void);
|
||||
|
||||
|
||||
G_CONST_RETURN gchar *
|
||||
|
|
Loading…
Reference in a new issue