From patchwork Mon Apr 20 12:07:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Szymon Janc X-Patchwork-Id: 11498767 X-Patchwork-Delegate: luiz.dentz@gmail.com Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9FF79913 for ; Mon, 20 Apr 2020 12:07:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7BAEB2072B for ; Mon, 20 Apr 2020 12:07:14 +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="UYUXPEie" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726405AbgDTMHO (ORCPT ); Mon, 20 Apr 2020 08:07:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55558 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726381AbgDTMHN (ORCPT ); Mon, 20 Apr 2020 08:07:13 -0400 Received: from mail-lj1-x22d.google.com (mail-lj1-x22d.google.com [IPv6:2a00:1450:4864:20::22d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AFED5C061A0C for ; Mon, 20 Apr 2020 05:07:12 -0700 (PDT) Received: by mail-lj1-x22d.google.com with SMTP id w20so3338599ljj.0 for ; Mon, 20 Apr 2020 05:07:12 -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:mime-version :content-transfer-encoding; bh=BaP5pgd7yRmBH3fNqfHwEiNp+pwbVq/XO4Y9gOYtEDw=; b=UYUXPEiekNznSL8WbTQG1bwkDqoZc4aO8whWoGaI+RrpVyuklGi4JRWxv7DKsRblNJ E1ipoKNUfs/TVJZE104y3CKIM6Q25lw6ZZ4v9e79gHQHet16eL2iWspS8SQly4y2276B dWDSU9hdUghd/8SvGvhwJaj52LJN7oL/SEeEi8+rlNfmhRB6McYH7BJqQ6XQnm4E6ZHo 1+uDCevp39Ig5hzWZYzm71PsvXGdpSdog58XlVWkOZjSwmz/qPuSrLKJpExLaBMElVal RJ17baFa42sbs8LOuCZOyLAaIgiNZ8JBrqVBfTX4UJ0cHk6bOIRKQjIc/SvMpcgoills z9Og== 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=BaP5pgd7yRmBH3fNqfHwEiNp+pwbVq/XO4Y9gOYtEDw=; b=AsvpBUzXVEdkBqrhH36O1CQzOHhRw+NFPVyM16bPhqE0RwTo07j4F5B9KLaBP505i0 iPI78zfhQLo/eoQ+7MJRpglCBi7PfP8e+RhEfHUxvoyhZucN+Qt5ZL1XdoSkPHqkG5QD fLKcvCr4WeoZaqn9p4/olHxSll7/0M0ewU8ATRHrfPy2lOFUmZobXKPSj5KUHQctXcQJ w9DT3l9LBIQynsSfjpboel8LVnJiVowUpMi+9X120bvCPLT8Y0ufLZDZPoY1wwMgebF8 4rOnz0OqLonkP7nMv1zg5y4M5r9wTIUlaisjjO9uu1s9nCHNDECLnYB7/TlNH9OpkFBb bIUQ== X-Gm-Message-State: AGi0Pub8iRnY3oI5dwtu7RyvZtglGwLScUN3orMZNuqzKqHjbNkeMK7V LoCx3BWCg3ZEz9XO+jMpsOJwb8WMzNM= X-Google-Smtp-Source: APiQypLmQxHu/XTLm2aM8vN4gfmorCifYTyw5MEQ74gvIkGqveZljEzYu+Wi5xvDqDO+/q1QESRjgg== X-Received: by 2002:a2e:3209:: with SMTP id y9mr4192148ljy.154.1587384430736; Mon, 20 Apr 2020 05:07:10 -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.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Apr 2020 05:07:10 -0700 (PDT) From: Szymon Janc To: linux-bluetooth@vger.kernel.org Cc: Szymon Janc Subject: [PATCH 1/4] android: Fix build with GCC 10 Date: Mon, 20 Apr 2020 14:07:02 +0200 Message-Id: <20200420120705.89691-1-szymon.janc@codecoup.pl> X-Mailer: git-send-email 2.26.0 MIME-Version: 1.0 Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org status and state are used to hold various enum types depending on test and callback passed. Define them as int to avoid warnings about enum assignment from invalid type. --- android/tester-main.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/android/tester-main.h b/android/tester-main.h index 8a7384c57..6bdfdbcdb 100644 --- a/android/tester-main.h +++ b/android/tester-main.h @@ -653,8 +653,8 @@ struct map_inst_data { * matching with expected step data. */ struct bt_callback_data { - bt_state_t state; - bt_status_t status; + int state; + int status; int num_properties; bt_property_t *properties; bt_uuid_t *uuid; 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: 11498769 X-Patchwork-Delegate: luiz.dentz@gmail.com Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 29E1D81 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 12B3820B1F 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:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Szymon Janc X-Patchwork-Id: 11498771 X-Patchwork-Delegate: luiz.dentz@gmail.com Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 02E67913 for ; Mon, 20 Apr 2020 12:07:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DDD2B20B1F 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="Cpx7MQs8" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726381AbgDTMHP (ORCPT ); Mon, 20 Apr 2020 08:07:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55566 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1725944AbgDTMHP (ORCPT ); Mon, 20 Apr 2020 08:07:15 -0400 Received: from mail-lj1-x22c.google.com (mail-lj1-x22c.google.com [IPv6:2a00:1450:4864:20::22c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B9436C061A0C for ; Mon, 20 Apr 2020 05:07:14 -0700 (PDT) Received: by mail-lj1-x22c.google.com with SMTP id n6so6250311ljg.12 for ; Mon, 20 Apr 2020 05:07:14 -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=RGG4/yjvuMH3FlIn0X+Fl1fHjCz3q6wAoOFCkN6ckTE=; b=Cpx7MQs8uUNpqY3C/kpzCDmBRbkFa69ZJgq+nZ/aZ1uxKI3evF8n1TRIKO3+MId/mk V60HgCXJ5BCGxCyVeisHwR3QJu+S3FZxA5DqyAQEaPIqk79IKep0uBbh4iyvwPg9/4eL JAvj8rZ9zVP4i76Uv3mlIXcZHiqXyBexFK4fa90apmZ9DaCgxDLI/BzKGXQbCsFRM6Ek qkP8CWeotd+kObIypEzZORyUshfQsJQtTo0yGmULdItVDio8d9vE48eBayk52+YKmTxs 1IbEDMteX+TriN8Avm7U2As/MAzNV3TFS7Sr8n8MaFe/1fW0QvB5D6vOxpS1LdafIIjH fDEg== 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=RGG4/yjvuMH3FlIn0X+Fl1fHjCz3q6wAoOFCkN6ckTE=; b=Baxr88ysp2+bwHRzIFPXXW4JrQSA5TNVIe+C6xxceKGrRxTlWyXRg8EcsPTnGYYZ47 b5mE9P4m3KHSCRhFKXTleJOpBIPJ7QHGcNm/vgRiikFwX1jGCVb9B5/ba7NwAy39AzFG pM1qYyRck9PxFKxTyGdzO5gS1Z4S1Q/GZJIhZmIvoSsmpw2q9Yd7Cb6tJRlMw0VBbwOl G9UKrQ0oMYYMB1jOkiWSnmcpj1NehfT+2C/XhAYQfBhR5+JSCwCRnTeE0tD0DN+lf7UP qNKULAhEdmj4MaBX9eYzZjYP7qkCIkp3PocFMScTZvYs/oHBYF0b8fMGIruxiG8opral QwLA== X-Gm-Message-State: AGi0PuY/xkBaNzgM2W+HyPfv31KESpvOJhn1yD4j1pulTfPOkvN5ZZML zLCe9dlnva9eczdERpmGHGC9eWX97fs= X-Google-Smtp-Source: APiQypKBnEbDSxSAnW9CX8zoHBTv5VixvfIdrMEoRdRfYj8UGCH9VXOEoCtgidmuMtYGZ2pLPLfNnA== X-Received: by 2002:a05:651c:390:: with SMTP id e16mr1664258ljp.186.1587384432835; Mon, 20 Apr 2020 05:07:12 -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.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Apr 2020 05:07:12 -0700 (PDT) From: Szymon Janc To: linux-bluetooth@vger.kernel.org Cc: Szymon Janc Subject: [PATCH 3/4] avctp: Fix compilation with GCC 10 Date: Mon, 20 Apr 2020 14:07:04 +0200 Message-Id: <20200420120705.89691-3-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 This one is a false positive but since we never use more than UINPUT_MAX_NAME_SIZE bytes of name we can silence GCC by reducing size of source string. CC profiles/audio/bluetoothd-avctp.o In function ‘uinput_create’, inlined from ‘init_uinput’ at profiles/audio/avctp.c:1259:20: profiles/audio/avctp.c:1188:3: error: ‘strncpy’ output may be truncated copying 79 bytes from a string of length 248 [-Werror=stringop-truncation] 1188 | strncpy(dev.name, name, UINPUT_MAX_NAME_SIZE); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors --- profiles/audio/avctp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/profiles/audio/avctp.c b/profiles/audio/avctp.c index 37ffde9e7..058b44a8b 100644 --- a/profiles/audio/avctp.c +++ b/profiles/audio/avctp.c @@ -1246,7 +1246,7 @@ static int uinput_create(struct btd_device *device, const char *name, static void init_uinput(struct avctp *session) { - char name[248 + 1]; + char name[UINPUT_MAX_NAME_SIZE]; device_get_name(session->device, name, sizeof(name)); if (g_str_equal(name, "Nokia CK-20W")) { 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: 11498773 X-Patchwork-Delegate: luiz.dentz@gmail.com Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3565D913 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 1E21A20B1F 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);