Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4731015yba; Tue, 30 Apr 2019 03:30:34 -0700 (PDT) X-Google-Smtp-Source: APXvYqzB2SfZhIUubKKCBeERdV8JRYKfWWCmD2sooms5YRRIIBEOrPXpvol3bL5ut7LwZgZEmaSg X-Received: by 2002:a63:5742:: with SMTP id h2mr12750837pgm.194.1556620234088; Tue, 30 Apr 2019 03:30:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556620234; cv=none; d=google.com; s=arc-20160816; b=Z/hR9YA0EBNur6T1Rv/4rmvXofv1xmLPC4vFqe/BoBa1k0NoLr/AtC4IZLCdEaqx2M pvDP1rIWvX4m/tNQWwIn//n9NDcVCgCE3qKBOen2Quy1VG36lgucoipCEVzflT1wNii+ 2UpvjjtDJXgI8lJiKjWLIipKb5wBxdUS+sewOZSn4FZqNheW0+JZnILVVlrx5jsA+UPG Wnrq5GXQG+e/toswSyv/VhmqxfzgNl3a5+juQ0671XVJ+AzMra9e8vskgIJ7ofBFPOP0 xZZHaVmnoPRg2Sah8giG62Ua8gKMeLvaID9UtG9K3jPQJ1hG+GGZC1LPn8wPDjNA6koa T7mQ== 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:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=QvDfH04UqCTz4k85+OXxY0UiEq9xfrn3D1VbDTW93vI=; b=s69cAe4dSCGKDLKD75/9BEfOANw4LZ2iHaOFHfuap7ktgjbQ5dobwz94UfiFwIyZF1 s9WczSWw3UF8LZInge/6UfmbvAmnQjeKmYuWLFhwzr5BKXZ8MmlCR5qJgdgOJyArbNo7 OumHClM8TFYm+m7To/vTvK2y0FiSNDjwrUisvE8qtcjMCuD/8nUYGTLb798z9NAIN8tI t+Tgdh/Ts/lx+20mway4eJ6QxuOPf1QRkwRyH3HP4YkX0B7T6z+8vo1G4EudKH3YXYiO 6KzQdQPUF8WfVhephBonEcm+4Jl7gN/cPc8FpDhKYdUaNtBzq9izpFfB9zoPcXWRyFQK eGCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@silvair-com.20150623.gappssmtp.com header.s=20150623 header.b=a8aw8xTV; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t16si20243474pgl.97.2019.04.30.03.30.17; Tue, 30 Apr 2019 03:30:34 -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=@silvair-com.20150623.gappssmtp.com header.s=20150623 header.b=a8aw8xTV; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726294AbfD3KaJ (ORCPT + 99 others); Tue, 30 Apr 2019 06:30:09 -0400 Received: from mail-lj1-f193.google.com ([209.85.208.193]:46134 "EHLO mail-lj1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726129AbfD3KaJ (ORCPT ); Tue, 30 Apr 2019 06:30:09 -0400 Received: by mail-lj1-f193.google.com with SMTP id h21so12224148ljk.13 for ; Tue, 30 Apr 2019 03:30:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=silvair-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=QvDfH04UqCTz4k85+OXxY0UiEq9xfrn3D1VbDTW93vI=; b=a8aw8xTVwnt5dJZo8dC9En5w/GfqrEYKytdlo3vWbXS+y6aepuUgl2ernAsqaFCbdV jvZtiWRjhWK5rng7c26M6qQbKc4Ze8AMErTCdQIqDuPv7xtvJ3kKGFB1UWUGjFxyRdJY F1S2UbBap3DaHDzG1jm0JrYtV36IlbUYmIQXvIi/hFPj3PUcpbwCxERMnKJUnpihkWp3 ZjZ7TDuD13i7oZhsDV19sF06NyZOMp2THrAWktooVk4e9EX+ScScqgQzKm1vb8FG4Xuq MbyhQNgn/D0adQcMVPr9DbU8ID/Bz75+fKPuudhKwAGwx12PitcW91m1rXhbny157CX8 sswA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=QvDfH04UqCTz4k85+OXxY0UiEq9xfrn3D1VbDTW93vI=; b=YxVB/k4a3a+FdOYogShJhIC5qYNzxmjD2+bbndFqoJzybZQi78GWdRroBbgjSIc3c2 cwkqP+2V+JOT5bbqmdeHEEJLtFbQwzNwApaezzGoo1HCLMapdJCtSe0JYecGYIOxrsLz eJKiKE4M6LJ9mWSV1Eg0NpjoyHVYsET2YPrn1yMUncjEEU7D9OAQ62Wk+XPAc3/uCB0V 4MZMY5irRoFMIOr1LxjsJVdJaWAsjeQJV8shs20ZtN8oajhf0lEPblgROcRxWYs4RD30 eh3zq2y2goYQIIaF41bmXTFgnqQts4JiivX1ZqFWC9hu6B7G7p0JXVOGUIWHsdSvslNY 84Qw== X-Gm-Message-State: APjAAAVV+fj7yR++0acKI4NF5Kucpch11yNw0WY+6AIwUOdy1s0FfDmf 9++4T7K96iC5rNjHLn+ySEVOtMwptso= X-Received: by 2002:a2e:88c5:: with SMTP id a5mr13300164ljk.5.1556620207103; Tue, 30 Apr 2019 03:30:07 -0700 (PDT) Received: from scytale.silvair.lan ([217.153.94.18]) by smtp.gmail.com with ESMTPSA id z2sm3733277lji.77.2019.04.30.03.30.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 30 Apr 2019 03:30:06 -0700 (PDT) From: =?UTF-8?q?Micha=C5=82=20Lowas-Rzechonek?= To: linux-bluetooth@vger.kernel.org Cc: Luiz Augusto von Dentz Subject: [PATCH v2] a2dp: Fixed warn_unused_result warning Date: Tue, 30 Apr 2019 12:30:00 +0200 Message-Id: <20190430103001.30661-1-michal.lowas-rzechonek@silvair.com> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org This used to break builds when using maintainer mode via ./bootstrap-configure: profiles/audio/a2dp.c:1775:2: error: ignoring return value of ‘asprintf’, declared with attribute warn_unused_result [-Werror=unused-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(rsep)); + 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 = NULL; + goto done; + } if (g_dbus_register_interface(btd_get_dbus_connection(), sep->path, MEDIA_ENDPOINT_INTERFACE, -- 2.19.1