Hi Dave

Am 22.01.2016 um 17:40 schrieb David Malcolm:
> (I'm the upstream gcc author of -Wmisleading-indentation)
> 
> This issue has been fixed upstream in:
> http://cgit.freedesktop.org/ModemManager/ModemManager/commit/?id=99ae6777893d0b149cbefac3f290c63c47e29f42
> 
> The code in question is here:
> https://sources.debian.net/src/modemmanager/1.4.12-1/libqcdm/tests/test-qcdm.c/#L46
>  
> https://sources.debian.net/src/modemmanager/1.4.12-1/libqcdm/tests/test-qcdm.c/#L52

There are more GCC 6 related build failures, even after fixing this one:


test-wmc.c: In function 'test_data_new':
test-wmc.c:45:2: error: statement is indented as if it were guarded
by... [-Werror=misleading-indentation]
  return d;
  ^~~~~~

test-wmc.c:42:5: note: ...this 'if' clause, but it is not
     if (port)
     ^~

test-wmc.c: In function 'test_data_free':
test-wmc.c:54:2: error: statement is indented as if it were guarded
by... [-Werror=misleading-indentation]
  g_free (d);
  ^~~~~~

test-wmc.c:51:5: note: ...this 'if' clause, but it is not
     if (d->com_data)
     ^~

cc1: all warnings being treated as errors
Makefile:554: recipe for target 'test_wmc-test-wmc.o' failed
make[3]: *** [test_wmc-test-wmc.o] Error 1
make[3]: Target 'all' not remade because of errors.
make[3]: Leaving directory '/tmp/modemmanager-1.4.12/libwmc/tests'


=> patch for that is attached. Dan, would be great if you can review and
apply.

==================================================================

cinterion/mm-broadband-modem-cinterion.c:86:30: error: 'bands_2g'
defined but not used [-Werror=unused-const-variable]
 static const CinterionBand2G bands_2g[] = {
                              ^~~~~~~~

cc1: all warnings being treated as errors
Makefile:2205: recipe for target
'cinterion/libmm_plugin_cinterion_la-mm-broadband-modem-cinterion.lo' failed
make[2]: ***
[cinterion/libmm_plugin_cinterion_la-mm-broadband-modem-cinterion.lo]
Error 1

==================================================================


novatel/mm-plugin-novatel.c:50:35: error: 'custom_at_probe' defined but
not used [-Werror=unused-const-variable]
 static const MMPortProbeAtCommand custom_at_probe[] = {
                                   ^~~~~~~~~~~~~~~

cc1: all warnings being treated as errors
Makefile:2478: recipe for target
'novatel/libmm_plugin_novatel_la-mm-plugin-novatel.lo' failed


==================================================================

test-wmc-utils.c:114:19: error: 'uml290_encap_outbuf' defined but not
used [-Werror=unused-const-variable]
static const char uml290_encap_outbuf[] = {
^~~~~~~~~~~~~~~~~~~

cc1: all warnings being treated as errors
Makefile:526: recipe for target 'test_wmc-test-wmc-utils.o' failed
make[4]: *** [test_wmc-test-wmc-utils.o] Error 1
make[4]: Leaving directory '/tmp/modemmanager-1.4.12/libwmc/tests'

Some of those might be real issues.
E.g. it's not clear to me, why the encapsulated uml290_encap_src is
compared against encap_outbuf and *not* uml290_encap_outbuf.

Dan, could you have a look?

Cheers,
Michael
-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?
From 5cd21a0ca4bbdf189494fd4507f16cc6ce9476d9 Mon Sep 17 00:00:00 2001
From: Michael Biebl <bi...@debian.org>
Date: Fri, 22 Jan 2016 23:40:10 +0100
Subject: [PATCH] tests: white space / indentation fixes

---
 libwmc/tests/test-wmc-com.c | 10 +++++-----
 libwmc/tests/test-wmc.c     | 16 ++++++++--------
 2 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/libwmc/tests/test-wmc-com.c b/libwmc/tests/test-wmc-com.c
index 8b4b01d..4ffc338 100644
--- a/libwmc/tests/test-wmc-com.c
+++ b/libwmc/tests/test-wmc-com.c
@@ -43,13 +43,13 @@ typedef struct {
 gpointer
 test_com_setup (const char *port, wmcbool uml290, wmcbool debug)
 {
-	TestComData *d;
-	int ret;
+    TestComData *d;
+    int ret;
 
-	d = g_malloc0 (sizeof (TestComData));
-	g_assert (d);
+    d = g_malloc0 (sizeof (TestComData));
+    g_assert (d);
     d->uml290 = uml290;
-	d->debug = debug;
+    d->debug = debug;
 
     if (getenv ("SERIAL_DEBUG"))
         d->debug = TRUE;
diff --git a/libwmc/tests/test-wmc.c b/libwmc/tests/test-wmc.c
index e1027b2..1fc13ab 100644
--- a/libwmc/tests/test-wmc.c
+++ b/libwmc/tests/test-wmc.c
@@ -34,15 +34,15 @@ typedef GTestFixtureFunc TCFunc;
 static TestData *
 test_data_new (const char *port, gboolean uml290, gboolean debug)
 {
-	TestData *d;
+    TestData *d;
 
-	d = g_malloc0 (sizeof (TestData));
-	g_assert (d);
+    d = g_malloc0 (sizeof (TestData));
+    g_assert (d);
 
     if (port)
         d->com_data = test_com_setup (port, uml290, debug);
 
-	return d;
+    return d;
 }
 
 static void
@@ -51,7 +51,7 @@ test_data_free (TestData *d)
     if (d->com_data)
         test_com_teardown (d->com_data);
 
-	g_free (d);
+    g_free (d);
 }
 
 int main (int argc, char **argv)
@@ -102,9 +102,9 @@ int main (int argc, char **argv)
         g_test_suite_add (suite, TESTCASE (test_com_get_global_mode, data->com_data));
     }
 
-	result = g_test_run ();
+    result = g_test_run ();
 
-	test_data_free (data);
+    test_data_free (data);
 
-	return result;
+    return result;
 }
-- 
2.7.0

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to