Issue 127433 - packedpixeliterator.hxx : expression used as a function
Summary: packedpixeliterator.hxx : expression used as a function
Status: CONFIRMED
Alias: None
Product: General
Classification: Code
Component: code (show other issues)
Version: 4.2.0-dev
Hardware: PC Linux 64-bit
: P5 (lowest) Normal (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-06-04 10:29 UTC by SET
Modified: 2018-04-02 07:11 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
packedpixeliteraror.hxx.diff (557 bytes, patch)
2017-06-04 10:29 UTC, SET
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description SET 2017-06-04 10:29:59 UTC
Created attachment 86124 [details]
packedpixeliteraror.hxx.diff

Build fails on line 611 of packedpixeliterator.hxx :

const int remainder( x(d.x) % num_intraword_positions );

Reported error : expression used as a function.

Changing to :

const int remainder( (x*(d.x)) % num_intraword_positions );

resolved the issue.
Comment 1 SET 2017-06-04 14:26:10 UTC
I used the multiplication operator '*', but after looking at the code in the next lines, it seems a minus operator '-' would be more fitting.

Any way, that should be simple for the developer managing that file to really fix.
Comment 2 chris 2018-04-02 03:19:54 UTC
I have not unravelled the logic of this completely, but it seems to me that the first x on line 611 should be removed. Putting an arbutrary operator (* or -) between it and the rest of the expression makes no sense at all.
This is in a tar ball which I downloaded around 2018-03-26 and I don't see how it could ever compile. If this is so then how is uncompilable code getting into a release set?
Also, why has it not been fixed nine months after it was first reported?
Comment 3 Peter 2018-04-02 07:11:42 UTC
Are you sure this is the right solution?

The Issue I have is how to test this bugger, independant of change. If you have an Idea I am listening. :)
I thought of emulating all possibilities. So I looked at the calling code, which has the same style, with repeating statements all over. :( I dislike the code. Which is an issue for me, since then I am more thinking about replaceing more code. :P

The code does compile if your compiler is old enough. Since we use CentOS6 as reference machine it is no issue. (Maybe setting -std=gnu++98 would also do the trick. I still have to find time to test this.)

Please note that the code does have no changes in svn. So it is old. You have to check archives to see the history of it.

At least for now I set this to confirmed. I think I missed this issue. I am not sure maybe there is another report around, since it was in more then one discussion on @dev about it.

Again deliver a testcase too and it gets fixed with your name on it.