Skip Menu |

This queue is for tickets about the Compress-Raw-Bzip2 CPAN distribution.

Report information
The Basics
Id: 119005
Status: resolved
Priority: 0/
Queue: Compress-Raw-Bzip2

People
Owner: Nobody in particular
Requestors: RURBAN [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 2.070



Subject: [PATCH] Wrong APPEND_OUTPUT logic
clang-4 with its new -Wlogical-not-parentheses warning detected that if(! s->flags & FLAG_APPEND_OUTPUT) is wrong. ! binds stringer than & Fixed with attached patch (-p2) -- Reini Urban
Subject: 0001-Compress-Raw-Bzip2-fix-APPEND_OUTPUT-logic.patch
From 4f0b9ac54fc9755a204a6a18a221f2372cd896b4 Mon Sep 17 00:00:00 2001 From: Reini Urban <rurban@cpanel.net> Date: Sun, 27 Nov 2016 22:20:17 +0100 Subject: [PATCH] Compress-Raw-Bzip2: fix APPEND_OUTPUT logic clang-4 detected that if(! s->flags & FLAG_APPEND_OUTPUT) is wrong. ! binds stronger than &. --- cpan/Compress-Raw-Bzip2/Bzip2.xs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git cpan/Compress-Raw-Bzip2/Bzip2.xs cpan/Compress-Raw-Bzip2/Bzip2.xs index e47dbae..15ff6b9 100644 --- cpan/Compress-Raw-Bzip2/Bzip2.xs +++ cpan/Compress-Raw-Bzip2/Bzip2.xs @@ -558,7 +558,7 @@ bzclose(s, output) if (DO_UTF8(output) && !sv_utf8_downgrade(output, 1)) croak("Wide character in " COMPRESS_CLASS "::bzclose input parameter"); #endif - if(! s->flags & FLAG_APPEND_OUTPUT) { + if (!(s->flags & FLAG_APPEND_OUTPUT)) { SvCUR_set(output, 0); /* sv_setpvn(output, "", 0); */ } @@ -619,7 +619,7 @@ bzflush(s, output) if (DO_UTF8(output) && !sv_utf8_downgrade(output, 1)) croak("Wide character in " COMPRESS_CLASS "::bzflush input parameter"); #endif - if(! s->flags & FLAG_APPEND_OUTPUT) { + if (!(s->flags & FLAG_APPEND_OUTPUT)) { SvCUR_set(output, 0); /* sv_setpvn(output, "", 0); */ } -- 2.10.2
On Sun Nov 27 16:42:51 2016, RURBAN wrote: Show quoted text
> clang-4 with its new -Wlogical-not-parentheses warning detected that > if(! s->flags & FLAG_APPEND_OUTPUT) is wrong. > ! binds stringer than & > > Fixed with attached patch (-p2) >
Thanks. That has been wrong for a loooong time! Paul