From patchwork Mon Apr 20 12:07:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Szymon Janc X-Patchwork-Id: 197104 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3220FC54FCB for ; Mon, 20 Apr 2020 12:07:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1161020857 for ; Mon, 20 Apr 2020 12:07:15 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=codecoup-pl.20150623.gappssmtp.com header.i=@codecoup-pl.20150623.gappssmtp.com header.b="1CVdTiOR" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726451AbgDTMHO (ORCPT ); Mon, 20 Apr 2020 08:07:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55560 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1725944AbgDTMHO (ORCPT ); Mon, 20 Apr 2020 08:07:14 -0400 Received: from mail-lf1-x132.google.com (mail-lf1-x132.google.com [IPv6:2a00:1450:4864:20::132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ACEABC061A0F for ; Mon, 20 Apr 2020 05:07:13 -0700 (PDT) Received: by mail-lf1-x132.google.com with SMTP id 198so7699552lfo.7 for ; Mon, 20 Apr 2020 05:07:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=codecoup-pl.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=CjToos8DVyJOPKLRIFmS8/X/EuQPOnHvG9kj6h8qFhc=; b=1CVdTiORuJpxx0QXtNyM8VGakYuF71ETGaAz0xhBXieC0VxVQ4hDMSVU3OkGZA08mU 2qJAXBZ/qY9Kc19VqC2hWagPdxSYCiTW68DUpywnVneYbp9ptr4zxM0LM+S7/niM1JsE 1jX22mmoE2tmNTuvlHIqCwwjDMxBFZ0EhPB0E2xWOwnOyFMozy6kB6asWdAnITf3aOpx A+3xUdlm/o0LHeFELeQwCsPRaIGyePatB6h8N7WWG2AOrzM/nG9JodKuhkYFO+/R82ub tjHrGREezgkR0AVo/YNrqyZFKjfHhd+JaQtJwTc6qPxPgYeXfxp5m5uesBEs0g3UQ+kp 1OEw== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=CjToos8DVyJOPKLRIFmS8/X/EuQPOnHvG9kj6h8qFhc=; b=XNSPoYpSpKY2BoADACyN3b3aCbIh5NZ0a5F5JgYeezDKxZg293QDV7STY0kOEaCew9 G9mgfYrQqFSsYWy/+dyVsCKAgm4d/rS6ihuL+NlwPTTJAcx9DjvwrgPrhSc4F+O3h2PJ PVI+0hQhROmAoQkn3szzfl6tmyygugeq5FCOIs4+Njg/3CeIUQ788icV8vqmk9+KQBS6 +YvplaXlEhx04ns2bLj161Vtg/3lPrNnhxru4vf9as3rkekzv8jDWCnzRuoLBnHk+ndh c9LJmwpv1cHtOIIO9Y6FTRBf0bY43CcSXGki2qKd7uWjRltUYotsaHB/SLNfXajReRdV X2Lw== X-Gm-Message-State: AGi0Pub0oBMflM58lH7tosWZ8aiDyj6Gzc3yQp3kfi3N0ut9KKl6aUFi 2QbZLHzRfeBEjZo0Ayw+06fs1VLSgQQ= X-Google-Smtp-Source: APiQypIg6UWwdYtTu28oZTK4/hb+v5lE1O+3jHVtsY9+3GTtMAoMbq8GrB17ndOHI6x2M4GNw1to3A== X-Received: by 2002:a05:6512:10c9:: with SMTP id k9mr10281900lfg.183.1587384431729; Mon, 20 Apr 2020 05:07:11 -0700 (PDT) Received: from localhost.localdomain (45-11-60-42.ip4.greenlan.pl. [45.11.60.42]) by smtp.gmail.com with ESMTPSA id i18sm666814lfo.57.2020.04.20.05.07.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Apr 2020 05:07:11 -0700 (PDT) From: Szymon Janc To: linux-bluetooth@vger.kernel.org Cc: Szymon Janc Subject: [PATCH 2/4] sap: Fix compilation with GCC 10 Date: Mon, 20 Apr 2020 14:07:03 +0200 Message-Id: <20200420120705.89691-2-szymon.janc@codecoup.pl> X-Mailer: git-send-email 2.26.0 In-Reply-To: <20200420120705.89691-1-szymon.janc@codecoup.pl> References: <20200420120705.89691-1-szymon.janc@codecoup.pl> MIME-Version: 1.0 Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org --- profiles/sap/sap.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/profiles/sap/sap.h b/profiles/sap/sap.h index 16c333a9b..6e78d6c2d 100644 --- a/profiles/sap/sap.h +++ b/profiles/sap/sap.h @@ -76,7 +76,7 @@ struct sap_parameter { uint8_t id; uint8_t reserved; uint16_t len; - uint8_t val[0]; + uint8_t val[]; /* * Padding bytes 0-3 bytes */ @@ -86,7 +86,7 @@ struct sap_message { uint8_t id; uint8_t nparam; uint16_t reserved; - struct sap_parameter param[0]; + struct sap_parameter param[]; } __attribute__((packed)); #define SAP_BUF_SIZE 512 From patchwork Mon Apr 20 12:07:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Szymon Janc X-Patchwork-Id: 197103 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3C4B5C3A5A0 for ; Mon, 20 Apr 2020 12:07:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1D0322072B for ; Mon, 20 Apr 2020 12:07:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=codecoup-pl.20150623.gappssmtp.com header.i=@codecoup-pl.20150623.gappssmtp.com header.b="YwFvCfgZ" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726563AbgDTMHQ (ORCPT ); Mon, 20 Apr 2020 08:07:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55568 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1725944AbgDTMHQ (ORCPT ); Mon, 20 Apr 2020 08:07:16 -0400 Received: from mail-lf1-x12f.google.com (mail-lf1-x12f.google.com [IPv6:2a00:1450:4864:20::12f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E2A55C061A0C for ; Mon, 20 Apr 2020 05:07:15 -0700 (PDT) Received: by mail-lf1-x12f.google.com with SMTP id k28so7692758lfe.10 for ; Mon, 20 Apr 2020 05:07:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=codecoup-pl.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=3xWBQSiSZ6MtF4M51tRNrK/xgva62ZzZGHbHgiRE9lw=; b=YwFvCfgZQ4qIlHrrNCHt09qJkLhLyC3Q9/2pvhZl7CFMhokkfk0xci5MB7e0apiaD5 6vTMzoxZcncHm+4sXoDAj6f/2Owpnd3KfWgR/EZV+Bu7KUtSdtAWwjqbKz2iv0+6jPE3 luFXRXsT+wapSEZDr2XxJWeTuClCPI50sKTqKNCMeZ4drlnH7VMZ8W8BffLfSMhFmhKw 7O3M+eNxSd8DHfZcK4m1BM1K4zH6TX+pxNFKZ9UiBVb2yiIcjmuHeUYUhSddZPYFRujT qOxaJqC5saxYtUzEx+EIr/zceOqEsxKyGNApk9ELi/XcsbCgc8Flp812UsThD34o3u/r 5Rww== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=3xWBQSiSZ6MtF4M51tRNrK/xgva62ZzZGHbHgiRE9lw=; b=Pye2T9PZdG+7cn1MWgbwOFcVgLLhs4mRdJo3gQujz1mPMFN3xzP6IqTkVulv5HDJVE 9fVB16JN45+JVg1OZV45pxoMxZQeQmsJrFwowuK1FG1YCDGTvtqu7CIWhtr9rPbxr6mp 1tTDw3k2N0/RYORHUIzQcoNr5ksdYANVuAYku/FwOTjhbPNjzY7nJMpbe1guPKLvdGHG NlG7teT7vkj99iGsPFSP5S0A+f3Zb6iiCrEPqmhzMW36nUgaVVLK+hOqUrCyp7rn1chj JFdfoKc6ZkJEWryKVH0wZzd3MbLOCLrYmn6lKwLvBEKKvljBKqXxeAEsVdYOwE69AzgD D7gQ== X-Gm-Message-State: AGi0PuZKe0doHSXEDWzMi3QkzNy8umdyw1jLb+9ssrI9N+XyE8uhM6be uMZVE8aIk5T8tUUD7EjmkI/DtL5mG3U= X-Google-Smtp-Source: APiQypKbwArGmX44jFmr0dilEkprUzadIBo+q94qDjewPzbn4SibpwmM5bIDX18rXq8OgFl+0QfDhQ== X-Received: by 2002:ac2:46d3:: with SMTP id p19mr10004386lfo.72.1587384434077; Mon, 20 Apr 2020 05:07:14 -0700 (PDT) Received: from localhost.localdomain (45-11-60-42.ip4.greenlan.pl. [45.11.60.42]) by smtp.gmail.com with ESMTPSA id i18sm666814lfo.57.2020.04.20.05.07.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Apr 2020 05:07:13 -0700 (PDT) From: Szymon Janc To: linux-bluetooth@vger.kernel.org Cc: Szymon Janc Subject: [PATCH 4/4] device: Fix compilation with GCC 10 Date: Mon, 20 Apr 2020 14:07:05 +0200 Message-Id: <20200420120705.89691-4-szymon.janc@codecoup.pl> X-Mailer: git-send-email 2.26.0 In-Reply-To: <20200420120705.89691-1-szymon.janc@codecoup.pl> References: <20200420120705.89691-1-szymon.janc@codecoup.pl> MIME-Version: 1.0 Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Class is using only 3 bytes so make sure GCC is aware of that. src/device.c:397:3: note: ‘sprintf’ output between 9 and 11 bytes into a destination of size 9 397 | sprintf(class, "0x%6.6x", device->class); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors --- src/device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/device.c b/src/device.c index 5f9ad227d..a8d95346a 100644 --- a/src/device.c +++ b/src/device.c @@ -394,7 +394,7 @@ static gboolean store_device_info_cb(gpointer user_data) g_key_file_remove_key(key_file, "General", "Alias", NULL); if (device->class) { - sprintf(class, "0x%6.6x", device->class); + sprintf(class, "0x%6.6x", device->class & 0xffffff); g_key_file_set_string(key_file, "General", "Class", class); } else { g_key_file_remove_key(key_file, "General", "Class", NULL);