[aravis] misc: fix several compilation warnings



commit 323fa763aa31cc99474683f32c8654136bc3c4b0
Author: Emmanuel Pacaud <emmanuel gnome org>
Date:   Fri Aug 15 17:36:01 2014 +0200

    misc: fix several compilation warnings
    
    For some reason, unused variable, undeclared functions and printf
    format mismatch warnings are not shown for gstreamer plugins and
    tests.

 gst/gstaravis.c          |    2 --
 tests/arvcameratest.c    |    1 -
 tests/arvexample.c       |    2 --
 tests/arvheartbeattest.c |    6 +++---
 tests/buffer.c           |    1 -
 tests/evaluator.c        |    2 --
 tests/fake.c             |    1 -
 tests/genicam.c          |    3 ---
 tests/misc.c             |    1 -
 tests/timetest.c         |    6 +++---
 10 files changed, 6 insertions(+), 19 deletions(-)
---
diff --git a/gst/gstaravis.c b/gst/gstaravis.c
index 7a33b0e..3624588 100644
--- a/gst/gstaravis.c
+++ b/gst/gstaravis.c
@@ -430,8 +430,6 @@ gst_aravis_fixate_caps (GstBaseSrc * bsrc, GstCaps * caps)
 static void
 gst_aravis_init (GstAravis *gst_aravis)
 {
-       GstPad *pad = GST_BASE_SRC_PAD (gst_aravis);
-
        gst_base_src_set_live (GST_BASE_SRC (gst_aravis), TRUE);
        gst_base_src_set_format (GST_BASE_SRC (gst_aravis), GST_FORMAT_TIME);
 
diff --git a/tests/arvcameratest.c b/tests/arvcameratest.c
index 73a2bf5..4582afe 100644
--- a/tests/arvcameratest.c
+++ b/tests/arvcameratest.c
@@ -156,7 +156,6 @@ main (int argc, char **argv)
        ApplicationData data;
        ArvCamera *camera;
        ArvStream *stream;
-       ArvBuffer *buffer;
        GOptionContext *context;
        GError *error = NULL;
        int i;
diff --git a/tests/arvexample.c b/tests/arvexample.c
index 0ac9af2..20b865f 100644
--- a/tests/arvexample.c
+++ b/tests/arvexample.c
@@ -61,7 +61,6 @@ main (int argc, char **argv)
        ApplicationData data;
        ArvCamera *camera;
        ArvStream *stream;
-       ArvBuffer *buffer;
        int i;
 
        data.buffer_count = 0;
@@ -75,7 +74,6 @@ main (int argc, char **argv)
        if (camera != NULL) {
                void (*old_sigint_handler)(int);
                gint payload;
-               guint software_trigger_source = 0;
 
                /* Set region of interrest to a 200x200 pixel area */
                arv_camera_set_region (camera, 0, 0, 200, 200);
diff --git a/tests/arvheartbeattest.c b/tests/arvheartbeattest.c
index b29a0e1..34b3341 100644
--- a/tests/arvheartbeattest.c
+++ b/tests/arvheartbeattest.c
@@ -138,9 +138,9 @@ int main(int argc, char *argv[])
 
            arv_stream_get_statistics (stream, &n_completed_buffers, &n_failures, &n_underruns);
 
-           g_printf ("\nCompleted buffers = %Lu\n", (unsigned long long) n_completed_buffers);
-           g_printf ("Failures          = %Lu\n", (unsigned long long) n_failures);
-           g_printf ("Underruns         = %Lu\n", (unsigned long long) n_underruns);
+           printf ("\nCompleted buffers = %Lu\n", (unsigned long long) n_completed_buffers);
+           printf ("Failures          = %Lu\n", (unsigned long long) n_failures);
+           printf ("Underruns         = %Lu\n", (unsigned long long) n_underruns);
 
            arv_camera_stop_acquisition (camera);
     }
diff --git a/tests/buffer.c b/tests/buffer.c
index 40c7cf0..3badf32 100644
--- a/tests/buffer.c
+++ b/tests/buffer.c
@@ -71,7 +71,6 @@ int
 main (int argc, char *argv[])
 {
        int result;
-       int i;
 
        g_test_init (&argc, &argv, NULL);
 
diff --git a/tests/evaluator.c b/tests/evaluator.c
index ee3d2e7..14c6a53 100644
--- a/tests/evaluator.c
+++ b/tests/evaluator.c
@@ -115,7 +115,6 @@ static void
 set_double_variable_test (void)
 {
        ArvEvaluator *evaluator;
-       const char *expression;
        double v_double;
 
        evaluator = arv_evaluator_new ("V_DBLA+V_DBLB");
@@ -133,7 +132,6 @@ static void
 set_int64_variable_test (void)
 {
        ArvEvaluator *evaluator;
-       const char *expression;
        gint64 v_int64;
 
        evaluator = arv_evaluator_new ("A_1");
diff --git a/tests/fake.c b/tests/fake.c
index 5a68bf0..2d22141 100644
--- a/tests/fake.c
+++ b/tests/fake.c
@@ -180,7 +180,6 @@ int
 main (int argc, char *argv[])
 {
        int result;
-       int i;
 
        g_test_init (&argc, &argv, NULL);
 
diff --git a/tests/genicam.c b/tests/genicam.c
index ad6376a..7522fb1 100644
--- a/tests/genicam.c
+++ b/tests/genicam.c
@@ -348,7 +348,6 @@ static void
 url_test (void)
 {
        char **tokens;
-       unsigned int i;
 
        tokens = g_regex_split (arv_gv_device_get_url_regex (), 
"Local:Basler_Ace_GigE_e7c9b87e_Version_3_3.zip;c0000000;10cca", 0);
 
@@ -382,7 +381,6 @@ mandatory_test (void)
        ArvDevice *device;
        ArvGc *genicam;
        ArvGcNode *node;
-       gint64 value;
 
        device = arv_fake_device_new ("TEST0");
        g_assert (ARV_IS_FAKE_DEVICE (device));
@@ -400,7 +398,6 @@ int
 main (int argc, char *argv[])
 {
        int result;
-       int i;
 
        g_test_init (&argc, &argv, NULL);
 
diff --git a/tests/misc.c b/tests/misc.c
index b95262b..fabe15f 100644
--- a/tests/misc.c
+++ b/tests/misc.c
@@ -85,7 +85,6 @@ int
 main (int argc, char *argv[])
 {
        int result;
-       int i;
 
        g_test_init (&argc, &argv, NULL);
 
diff --git a/tests/timetest.c b/tests/timetest.c
index c3f90c8..1b1c35d 100644
--- a/tests/timetest.c
+++ b/tests/timetest.c
@@ -46,7 +46,7 @@ sleep_meas (gint64 usec) {
 int
 main (int argc, char **argv)
 {
-       gint64 i, j, pTt;
+       gint64 i, j;
        double val, wt, min, max, swt;
 
        for( i = 1; i < MAX_TIME_US; i = i*2 ) {
@@ -59,7 +59,7 @@ main (int argc, char **argv)
                        if (val > max) max = val;
                }
                wt /= j;
-               printf ("SleepMeas: %6d - Mean %7g Max %5g Min %5g rms %g\n",
+               printf ("SleepMeas: %6" G_GINT64_FORMAT " - Mean %7g Max %5g Min %5g rms %g\n",
                        i, wt, max, min, sqrt(swt/j - wt*wt));
        } 
 
@@ -73,7 +73,7 @@ main (int argc, char **argv)
                        if( val > max ) max = val;
                }
                wt /= j;
-               printf ("TimeWait:  %6d - Mean %7g Max %5g Min %5g rms %g\n",
+               printf ("TimeWait:  %6" G_GINT64_FORMAT " - Mean %7g Max %5g Min %5g rms %g\n",
                        i, wt, max, min, sqrt(swt/j - wt*wt));
        }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]