Linux bluetooth development
 help / color / mirror / Atom feed
* usage of g_test_fail() which is introduced in Glib 2.30
@ 2013-01-07 20:35 Syam Sidhardhan
  2013-01-08  3:26 ` Marcel Holtmann
  0 siblings, 1 reply; 2+ messages in thread
From: Syam Sidhardhan @ 2013-01-07 20:35 UTC (permalink / raw)
  To: linux-bluetooth

Hi Marcel,

In the latest Bluez snapshot I'm getting the g_test_fail compilation
error. The problem
happens because we use the Glib minimum version requirement
as 2.28 and this API is introduced in GLib version 2.30.
Do we need to use the g_test_fail() now with Glib 2.28?
I guess we cannot replace it with a wrapper function.


Possible Patch:

From: Syam Sidhardhan <s.syam@samsung.com>
Date: Mon, 7 Jan 2013 17:22:00 -0300
Subject: [PATCH 1/1] unit: Remove g_test_fail()
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

g_test_fail() is introduced in Glib v2.30 and we are using
Glib v2.28 as the minimum requirement for the build.
This patch resolves the compilation error that happen with
Glib version < 2.30.

Error log:
  CC     unit/test-mgmt.o
unit/test-mgmt.c: In function ‘check_actions’:
unit/test-mgmt.c:100:2: error: implicit declaration of
    function ‘g_test_fail’ [-Werror=implicit-function-declaration]
cc1: all warnings being treated as errors
make[1]: *** [unit/test-mgmt.o] Error 1
make: *** [all] Error 2
---
 unit/test-mgmt.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/unit/test-mgmt.c b/unit/test-mgmt.c
index 2d1a5d6..6b3689c 100644
--- a/unit/test-mgmt.c
+++ b/unit/test-mgmt.c
@@ -97,7 +97,6 @@ static void check_actions(struct context *context,
 	}

 	g_test_message("Command not handled\n");
-	g_test_fail();
 }

 static gboolean server_handler(GIOChannel *channel, GIOCondition cond,
-- 
1.7.0.4

Regards,
Syam.

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-01-08  3:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-07 20:35 usage of g_test_fail() which is introduced in Glib 2.30 Syam Sidhardhan
2013-01-08  3:26 ` Marcel Holtmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox