summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorSebastian Dröge <slomo@circular-chaos.org>2008-03-03 06:04:31 +0000
committerSebastian Dröge <slomo@circular-chaos.org>2008-03-03 06:04:31 +0000
commitec7afb6f8413cba1f3b38405b261f5fb0a6eadbf (patch)
tree5d3f6eee64abd6b44b36b18f0999b5a19f7a2af1 /sys
parentf61c20f1d2c3c4589958729b61300d4d1cad5d29 (diff)
Correct all relevant warnings found by the sparse semantic code analyzer. This include marking several symbols static...
Original commit message from CVS: * ext/alsa/gstalsamixertrack.c: (gst_alsa_mixer_track_get_type): * ext/alsa/gstalsasink.c: (set_hwparams): * ext/alsa/gstalsasrc.c: (set_hwparams): * ext/gio/gstgio.c: (gst_gio_uri_handler_get_uri): * ext/ogg/gstoggmux.h: * ext/ogg/gstogmparse.c: * gst-libs/gst/audio/audio.c: * gst-libs/gst/fft/kiss_fft_f64.c: (kiss_fft_f64_alloc): * gst-libs/gst/pbutils/missing-plugins.c: (gst_missing_uri_sink_message_new), (gst_missing_element_message_new), (gst_missing_decoder_message_new), (gst_missing_encoder_message_new): * gst-libs/gst/rtp/gstbasertppayload.c: * gst-libs/gst/rtp/gstrtcpbuffer.c: (gst_rtcp_packet_bye_get_reason): * gst/audioconvert/gstaudioconvert.c: * gst/audioresample/gstaudioresample.c: * gst/ffmpegcolorspace/imgconvert.c: * gst/playback/test.c: (gen_video_element), (gen_audio_element): * gst/typefind/gsttypefindfunctions.c: * gst/videoscale/vs_4tap.c: * gst/videoscale/vs_4tap.h: * sys/v4l/gstv4lelement.c: * sys/v4l/gstv4lsrc.c: (gst_v4lsrc_get_any_caps): * sys/v4l/v4l_calls.c: * sys/v4l/v4lsrc_calls.c: (gst_v4lsrc_capture_init), (gst_v4lsrc_try_capture): * sys/ximage/ximagesink.c: (gst_ximagesink_check_xshm_calls), (gst_ximagesink_ximage_new): * sys/xvimage/xvimagesink.c: (gst_xvimagesink_check_xshm_calls), (gst_xvimagesink_xvimage_new): * tests/check/elements/audioconvert.c: * tests/check/elements/audioresample.c: (fail_unless_perfect_stream): * tests/check/elements/audiotestsrc.c: (setup_audiotestsrc): * tests/check/elements/decodebin.c: * tests/check/elements/gdpdepay.c: (setup_gdpdepay), (setup_gdpdepay_streamheader): * tests/check/elements/gdppay.c: (setup_gdppay), (GST_START_TEST), (setup_gdppay_streamheader): * tests/check/elements/gnomevfssink.c: (setup_gnomevfssink): * tests/check/elements/multifdsink.c: (setup_multifdsink): * tests/check/elements/textoverlay.c: * tests/check/elements/videorate.c: (setup_videorate): * tests/check/elements/videotestsrc.c: (setup_videotestsrc): * tests/check/elements/volume.c: (setup_volume): * tests/check/elements/vorbisdec.c: (setup_vorbisdec): * tests/check/elements/vorbistag.c: * tests/check/generic/clock-selection.c: * tests/check/generic/states.c: (setup), (teardown): * tests/check/libs/cddabasesrc.c: * tests/check/libs/video.c: * tests/check/pipelines/gio.c: * tests/check/pipelines/oggmux.c: * tests/check/pipelines/simple-launch-lines.c: (simple_launch_lines_suite): * tests/check/pipelines/streamheader.c: * tests/check/pipelines/theoraenc.c: * tests/check/pipelines/vorbisdec.c: * tests/check/pipelines/vorbisenc.c: * tests/examples/seek/scrubby.c: * tests/examples/seek/seek.c: (query_positions_elems), (query_positions_pads): * tests/icles/stress-xoverlay.c: (myclock): Correct all relevant warnings found by the sparse semantic code analyzer. This include marking several symbols static, using NULL instead of 0 for pointers and using "foo (void)" instead of "foo ()" for declarations. * win32/common/libgstrtp.def: Add gst_rtp_buffer_set_extension_data to the symbol definition file.
Diffstat (limited to 'sys')
-rw-r--r--sys/v4l/gstv4lelement.c2
-rw-r--r--sys/v4l/gstv4lsrc.c2
-rw-r--r--sys/v4l/v4l_calls.c2
-rw-r--r--sys/v4l/v4lsrc_calls.c8
-rw-r--r--sys/ximage/ximagesink.c14
-rw-r--r--sys/xvimage/xvimagesink.c14
6 files changed, 21 insertions, 21 deletions
diff --git a/sys/v4l/gstv4lelement.c b/sys/v4l/gstv4lelement.c
index c9c9621a..1f04d8f7 100644
--- a/sys/v4l/gstv4lelement.c
+++ b/sys/v4l/gstv4lelement.c
@@ -245,7 +245,7 @@ gst_v4l_property_probe_interface_init (GstPropertyProbeInterface * iface)
}
#define GST_TYPE_V4L_DEVICE_FLAGS (gst_v4l_device_get_type ())
-GType
+static GType
gst_v4l_device_get_type (void)
{
static GType v4l_device_type = 0;
diff --git a/sys/v4l/gstv4lsrc.c b/sys/v4l/gstv4lsrc.c
index 6e410e9f..802e9e6c 100644
--- a/sys/v4l/gstv4lsrc.c
+++ b/sys/v4l/gstv4lsrc.c
@@ -349,7 +349,7 @@ gst_v4lsrc_palette_to_caps (int palette)
}
static GstCaps *
-gst_v4lsrc_get_any_caps ()
+gst_v4lsrc_get_any_caps (void)
{
gint i;
GstCaps *caps = gst_caps_new_empty (), *one;
diff --git a/sys/v4l/v4l_calls.c b/sys/v4l/v4l_calls.c
index 285ac26e..4d336d4f 100644
--- a/sys/v4l/v4l_calls.c
+++ b/sys/v4l/v4l_calls.c
@@ -277,7 +277,7 @@ gst_v4l_close (GstV4lElement * v4lelement)
* return value: the number of video input channels
******************************************************/
-gint
+static gint
gst_v4l_get_num_chans (GstV4lElement * v4lelement)
{
GST_DEBUG_OBJECT (v4lelement, "getting number of channels");
diff --git a/sys/v4l/v4lsrc_calls.c b/sys/v4l/v4lsrc_calls.c
index a110c161..54bf55f8 100644
--- a/sys/v4l/v4lsrc_calls.c
+++ b/sys/v4l/v4lsrc_calls.c
@@ -49,7 +49,7 @@ GST_DEBUG_CATEGORY_EXTERN (v4l_debug);
#ifndef GST_DISABLE_GST_DEBUG
/* palette names */
-const char *v4l_palette_name[] = {
+static const char *v4l_palette_name[] = {
"", /* 0 */
"grayscale", /* VIDEO_PALETTE_GREY */
"Hi-420", /* VIDEO_PALETTE_HI420 */
@@ -197,7 +197,7 @@ gst_v4lsrc_capture_init (GstV4lSrc * v4lsrc)
v4lsrc->cond_queue_state = g_cond_new ();
/* Map the buffers */
- GST_V4LELEMENT (v4lsrc)->buffer = mmap (0, v4lsrc->mbuf.size,
+ GST_V4LELEMENT (v4lsrc)->buffer = mmap (NULL, v4lsrc->mbuf.size,
PROT_READ | PROT_WRITE, MAP_SHARED, GST_V4LELEMENT (v4lsrc)->video_fd, 0);
if (GST_V4LELEMENT (v4lsrc)->buffer == MAP_FAILED) {
GST_ELEMENT_ERROR (v4lsrc, RESOURCE, OPEN_READ_WRITE, (NULL),
@@ -461,7 +461,7 @@ gst_v4lsrc_try_capture (GstV4lSrc * v4lsrc, gint width, gint height,
return FALSE;
}
/* Map the buffers */
- buffer = mmap (0, vmbuf.size, PROT_READ | PROT_WRITE,
+ buffer = mmap (NULL, vmbuf.size, PROT_READ | PROT_WRITE,
MAP_SHARED, GST_V4LELEMENT (v4lsrc)->video_fd, 0);
if (buffer == MAP_FAILED) {
GST_ELEMENT_ERROR (v4lsrc, RESOURCE, OPEN_READ_WRITE, (NULL),
@@ -634,7 +634,7 @@ static void gst_v4lsrc_buffer_finalize (GstV4lSrcBuffer * v4lsrc_buffer);
static GstBufferClass *v4lbuffer_parent_class = NULL;
-GType
+static GType
gst_v4lsrc_buffer_get_type (void)
{
static GType _gst_v4lsrc_buffer_type;
diff --git a/sys/ximage/ximagesink.c b/sys/ximage/ximagesink.c
index d6757f88..5d9bd3f7 100644
--- a/sys/ximage/ximagesink.c
+++ b/sys/ximage/ximagesink.c
@@ -275,7 +275,7 @@ gst_ximage_buffer_class_init (gpointer g_class, gpointer class_data)
gst_ximage_buffer_finalize;
}
-GType
+static GType
gst_ximage_buffer_get_type (void)
{
static GType _gst_ximage_buffer_type;
@@ -361,18 +361,18 @@ gst_ximagesink_check_xshm_calls (GstXImageSink * ximagesink,
goto beach;
}
- SHMInfo.shmaddr = shmat (SHMInfo.shmid, 0, 0);
+ SHMInfo.shmaddr = shmat (SHMInfo.shmid, NULL, 0);
if (SHMInfo.shmaddr == ((void *) -1)) {
GST_WARNING ("Failed to shmat: %s", g_strerror (errno));
/* Clean up shm seg */
- shmctl (SHMInfo.shmid, IPC_RMID, 0);
+ shmctl (SHMInfo.shmid, IPC_RMID, NULL);
goto beach;
}
/* Delete the shared memory segment as soon as we manage to attach.
* This way, it will be deleted as soon as we detach later, and not
* leaked if we crash. */
- shmctl (SHMInfo.shmid, IPC_RMID, 0);
+ shmctl (SHMInfo.shmid, IPC_RMID, NULL);
ximage->data = SHMInfo.shmaddr;
SHMInfo.readOnly = FALSE;
@@ -476,7 +476,7 @@ gst_ximagesink_ximage_new (GstXImageSink * ximagesink, GstCaps * caps)
goto beach;
}
- ximage->SHMInfo.shmaddr = shmat (ximage->SHMInfo.shmid, 0, 0);
+ ximage->SHMInfo.shmaddr = shmat (ximage->SHMInfo.shmid, NULL, 0);
if (ximage->SHMInfo.shmaddr == ((void *) -1)) {
g_mutex_unlock (ximagesink->x_lock);
GST_ELEMENT_ERROR (ximagesink, RESOURCE, WRITE,
@@ -484,14 +484,14 @@ gst_ximagesink_ximage_new (GstXImageSink * ximagesink, GstCaps * caps)
ximage->width, ximage->height),
("Failed to shmat: %s", g_strerror (errno)));
/* Clean up the shared memory segment */
- shmctl (ximage->SHMInfo.shmid, IPC_RMID, 0);
+ shmctl (ximage->SHMInfo.shmid, IPC_RMID, NULL);
goto beach;
}
/* Now that we've attached, we can delete the shared memory segment.
* This way, it will be deleted as soon as we detach later, and not
* leaked if we crash. */
- shmctl (ximage->SHMInfo.shmid, IPC_RMID, 0);
+ shmctl (ximage->SHMInfo.shmid, IPC_RMID, NULL);
ximage->ximage->data = ximage->SHMInfo.shmaddr;
ximage->SHMInfo.readOnly = FALSE;
diff --git a/sys/xvimage/xvimagesink.c b/sys/xvimage/xvimagesink.c
index c9b63b57..92ac60df 100644
--- a/sys/xvimage/xvimagesink.c
+++ b/sys/xvimage/xvimagesink.c
@@ -369,7 +369,7 @@ gst_xvimage_buffer_class_init (gpointer g_class, gpointer class_data)
gst_xvimage_buffer_finalize;
}
-GType
+static GType
gst_xvimage_buffer_get_type (void)
{
static GType _gst_xvimage_buffer_type;
@@ -453,18 +453,18 @@ gst_xvimagesink_check_xshm_calls (GstXContext * xcontext)
goto beach;
}
- SHMInfo.shmaddr = shmat (SHMInfo.shmid, 0, 0);
+ SHMInfo.shmaddr = shmat (SHMInfo.shmid, NULL, 0);
if (SHMInfo.shmaddr == ((void *) -1)) {
GST_WARNING ("Failed to shmat: %s", g_strerror (errno));
/* Clean up the shared memory segment */
- shmctl (SHMInfo.shmid, IPC_RMID, 0);
+ shmctl (SHMInfo.shmid, IPC_RMID, NULL);
goto beach;
}
/* Delete the shared memory segment as soon as we manage to attach.
* This way, it will be deleted as soon as we detach later, and not
* leaked if we crash. */
- shmctl (SHMInfo.shmid, IPC_RMID, 0);
+ shmctl (SHMInfo.shmid, IPC_RMID, NULL);
xvimage->data = SHMInfo.shmaddr;
SHMInfo.readOnly = FALSE;
@@ -623,7 +623,7 @@ gst_xvimagesink_xvimage_new (GstXvImageSink * xvimagesink, GstCaps * caps)
goto beach_unlocked;
}
- xvimage->SHMInfo.shmaddr = shmat (xvimage->SHMInfo.shmid, 0, 0);
+ xvimage->SHMInfo.shmaddr = shmat (xvimage->SHMInfo.shmid, NULL, 0);
if (xvimage->SHMInfo.shmaddr == ((void *) -1)) {
g_mutex_unlock (xvimagesink->x_lock);
GST_ELEMENT_ERROR (xvimagesink, RESOURCE, WRITE,
@@ -631,14 +631,14 @@ gst_xvimagesink_xvimage_new (GstXvImageSink * xvimagesink, GstCaps * caps)
xvimage->width, xvimage->height),
("Failed to shmat: %s", g_strerror (errno)));
/* Clean up the shared memory segment */
- shmctl (xvimage->SHMInfo.shmid, IPC_RMID, 0);
+ shmctl (xvimage->SHMInfo.shmid, IPC_RMID, NULL);
goto beach_unlocked;
}
/* Delete the shared memory segment as soon as we manage to attach.
* This way, it will be deleted as soon as we detach later, and not
* leaked if we crash. */
- shmctl (xvimage->SHMInfo.shmid, IPC_RMID, 0);
+ shmctl (xvimage->SHMInfo.shmid, IPC_RMID, NULL);
xvimage->xvimage->data = xvimage->SHMInfo.shmaddr;
xvimage->SHMInfo.readOnly = FALSE;