Linux-Bluetooth Archive on lore.kernel.org
 help / color / Atom feed
From: Sonny Sasaka <sonnysasaka@chromium.org>
To: BlueZ <linux-bluetooth@vger.kernel.org>
Subject: Re: [PATCH] autopair: Fix compiler warning
Date: Thu, 26 Mar 2020 10:20:48 -0700
Message-ID: <CAOxioN=7jGXxp+=c674Ai3bU5N3f-qRpd3zHDuOdSO93W3dnwQ@mail.gmail.com> (raw)
In-Reply-To: <CAOxioNmHcCTkc1MA6Zw8WTPBHCTpE9XZyzfOeuj97EP2NeBw=A@mail.gmail.com>

Hi BlueZ maintainers,

Could you take a look at this fix? Thank you!

On Tue, Mar 24, 2020 at 12:49 PM Sonny Sasaka <sonnysasaka@chromium.org> wrote:
>
> With clang, comparing an array with NULL generates a warning because the
> value is always non-NULL. With maintainer mode enabled, this becomes a
> compilation error.
> ---
>  plugins/autopair.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/plugins/autopair.c b/plugins/autopair.c
> index 043bd9b9d..3089430a8 100644
> --- a/plugins/autopair.c
> +++ b/plugins/autopair.c
> @@ -75,7 +75,7 @@ static ssize_t autopair_pincb(struct btd_adapter *adapter,
>          btd_device_get_product (device));
>
>      /* The iCade shouldn't use random PINs like normal keyboards */
> -    if (name != NULL && strstr(name, "iCade") != NULL)
> +    if (strstr(name, "iCade") != NULL)
>          return 0;
>
>      /* This is a class-based pincode guesser. Ignore devices with an
> --
> 2.17.1

  reply index

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-24 19:49 Sonny Sasaka
2020-03-26 17:20 ` Sonny Sasaka [this message]
2020-03-26 21:08   ` Luiz Augusto von Dentz
2020-03-26 21:12     ` Sonny Sasaka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAOxioN=7jGXxp+=c674Ai3bU5N3f-qRpd3zHDuOdSO93W3dnwQ@mail.gmail.com' \
    --to=sonnysasaka@chromium.org \
    --cc=linux-bluetooth@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-Bluetooth Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-bluetooth/0 linux-bluetooth/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-bluetooth linux-bluetooth/ https://lore.kernel.org/linux-bluetooth \
		linux-bluetooth@vger.kernel.org
	public-inbox-index linux-bluetooth

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-bluetooth


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git