Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4864344yba; Tue, 30 Apr 2019 05:43:45 -0700 (PDT) X-Google-Smtp-Source: APXvYqxvas39Tz37fhSX7+rZSJvx7cZzFKZOePgXaxNSKUxFQwR5qXMDZ8+BlR6GdYN+2kcsZze3 X-Received: by 2002:a63:d408:: with SMTP id a8mr33396497pgh.184.1556628225485; Tue, 30 Apr 2019 05:43:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556628225; cv=none; d=google.com; s=arc-20160816; b=Af84AgfRivRE8r6JPGedkrJfqPi5do7ddDgF5f/NEIcrashjcvV9qnydRovVerGPRg 3OneA7fc68kZoCPkUCkvHGksoYjzSkxSF7Un5VPFEv+vmi8xsOJGlFxaVygEz9ujeqXZ mpLqpuBYzUE2uCZvH3DL86yaXcl0MYRDfPUj0LPECttIqQXa/wTs0f2lnc9z0FdtdJ/g YZX2MDyQ3uOVyk/fea5kd4EvT6wI++6zbUj9DEZn4gcB9G9yF4fsTjd7yPUDk7eb6GxQ BLjHl9lIGnYpLHKXXuRClsNAjtv6whJseztfAfPnstRkzjCCRf5NaqeoHNC2bQphY3qN M/dw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=StKv2mM8EhI4p50Xov2TxAjIxZQLhaX2UxwxXon7EJs=; b=QCTUuGSfKjLhA3Jeh6ZJu+X/CV+rcJ1rI3eraYiDGPlrc7Szcc2oH+Xg2n0fKenXGH KB0xlN3a3ZvbgVZzoSasY4lPmZutC1h4aXBp5b1WNYqF1zs2aDHS6gWqLhIrNc8DCsh5 iy5H8srzWZCdq91giTRdrUETw8Zf0iYw6qh8w2RFMVGiimVW38vLjpV558JVzX7xFry8 MR+NM1r7bbxyMimWPgi1IubP2NYs+Y6RjxK9nZ6gFy6s5KZApTlVOCjulCUpfXh6csUJ HDChZ2k16IDKWxXxz1uEKJ76r/WkRTLR48uhJTFDyFpy5E90vEneu2cBQriHJPx4BjiP LQLw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=SQ0lLk5a; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j10si37023168plb.346.2019.04.30.05.43.30; Tue, 30 Apr 2019 05:43:45 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=SQ0lLk5a; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727861AbfD3MmF (ORCPT + 99 others); Tue, 30 Apr 2019 08:42:05 -0400 Received: from mail-ot1-f67.google.com ([209.85.210.67]:46423 "EHLO mail-ot1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726166AbfD3MmE (ORCPT ); Tue, 30 Apr 2019 08:42:04 -0400 Received: by mail-ot1-f67.google.com with SMTP id 77so5564148otu.13 for ; Tue, 30 Apr 2019 05:42:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=StKv2mM8EhI4p50Xov2TxAjIxZQLhaX2UxwxXon7EJs=; b=SQ0lLk5ahnXyH+n8ue1qt9LLCvrsEI7t06XOX4wrR8M8FYVdOv/WA6nuQ+rjOFG928 bMnQabTspw7uZuZbAlwIVrEBvmblztwAw6gG7xcLbo5YzQP9WzUqU8FXrUQ6e8FKOayQ 0k2utr+l7937nvpfHtYQI06a7uyzPUEwK85C9Gf6WauWXwSgfkaGxQ5zOvXX8zaqEaHP l4uS20BWASqfZ+IuJi9CHbNchTZThgVRDyXR9Vz6NjxZmmj1oIqCNerG5kpr0yVEG6dV jU5qvhuksrp1iIbLd39cakQkm0Z+fzoBDFk1JLhbJSGDfKmaWytUxFX8P0Ix6SadRbfB o3Eg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=StKv2mM8EhI4p50Xov2TxAjIxZQLhaX2UxwxXon7EJs=; b=ssQ7mSuNDpxlEsTw4pIA+pGFpLoVKj2TuHZwSUKAutddEVB75SgWnBVHZSe/oTt/iP nk0jPpHI0zLJOpANYlMcogBNR7TLivBHCjc3eqwIPKFEE+RS3bvImAYElsoaIOBzXWr5 C3p0a4ThMfN0RceT0tULfERYWb/IRtHQC9tpfqt6n9C4qb+ubR+/iIFlfxb+QlIYLnD/ RRI00l8KUXzWfEMAH2eNrcWODf2crqcQRE794SFrZUNcrDUcg7UPW2l7HkF/aC10aqem Z+Dz+K1BBWHS5eYTBV+uvVOz4EPIReFKDxdXWofYqUE23CXwsKlcbdbO3bmuoD+xinBX Nnwg== X-Gm-Message-State: APjAAAV+Qjpbi7PXoENS7fMldhvNrtXydQkA6e8pe+066MhC/+N3tZvj er3qsntu9zE4BJGwke4GcAXn0jQm/iVzLN34zyzo1kahe8g= X-Received: by 2002:a9d:6d83:: with SMTP id x3mr1810369otp.84.1556628124080; Tue, 30 Apr 2019 05:42:04 -0700 (PDT) MIME-Version: 1.0 References: <20190430103001.30661-1-michal.lowas-rzechonek@silvair.com> In-Reply-To: <20190430103001.30661-1-michal.lowas-rzechonek@silvair.com> From: Luiz Augusto von Dentz Date: Tue, 30 Apr 2019 15:41:51 +0300 Message-ID: Subject: Re: [PATCH v2] a2dp: Fixed warn_unused_result warning To: =?UTF-8?Q?Micha=C5=82_Lowas=2DRzechonek?= Cc: "linux-bluetooth@vger.kernel.org" , Luiz Augusto von Dentz Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Hi Micha=C5=82, On Tue, Apr 30, 2019 at 1:31 PM Micha=C5=82 Lowas-Rzechonek wrote: > > This used to break builds when using maintainer mode via > ./bootstrap-configure: > > profiles/audio/a2dp.c:1775:2: error: ignoring return value of > =E2=80=98asprintf=E2=80=99, declared with attribute warn_unused_resul= t > [-Werror=3Dunused-result] > asprintf(&sep->path, "%s/sep%d", > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > --- > profiles/audio/a2dp.c | 11 +++++++++-- > 1 file changed, 9 insertions(+), 2 deletions(-) > > diff --git a/profiles/audio/a2dp.c b/profiles/audio/a2dp.c > index 8f141739c..5f5ad508d 100644 > --- a/profiles/audio/a2dp.c > +++ b/profiles/audio/a2dp.c > @@ -1772,8 +1772,15 @@ static void register_remote_sep(void *data, void *= user_data) > if (!(g_dbus_get_flags() & G_DBUS_FLAG_ENABLE_EXPERIMENTAL)) > goto done; > > - asprintf(&sep->path, "%s/sep%d", device_get_path(chan->device), > - avdtp_get_seid(rs= ep)); > + if (asprintf(&sep->path, "%s/sep%d", > + device_get_path(chan->device), > + avdtp_get_seid(rsep)) < 0) { > + error("Could not allocate path for remote sep %s/sep%d", > + device_get_path(chan->device), > + avdtp_get_seid(rsep)); > + sep->path =3D NULL; > + goto done; > + } > > if (g_dbus_register_interface(btd_get_dbus_connection(), > sep->path, MEDIA_ENDPOINT_INTERFACE, > -- > 2.19.1 Applied, thanks. --=20 Luiz Augusto von Dentz