Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp601602pxb; Thu, 17 Feb 2022 10:31:42 -0800 (PST) X-Google-Smtp-Source: ABdhPJwdk4n/7mBIx9N5JjM7l+BzgOTzc2vKxLpMuHxrg/7zrDUMqodrD8cp0At2prGYNvMT/arT X-Received: by 2002:a17:90b:fd7:b0:1b8:c872:f98f with SMTP id gd23-20020a17090b0fd700b001b8c872f98fmr4374101pjb.170.1645122702374; Thu, 17 Feb 2022 10:31:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645122702; cv=none; d=google.com; s=arc-20160816; b=NUX1UoADM+DubEjaCOWOXVefhHuQHP1cEz+KvhyX4Ryoez7Rx7+nwa5LSoXJ8vN3yo dVcp6o8UlR12BEVKSUFUl6JY8eVmDJtGUDcHWWkg5VPaGpU+89v0Ag5TwljbIRORFwzI 6EQmjSFubCbdmeCFcebck6ao6s8P5jTlgJj8RiVB4T7lnJigVULA9zTgpEVtX9zJsKxF w9EYMdAlXVpO8ouf4iuXCDpZyhbBsgnKQ+MKbbi91RM8aqTyVHEJaRNNa1doiwk5O7BA QFsfOWsXn6o3TfBXY0lYp9TKYS3CNCpgWIHJ9ibhLUq6sJFAkUVkfwtNX6mhrPP86SSL d7KA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version; bh=6BBzSlEWVXNDm7jbXrQwF5AyO1XrCS42iKpkkAiyxrc=; b=xvCY/QjDeZy+9xGQzT39oRVKcdxCd1TTE2SD6FrU/5WyOoJhXz5dI3oXOueWWL/9Er Qm3swHWhYOi9oUWIjv8e9wr/xNZBM3hunJCbkcBAD+tJD01hsaJaXWs8mQ4gZ8VIze6Y 9D6Usxhz7J+u7fHech2tngDlFln1lZsgIF+fOyrfEls6nko+MFZWpP0CEQS0Xa7hf76L W2WofcdyqbMB/t2etAY1ndZTtteVwNY75eNiAdACT/4UmqlD6IT+WNOmHnmJud28W4Go 2iv7vupzM5ae/X0SIRFYXRdlDneza/8m4CP+aoiDjbTF1JyDlyLBnQo+XTt7cVWETaE8 OG3g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id me9si1563898pjb.16.2022.02.17.10.31.11; Thu, 17 Feb 2022 10:31:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229830AbiBQJ4F convert rfc822-to-8bit (ORCPT + 99 others); Thu, 17 Feb 2022 04:56:05 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:33442 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238925AbiBQJ4E (ORCPT ); Thu, 17 Feb 2022 04:56:04 -0500 Received: from mail.holtmann.org (coyote.holtmann.net [212.227.132.17]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 6A772128DEB for ; Thu, 17 Feb 2022 01:55:50 -0800 (PST) Received: from smtpclient.apple (p4fefcd07.dip0.t-ipconnect.de [79.239.205.7]) by mail.holtmann.org (Postfix) with ESMTPSA id B2D6CCECDF; Thu, 17 Feb 2022 10:55:49 +0100 (CET) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 15.0 \(3693.60.0.1.1\)) Subject: Re: [BlueZ PATCH] shared: Fix the incorrect type with bit shift From: Marcel Holtmann In-Reply-To: <20220217063145.50497-1-hj.tedd.an@gmail.com> Date: Thu, 17 Feb 2022 10:55:49 +0100 Cc: BlueZ Content-Transfer-Encoding: 8BIT Message-Id: <9ADB9AF8-0F3F-4B49-BA89-1026920C591A@holtmann.org> References: <20220217063145.50497-1-hj.tedd.an@gmail.com> To: Tedd Ho-Jeong An X-Mailer: Apple Mail (2.3693.60.0.1.1) X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Hi Tedd, > This patch fixes the following runtime error: > > $ sudo ./monitor/btmon -w test.btsnoop > Bluetooth monitor ver 5.63 > src/shared/btsnoop.c:339:18: runtime error: left shift of 65535 by 16 places cannot be represented in type 'int' what compiler version is this? Or what warnings did you enable? Since this is weird, so while yes 0xffff can not be shifted, but we are also not shifting into an uint16_t. The fix is fine, I am just curious. There will be other places with the same problem. Regards Marcel