summaryrefslogtreecommitdiff
path: root/tests/libtracker-common
diff options
context:
space:
mode:
authorMartyn Russell <martyn@lanedo.com>2011-12-14 17:11:51 +0000
committerMartyn Russell <martyn@lanedo.com>2011-12-14 17:11:51 +0000
commit61be57c58689501172e1c136bd910128aed3241c (patch)
tree1b6b0962f971ca1f4b9d6a2c69805921ecc26d01 /tests/libtracker-common
parent4ba59dc341a9f6f34fab01cd2b65665237e16a37 (diff)
downloadtracker-61be57c58689501172e1c136bd910128aed3241c.tar.gz
build: Fixed various compiler warnings across the entire code base
Diffstat (limited to 'tests/libtracker-common')
-rw-r--r--tests/libtracker-common/tracker-albumart-test.c24
-rw-r--r--tests/libtracker-common/tracker-sched-test.c8
-rw-r--r--tests/libtracker-common/tracker-utils-test.c9
3 files changed, 20 insertions, 21 deletions
diff --git a/tests/libtracker-common/tracker-albumart-test.c b/tests/libtracker-common/tracker-albumart-test.c
index 988f7d42e..7cde4d4c0 100644
--- a/tests/libtracker-common/tracker-albumart-test.c
+++ b/tests/libtracker-common/tracker-albumart-test.c
@@ -46,10 +46,10 @@ struct {
{ NULL, NULL}
};
-void
-test_albumart_stripping ()
+static void
+test_albumart_stripping (void)
{
- gint i;
+ gint i;
gchar *result;
for (i = 0; strip_test_cases[i].input != NULL; i++) {
@@ -61,8 +61,8 @@ test_albumart_stripping ()
g_print ("(%d test cases) ", i);
}
-void
-test_albumart_stripping_null ()
+static void
+test_albumart_stripping_null (void)
{
// FIXME: Decide what is the expected behaviour here...
// a. Return NULL
@@ -93,12 +93,12 @@ struct {
{ NULL, NULL, NULL }
};
-void
-test_albumart_location ()
+static void
+test_albumart_location (void)
{
gchar *path = NULL, *local_uri = NULL;
gchar *expected;
- gint i;
+ gint i;
for (i = 0; albumart_test_cases[i].filename != NULL; i++) {
tracker_media_art_get_path (albumart_test_cases[i].artist,
@@ -123,8 +123,8 @@ test_albumart_location ()
}
-void
-test_albumart_location_null ()
+static void
+test_albumart_location_null (void)
{
gchar *path = NULL, *local_uri = NULL;
@@ -133,8 +133,8 @@ test_albumart_location_null ()
g_assert (!path && !local_uri);
}
-void
-test_albumart_location_path ()
+static void
+test_albumart_location_path (void)
{
gchar *path = NULL, *local_uri = NULL;
gchar *expected;
diff --git a/tests/libtracker-common/tracker-sched-test.c b/tests/libtracker-common/tracker-sched-test.c
index 7dba86235..3d51e6124 100644
--- a/tests/libtracker-common/tracker-sched-test.c
+++ b/tests/libtracker-common/tracker-sched-test.c
@@ -31,8 +31,8 @@
#include <errno.h>
-gboolean
-scheduler_is (gint scheduler)
+static gboolean
+scheduler_is (gint scheduler)
{
#ifdef __linux__
return (sched_getscheduler (0) == scheduler);
@@ -41,8 +41,8 @@ scheduler_is (gint scheduler)
#endif
}
-void
-test_sched_set_and_get ()
+static void
+test_sched_set_and_get (void)
{
g_assert (scheduler_is (SCHED_OTHER));
g_assert (tracker_sched_idle ());
diff --git a/tests/libtracker-common/tracker-utils-test.c b/tests/libtracker-common/tracker-utils-test.c
index 05f0428e7..43e59fa0e 100644
--- a/tests/libtracker-common/tracker-utils-test.c
+++ b/tests/libtracker-common/tracker-utils-test.c
@@ -97,7 +97,7 @@ test_is_blank_string ()
}
static void
-test_seconds_estimate ()
+test_seconds_estimate (void)
{
g_assert_cmpint (tracker_seconds_estimate (10, 10, 20), ==, 20);
g_assert_cmpint (tracker_seconds_estimate (10, 9, 20), ==, 22);
@@ -107,15 +107,14 @@ test_seconds_estimate ()
g_assert_cmpint (tracker_seconds_estimate (1, 0, 2), ==, 0);
g_assert_cmpint (tracker_seconds_estimate (1, -1, 2), ==, 0);
g_assert_cmpint (tracker_seconds_estimate (1, 1, 0), ==, 0);
-// g_assert_cmpint (tracker_seconds_estimate (1, 1, -1), ==, 0);
}
-void
-test_strhex ()
+static void
+test_strhex (void)
{
gchar *result;
- result = tracker_strhex ((const guint8 *)"a", 1, "|");
+ result = tracker_strhex ((const guint8 *)"a", 1, '|');
g_assert_cmpstr (result, ==, "61");
g_free (result);