From patchwork Mon May 21 11:45:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Carlos Santos X-Patchwork-Id: 917568 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.136; helo=silver.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=datacom.ind.br Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40qH610FxGz9s1w for ; Mon, 21 May 2018 21:45:44 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 08518221BA; Mon, 21 May 2018 11:45:43 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id HAwPqTcyxbCu; Mon, 21 May 2018 11:45:42 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 0386C221CC; Mon, 21 May 2018 11:45:42 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id A77BB1C0624 for ; Mon, 21 May 2018 11:45:40 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id A458585E6A for ; Mon, 21 May 2018 11:45:40 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2Mjf0SjpRKI9 for ; Mon, 21 May 2018 11:45:38 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail.datacom.com.br (mx.datacom.ind.br [177.66.5.10]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 70CD085E53 for ; Mon, 21 May 2018 11:45:38 +0000 (UTC) Received: from mail.datacom.com.br (localhost [127.0.0.1]) by mail.datacom.com.br (Postfix) with ESMTPS id A6C041BA0533; Mon, 21 May 2018 08:45:44 -0300 (-03) Received: from localhost (localhost [127.0.0.1]) by mail.datacom.com.br (Postfix) with ESMTP id 93AB61BA0236; Mon, 21 May 2018 08:45:44 -0300 (-03) Received: from mail.datacom.com.br ([127.0.0.1]) by localhost (mail.datacom.com.br [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 4r63zTN56mxd; Mon, 21 May 2018 08:45:44 -0300 (-03) Received: from pedeld202344.datacom.net (pedeld202344.datacom.net [10.0.120.87]) by mail.datacom.com.br (Postfix) with ESMTPSA id 69B361BA0215; Mon, 21 May 2018 08:45:44 -0300 (-03) From: Carlos Santos To: buildroot@buildroot.org Date: Mon, 21 May 2018 08:45:29 -0300 Message-Id: <20180521114529.3513-1-casantos@datacom.ind.br> X-Mailer: git-send-email 2.14.3 In-Reply-To: References: MIME-Version: 1.0 Subject: [Buildroot] [PATCH] modem-manager: remove -Werror from CFLAGS X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.24 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Petazzoni , Aleksander Morgado Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" We are aproaching the 2018.05 release and modem-manager is still broken due to warnings like this: mm-base-manager.c: In function 'handle_set_logging': mm-base-manager.c:680:15: warning: assignment from incompatible pointer type [-Wincompatible-pointer-types] ctx->self = g_object_ref (manager); ^ There is a macro defined in build/libglib2-2.56.1/gobject/gobject.h which leads to the assignment errors: 511 /* Make reference APIs type safe with macros */ 512 #define g_object_ref(Obj) ((__typeof__(Obj)) (g_object_ref) (Obj)) The problem can be easily reproduced with this sample code: $ cat test.c extern void *g_object_ref(void *); #define g_object_ref(Obj) ((__typeof__(Obj)) (g_object_ref) (Obj)) extern double *new_double(int *); double *new_double(int *ip) { double *dp; dp = g_object_ref(ip); return dp; } $ gcc -Wall -Werror -c /tmp/test.c -o /tmp/test.o /tmp/test.c: In function ‘new_context’: /tmp/test.c:19:13: error: assignment from incompatible pointer type [-Werror=incompatible-pointer-types] ctx->self = g_object_ref(om); ^ cc1: all warnings being treated as errors Fixing the code would require either changing the 120 ofending calls to g_object_ref or a refactoring to make all types assignment compatible. Let's take a simpler approach, disabling -Werror, and wait for the next release of ModemManager. Signed-off-by: Carlos Santos --- package/modem-manager/modem-manager.mk | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/package/modem-manager/modem-manager.mk b/package/modem-manager/modem-manager.mk index 100c4a2941..ba4711b6c2 100644 --- a/package/modem-manager/modem-manager.mk +++ b/package/modem-manager/modem-manager.mk @@ -19,6 +19,12 @@ else MODEM_MANAGER_CONF_OPTS += --without-qmi endif +define MODEM_MANAGER_REMOVE_WERROR + $(SED) 's: -Werror::' $(@D)/configure +endef + +MODEM_MANAGER_POST_PATCH_HOOKS += MODEM_MANAGER_REMOVE_WERROR + ifeq ($(BR2_PACKAGE_MODEM_MANAGER_LIBMBIM),y) MODEM_MANAGER_DEPENDENCIES += libmbim MODEM_MANAGER_CONF_OPTS += --with-mbim