Commit f87a1c12 authored by Matthias Clasen's avatar Matthias Clasen
Browse files

Merge branch 'wip/fix-compiler-warnings' into 'master'

Fix compiler warnings

See merge request !6
parents 5c11ffcd 661de50e
......@@ -18,5 +18,5 @@
bin_PROGRAMS += gnome-desktop-testing-runner
gnome_desktop_testing_runner_SOURCES = src/gnome-desktop-testing-runner.c
gnome_desktop_testing_runner_CPPFLAGS = $(AM_CPPFLAGS)
gnome_desktop_testing_runner_CFLAGS = $(BUILDDEP_GDT_CFLAGS) $(SYSTEMD_CFLAGS)
gnome_desktop_testing_runner_CFLAGS = $(AM_CFLAGS) $(BUILDDEP_GDT_CFLAGS) $(SYSTEMD_CFLAGS)
gnome_desktop_testing_runner_LDADD = $(BUILDDEP_GDT_LIBS) $(SYSTEMD_LIBS)
......@@ -18,6 +18,7 @@ if test "x$GCC" = "xyes"; then
-Werror=pointer-arith -Werror=init-self -Werror=format=2 \
-Werror=format-security \
-Werror=missing-include-dirs -Werror=aggregate-return \
-Werror=switch-default -Wswitch-enum -Wsign-compare \
-Werror=declaration-after-statement"
fi
changequote([,])dnl
......@@ -27,10 +28,10 @@ AC_SUBST(WARN_CFLAGS)
LT_PREREQ([2.2.4])
LT_INIT([disable-static])
PKG_CHECK_MODULES(BUILDDEP_GDT, [gio-unix-2.0 >= 2.34.0])
PKG_CHECK_MODULES(BUILDDEP_GDT, [gio-unix-2.0 >= 2.50])
PKG_CHECK_MODULES([SYSTEMD], [libsystemd], [have_systemd=yes], [have_systemd=no])
AS_IF([test "x$have_systemd" = xyes], [AC_DEFINE([HAVE_SYSTEMD], [1], [Define if you have libsystemd])])
GIO_UNIX_CFLAGS="$GIO_UNIX_CFLAGS -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_36 -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_36"
BUILDDEP_GDT_CFLAGS="$BUILDDEP_GDT_CFLAGS -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_50 -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_50"
AC_CONFIG_FILES([
Makefile
......
......@@ -235,8 +235,8 @@ typedef struct {
GPtrArray *tests;
GPtrArray *failed_test_msgs;
int parallel;
int test_index;
unsigned int parallel;
unsigned int test_index;
gboolean running_exclusive_test;
} TestRunnerApp;
......@@ -589,6 +589,7 @@ run_test_async (GdtrTest *test,
g_autoptr(GSubprocessLauncher) proc_context = NULL;
g_autoptr(GSubprocess) proc = NULL;
GTask *task;
GSubprocessFlags flags = G_SUBPROCESS_FLAGS_NONE;
g_assert (test->state == TEST_STATE_LOADED);
......@@ -647,7 +648,6 @@ run_test_async (GdtrTest *test,
goto out;
}
GSubprocessFlags flags = G_SUBPROCESS_FLAGS_NONE;
if (opt_report_directory || opt_log_directory)
flags |= G_SUBPROCESS_FLAGS_STDERR_MERGE;
proc_context = g_subprocess_launcher_new (flags);
......@@ -830,7 +830,7 @@ timeval_to_ms (const struct timeval *tv)
tv->tv_usec == -1L)
return -1;
if (tv->tv_sec > (G_MAXUINT64 - tv->tv_usec) / G_USEC_PER_SEC)
if (tv->tv_sec > (G_MAXINT64 - tv->tv_usec) / G_USEC_PER_SEC)
return -1;
return ((gint64) tv->tv_sec) * G_USEC_PER_SEC + tv->tv_usec;
......@@ -850,7 +850,7 @@ main (int argc, char **argv)
GError *local_error = NULL;
GError **error = &local_error;
guint total_tests = 0;
int i, j;
unsigned int i, j;
GOptionContext *context;
TestRunnerApp appstruct;
const char *const *datadirs_iter;
......@@ -926,7 +926,7 @@ main (int argc, char **argv)
{
gboolean matches = FALSE;
GdtrTest *test = app->tests->pdata[j];
for (i = 1; i < argc; i++)
for (i = 1; i < (unsigned int) argc; i++)
{
const char *prefix = argv[i];
if (g_str_has_prefix (test->name, prefix))
......@@ -1025,6 +1025,9 @@ main (int argc, char **argv)
case TEST_STATE_COMPLETE_FAILED:
n_failed++;
break;
case TEST_STATE_UNLOADED:
case TEST_STATE_LOADED:
case TEST_STATE_EXECUTING:
default:
break;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment