mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-13 23:22:54 +00:00
Add -Wold-style-definition
and fix the warnings
This commit is contained in:
parent
647cf64c01
commit
240f494aa7
16 changed files with 51 additions and 61 deletions
|
@ -241,7 +241,7 @@ AG_GST_SET_PLUGINDIR
|
|||
dnl define an ERROR_CFLAGS Makefile variable
|
||||
AG_GST_SET_ERROR_CFLAGS($GST_GIT, [
|
||||
-Wmissing-declarations -Wmissing-prototypes -Wredundant-decls -Wundef
|
||||
-Wwrite-strings -Wformat-nonliteral -Wformat-security ])
|
||||
-Wwrite-strings -Wformat-nonliteral -Wformat-security -Wold-style-definition ])
|
||||
|
||||
dnl define an ERROR_CXXFLAGS Makefile variable
|
||||
AG_GST_SET_ERROR_CXXFLAGS($GST_GIT, [
|
||||
|
|
|
@ -141,7 +141,7 @@ gst_jack_audio_src_free_channels (GstJackAudioSrc * src)
|
|||
|
||||
/* ringbuffer abstract base class */
|
||||
static GType
|
||||
gst_jack_ring_buffer_get_type ()
|
||||
gst_jack_ring_buffer_get_type (void)
|
||||
{
|
||||
static GType ringbuffer_type = 0;
|
||||
|
||||
|
|
|
@ -437,7 +437,7 @@ gst_neonhttp_src_get_property (GObject * object, guint prop_id,
|
|||
|
||||
/* NEON CALLBACK */
|
||||
static void
|
||||
oom_callback ()
|
||||
oom_callback (void)
|
||||
{
|
||||
GST_ERROR ("memory exeception in neon");
|
||||
}
|
||||
|
|
|
@ -127,7 +127,7 @@ gst_wildmidi_base_init (gpointer gclass)
|
|||
}
|
||||
|
||||
static gboolean
|
||||
wildmidi_open_config ()
|
||||
wildmidi_open_config (void)
|
||||
{
|
||||
gchar *path = g_strdup (g_getenv ("WILDMIDI_CFG"));
|
||||
gint ret;
|
||||
|
|
|
@ -81,10 +81,8 @@ static unsigned char pc2[48] = {
|
|||
};
|
||||
|
||||
void
|
||||
deskey (key, edf) /* Thanks to James Gillogly & Phil Karn! */
|
||||
unsigned char *key;
|
||||
int32_t edf;
|
||||
{
|
||||
deskey (unsigned char *key, int32_t edf)
|
||||
{ /* Thanks to James Gillogly & Phil Karn! */
|
||||
register int32_t i, j, l, m, n;
|
||||
unsigned char pc1m[56], pcr[56];
|
||||
unsigned long kn[32];
|
||||
|
@ -127,8 +125,7 @@ deskey (key, edf) /* Thanks to James Gillogly & Phil Karn! */
|
|||
}
|
||||
|
||||
static void
|
||||
cookey (raw1)
|
||||
register unsigned long *raw1;
|
||||
cookey (register unsigned long *raw1)
|
||||
{
|
||||
register unsigned long *cook, *raw0;
|
||||
unsigned long dough[32];
|
||||
|
@ -151,8 +148,7 @@ cookey (raw1)
|
|||
}
|
||||
|
||||
void
|
||||
cpkey (into)
|
||||
register unsigned long *into;
|
||||
cpkey (register unsigned long *into)
|
||||
{
|
||||
register unsigned long *from, *endp;
|
||||
|
||||
|
@ -163,8 +159,7 @@ cpkey (into)
|
|||
}
|
||||
|
||||
void
|
||||
usekey (from)
|
||||
register unsigned long *from;
|
||||
usekey (register unsigned long *from)
|
||||
{
|
||||
register unsigned long *to, *endp;
|
||||
|
||||
|
@ -175,8 +170,7 @@ usekey (from)
|
|||
}
|
||||
|
||||
void
|
||||
des (inblock, outblock)
|
||||
unsigned char *inblock, *outblock;
|
||||
des (unsigned char *inblock, unsigned char *outblock)
|
||||
{
|
||||
unsigned long work[2];
|
||||
|
||||
|
@ -187,9 +181,7 @@ des (inblock, outblock)
|
|||
}
|
||||
|
||||
static void
|
||||
scrunch (outof, into)
|
||||
register unsigned char *outof;
|
||||
register unsigned long *into;
|
||||
scrunch (register unsigned char *outof, register unsigned long *into)
|
||||
{
|
||||
*into = (*outof++ & 0xffL) << 24;
|
||||
*into |= (*outof++ & 0xffL) << 16;
|
||||
|
@ -203,9 +195,7 @@ scrunch (outof, into)
|
|||
}
|
||||
|
||||
static void
|
||||
unscrun (outof, into)
|
||||
register unsigned long *outof;
|
||||
register unsigned char *into;
|
||||
unscrun (register unsigned long *outof, register unsigned char *into)
|
||||
{
|
||||
*into++ = (*outof >> 24) & 0xffL;
|
||||
*into++ = (*outof >> 16) & 0xffL;
|
||||
|
@ -371,8 +361,7 @@ static unsigned long SP8[64] = {
|
|||
};
|
||||
|
||||
static void
|
||||
desfunc (block, keys)
|
||||
register unsigned long *block, *keys;
|
||||
desfunc (register unsigned long *block, register unsigned long *keys)
|
||||
{
|
||||
register unsigned long fval, work, right, leftt;
|
||||
register int32_t round;
|
||||
|
|
|
@ -202,7 +202,7 @@ gst_mpeg_descriptor_nth (GstMPEGDescriptor * desc, guint i)
|
|||
}
|
||||
|
||||
void
|
||||
gst_mpegtsdesc_init_debug ()
|
||||
gst_mpegtsdesc_init_debug (void)
|
||||
{
|
||||
GST_DEBUG_CATEGORY_INIT (gstmpegtsdesc_debug, "mpegtsdesc", 0,
|
||||
"MPEG transport stream parser (descriptor)");
|
||||
|
|
|
@ -107,7 +107,7 @@ mpegts_packetizer_stream_subtable_new (guint8 table_id,
|
|||
}
|
||||
|
||||
static MpegTSPacketizerStream *
|
||||
mpegts_packetizer_stream_new ()
|
||||
mpegts_packetizer_stream_new (void)
|
||||
{
|
||||
MpegTSPacketizerStream *stream;
|
||||
|
||||
|
@ -2203,7 +2203,7 @@ out:
|
|||
}
|
||||
|
||||
static void
|
||||
_init_local ()
|
||||
_init_local (void)
|
||||
{
|
||||
GST_DEBUG_CATEGORY_INIT (mpegts_packetizer_debug, "mpegtspacketizer", 0,
|
||||
"MPEG transport stream parser");
|
||||
|
|
|
@ -67,7 +67,7 @@ static gboolean psmux_write_program_stream_map (PsMux * mux);
|
|||
* Returns: A new #PsMux object.
|
||||
*/
|
||||
PsMux *
|
||||
psmux_new ()
|
||||
psmux_new (void)
|
||||
{
|
||||
PsMux *mux;
|
||||
|
||||
|
|
|
@ -121,7 +121,7 @@ static gboolean tsmux_write_pmt (TsMux * mux, TsMuxProgram * program);
|
|||
* Returns: A new #TsMux object.
|
||||
*/
|
||||
TsMux *
|
||||
tsmux_new ()
|
||||
tsmux_new (void)
|
||||
{
|
||||
TsMux *mux;
|
||||
|
||||
|
|
|
@ -75,7 +75,7 @@ atoms_context_free (AtomsContext * context)
|
|||
#define LEAP_YEARS_FROM_1904_TO_1970 17
|
||||
|
||||
static guint64
|
||||
get_current_qt_time ()
|
||||
get_current_qt_time (void)
|
||||
{
|
||||
GTimeVal timeval;
|
||||
|
||||
|
@ -256,7 +256,7 @@ atom_esds_init (AtomESDS * esds)
|
|||
}
|
||||
|
||||
static AtomESDS *
|
||||
atom_esds_new ()
|
||||
atom_esds_new (void)
|
||||
{
|
||||
AtomESDS *esds = g_new0 (AtomESDS, 1);
|
||||
|
||||
|
@ -273,7 +273,7 @@ atom_esds_free (AtomESDS * esds)
|
|||
}
|
||||
|
||||
static AtomFRMA *
|
||||
atom_frma_new ()
|
||||
atom_frma_new (void)
|
||||
{
|
||||
AtomFRMA *frma = g_new0 (AtomFRMA, 1);
|
||||
|
||||
|
@ -289,7 +289,7 @@ atom_frma_free (AtomFRMA * frma)
|
|||
}
|
||||
|
||||
static AtomWAVE *
|
||||
atom_wave_new ()
|
||||
atom_wave_new (void)
|
||||
{
|
||||
AtomWAVE *wave = g_new0 (AtomWAVE, 1);
|
||||
|
||||
|
@ -394,7 +394,7 @@ sample_entry_mp4a_init (SampleTableEntryMP4A * mp4a)
|
|||
}
|
||||
|
||||
static SampleTableEntryMP4A *
|
||||
sample_entry_mp4a_new ()
|
||||
sample_entry_mp4a_new (void)
|
||||
{
|
||||
SampleTableEntryMP4A *mp4a = g_new0 (SampleTableEntryMP4A, 1);
|
||||
|
||||
|
@ -510,7 +510,7 @@ atom_ctts_init (AtomCTTS * ctts)
|
|||
}
|
||||
|
||||
static AtomCTTS *
|
||||
atom_ctts_new ()
|
||||
atom_ctts_new (void)
|
||||
{
|
||||
AtomCTTS *ctts = g_new0 (AtomCTTS, 1);
|
||||
|
||||
|
@ -683,7 +683,7 @@ atom_smhd_init (AtomSMHD * smhd)
|
|||
}
|
||||
|
||||
static AtomSMHD *
|
||||
atom_smhd_new ()
|
||||
atom_smhd_new (void)
|
||||
{
|
||||
AtomSMHD *smhd = g_new0 (AtomSMHD, 1);
|
||||
|
||||
|
@ -721,7 +721,7 @@ atom_hdlr_init (AtomHDLR * hdlr)
|
|||
}
|
||||
|
||||
static AtomHDLR *
|
||||
atom_hdlr_new ()
|
||||
atom_hdlr_new (void)
|
||||
{
|
||||
AtomHDLR *hdlr = g_new0 (AtomHDLR, 1);
|
||||
|
||||
|
@ -767,7 +767,7 @@ atom_url_free (AtomURL * url)
|
|||
}
|
||||
|
||||
static AtomURL *
|
||||
atom_url_new ()
|
||||
atom_url_new (void)
|
||||
{
|
||||
AtomURL *url = g_new0 (AtomURL, 1);
|
||||
|
||||
|
@ -776,7 +776,7 @@ atom_url_new ()
|
|||
}
|
||||
|
||||
static AtomFull *
|
||||
atom_alis_new ()
|
||||
atom_alis_new (void)
|
||||
{
|
||||
guint8 flags[3] = { 0, 0, 1 };
|
||||
AtomFull *alis = g_new0 (AtomFull, 1);
|
||||
|
@ -1012,7 +1012,7 @@ atom_ilst_init (AtomILST * ilst)
|
|||
}
|
||||
|
||||
static AtomILST *
|
||||
atom_ilst_new ()
|
||||
atom_ilst_new (void)
|
||||
{
|
||||
AtomILST *ilst = g_new0 (AtomILST, 1);
|
||||
|
||||
|
@ -1043,7 +1043,7 @@ atom_meta_init (AtomMETA * meta)
|
|||
}
|
||||
|
||||
static AtomMETA *
|
||||
atom_meta_new ()
|
||||
atom_meta_new (void)
|
||||
{
|
||||
AtomMETA *meta = g_new0 (AtomMETA, 1);
|
||||
|
||||
|
@ -1070,7 +1070,7 @@ atom_udta_init (AtomUDTA * udta)
|
|||
}
|
||||
|
||||
static AtomUDTA *
|
||||
atom_udta_new ()
|
||||
atom_udta_new (void)
|
||||
{
|
||||
AtomUDTA *udta = g_new0 (AtomUDTA, 1);
|
||||
|
||||
|
|
|
@ -621,7 +621,7 @@ GST_END_TEST;
|
|||
* Create test suite.
|
||||
*/
|
||||
static Suite *
|
||||
amrparse_suite ()
|
||||
amrparse_suite (void)
|
||||
{
|
||||
Suite *s = suite_create ("amrparse");
|
||||
TCase *tc_chain = tcase_create ("general");
|
||||
|
|
|
@ -114,7 +114,7 @@ push_and_test (GstCaps * prop_caps, gboolean join, gboolean replace,
|
|||
#define SRC_HEIGHT 12
|
||||
|
||||
static GstCaps *
|
||||
make_src_caps ()
|
||||
make_src_caps (void)
|
||||
{
|
||||
return gst_caps_new_simple ("video/x-raw-yuv", "width", G_TYPE_INT, SRC_WIDTH,
|
||||
"height", G_TYPE_INT, SRC_HEIGHT, NULL);
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
static GList *elements = NULL;
|
||||
|
||||
static void
|
||||
setup ()
|
||||
setup (void)
|
||||
{
|
||||
GList *features, *f;
|
||||
GList *plugins, *p;
|
||||
|
@ -88,7 +88,7 @@ setup ()
|
|||
}
|
||||
|
||||
static void
|
||||
teardown ()
|
||||
teardown (void)
|
||||
{
|
||||
GList *e;
|
||||
|
||||
|
|
|
@ -608,7 +608,7 @@ me_gst_setup_default_pipeline (gpointer data)
|
|||
}
|
||||
|
||||
static void
|
||||
me_gst_cleanup_element ()
|
||||
me_gst_cleanup_element (void)
|
||||
{
|
||||
if (gst_camera_bin) {
|
||||
GstBus *bus;
|
||||
|
@ -630,7 +630,7 @@ me_gst_cleanup_element ()
|
|||
}
|
||||
|
||||
static gboolean
|
||||
capture_mode_stop ()
|
||||
capture_mode_stop (void)
|
||||
{
|
||||
if (capture_state == CAP_STATE_VIDEO_PAUSED
|
||||
|| capture_state == CAP_STATE_VIDEO_RECORDING) {
|
||||
|
@ -641,7 +641,7 @@ capture_mode_stop ()
|
|||
}
|
||||
|
||||
static void
|
||||
capture_mode_config_gui ()
|
||||
capture_mode_config_gui (void)
|
||||
{
|
||||
switch (capture_state) {
|
||||
case CAP_STATE_IMAGE:
|
||||
|
@ -1193,7 +1193,7 @@ fill_resolution_combo (GstCaps * caps)
|
|||
}
|
||||
|
||||
static GstCaps *
|
||||
create_default_caps ()
|
||||
create_default_caps (void)
|
||||
{
|
||||
GstCaps *default_caps;
|
||||
|
||||
|
@ -1203,7 +1203,7 @@ create_default_caps ()
|
|||
}
|
||||
|
||||
static void
|
||||
init_view_finder_resolution_combobox ()
|
||||
init_view_finder_resolution_combobox (void)
|
||||
{
|
||||
GstCaps *input_caps = NULL, *default_caps = NULL, *intersect = NULL;
|
||||
|
||||
|
@ -1230,7 +1230,7 @@ init_view_finder_resolution_combobox ()
|
|||
}
|
||||
|
||||
static void
|
||||
destroy_color_controls ()
|
||||
destroy_color_controls (void)
|
||||
{
|
||||
GList *widgets, *item;
|
||||
GtkWidget *widget = NULL;
|
||||
|
@ -1250,7 +1250,7 @@ destroy_color_controls ()
|
|||
}
|
||||
|
||||
static void
|
||||
create_color_controls ()
|
||||
create_color_controls (void)
|
||||
{
|
||||
GstColorBalance *balance = NULL;
|
||||
const GList *controls, *item;
|
||||
|
@ -1487,7 +1487,7 @@ add_menuitem (GtkMenu * parent_menu, const gchar * item_name)
|
|||
}
|
||||
|
||||
GList *
|
||||
create_iso_speed_labels ()
|
||||
create_iso_speed_labels (void)
|
||||
{
|
||||
GList *labels = NULL;
|
||||
gint i;
|
||||
|
@ -1498,7 +1498,7 @@ create_iso_speed_labels ()
|
|||
}
|
||||
|
||||
GList *
|
||||
create_ev_comp_labels ()
|
||||
create_ev_comp_labels (void)
|
||||
{
|
||||
GList *labels = NULL;
|
||||
gdouble comp;
|
||||
|
@ -1568,7 +1568,7 @@ capture_image_res_toggled_cb (GtkRadioMenuItem * menuitem, gpointer user_data)
|
|||
}
|
||||
|
||||
GList *
|
||||
create_image_resolution_labels ()
|
||||
create_image_resolution_labels (void)
|
||||
{
|
||||
GList *labels = NULL;
|
||||
int i;
|
||||
|
|
|
@ -57,7 +57,7 @@ typedef struct
|
|||
} dyn_link;
|
||||
|
||||
static inline long
|
||||
myclock ()
|
||||
myclock (void)
|
||||
{
|
||||
struct timeval tv;
|
||||
|
||||
|
|
|
@ -735,7 +735,7 @@ done:
|
|||
}
|
||||
|
||||
static void
|
||||
ui_refresh ()
|
||||
ui_refresh (void)
|
||||
{
|
||||
GtkTreeStore *store =
|
||||
GTK_TREE_STORE (gtk_tree_view_get_model (GTK_TREE_VIEW (ui_tree)));
|
||||
|
@ -745,7 +745,7 @@ ui_refresh ()
|
|||
}
|
||||
|
||||
static int
|
||||
ui_create ()
|
||||
ui_create (void)
|
||||
{
|
||||
GError *error = NULL;
|
||||
int ret = 0;
|
||||
|
@ -944,7 +944,7 @@ me_gst_bus_callback_view (GstBus * bus, GstMessage * message, gpointer data)
|
|||
}
|
||||
|
||||
static void
|
||||
me_gst_cleanup_elements ()
|
||||
me_gst_cleanup_elements (void)
|
||||
{
|
||||
/* when adding an element to pipeline rember to set it to NULL or add extra ref */
|
||||
|
||||
|
@ -1291,7 +1291,8 @@ done:
|
|||
}
|
||||
|
||||
static void
|
||||
process_file() {
|
||||
process_file(void)
|
||||
{
|
||||
/* filename for future usage (title and file name to be created) */
|
||||
me_gst_cleanup_elements ();
|
||||
|
||||
|
|
Loading…
Reference in a new issue