All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] zbar: Fix gcc5 logical-not-parentheses error
Date: Tue, 19 Jan 2016 11:16:40 +0100	[thread overview]
Message-ID: <20160119111640.066210e2@free-electrons.com> (raw)
In-Reply-To: <569E07BA.2050106@inbox.ru>

Viacheslav,

Thanks for your patch!

On Tue, 19 Jan 2016 12:54:02 +0300, Viacheslav Volkov wrote:
> From b9dd5d73c19d2b7170f722dba61a99655487fe9c Mon Sep 17 00:00:00 2001
> From: Viacheslav Volkov <sv99@inbox.ru>
> Date: Tue, 19 Jan 2016 12:19:29 +0300
> Subject: [PATCH] zbar: Fix gcc5 logical-not-parentheses error
> 
> Fix error: logical not is only applied to the left hand side of comparison
> [-Werror=logical-not-parentheses]
> 
> Signed-off-by: Viacheslav Volkov <sv99@inbox.ru>

Are you sure this is the correct fix? Yes, it fixes the build issue,
but is it what the code intended to do?

> ---
>  zbar/decoder/ean.c  | 4 ++--
>  zbar/qrcode/qrdec.c | 8 ++++----
>  2 files changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/zbar/decoder/ean.c b/zbar/decoder/ean.c
> index c20f538..fe38eaa 100644
> --- a/zbar/decoder/ean.c
> +++ b/zbar/decoder/ean.c
> @@ -294,7 +294,7 @@ static inline zbar_symbol_type_t ean_part_end4
> (ean_pass_t *pass,
>          /* invalid parity combination */
>          return(ZBAR_NONE);
>  
> -    if(!par == fwd) {
> +    if(!(par == fwd)) {

Then par != fwd would be a lot simpler (and ditto below).

But did you analyze the code to make sure that this is actually the
right change?

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

      reply	other threads:[~2016-01-19 10:16 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-16  7:30 [Buildroot] [autobuild.buildroot.net] Build results for 2016-01-15 Thomas Petazzoni
2016-01-16 23:11 ` [Buildroot] Analysis of build failures Thomas Petazzoni
2016-01-17  1:42   ` Frank Hunleth
2016-01-17 11:23     ` Thomas Petazzoni
2016-01-17 16:33       ` Frank Hunleth
2016-01-23  1:05         ` Frank Hunleth
2016-01-23  8:01           ` Thomas Petazzoni
2016-01-25  9:06             ` Joris Lijssens
2016-01-25  9:09               ` Thomas Petazzoni
2016-01-25  9:10                 ` Joris Lijssens
2016-01-25  9:30                   ` Joris Lijssens
2016-01-17 15:06   ` Matthew Weber
2016-01-17 17:26     ` Thomas Petazzoni
2016-01-17 17:10   ` Maxime Hadjinlian
2016-01-18 22:10     ` Thomas Petazzoni
2016-01-17 17:36   ` Jörg Krause
2016-01-17 18:22   ` Rodrigo Rebello
2016-01-17 19:02   ` Gary Bisson
2016-01-17 19:06   ` Romain Naour
2016-01-18  7:06   ` Alexey Brodkin
2016-01-18 12:22   ` Gustavo Zacarias
2016-01-18 20:53   ` Peter Seiderer
2016-01-18 21:03     ` Thomas Petazzoni
2016-01-19  9:54   ` [Buildroot] [PATCH] zbar: Fix gcc5 logical-not-parentheses error Viacheslav Volkov
2016-01-19 10:16     ` Thomas Petazzoni [this message]

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=20160119111640.066210e2@free-electrons.com \
    --to=thomas.petazzoni@free-electrons.com \
    --cc=buildroot@busybox.net \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.