Issue 99770 - vcl: ambiguous && || sequence
Summary: vcl: ambiguous && || sequence
Status: CLOSED FIXED
Alias: None
Product: gsl
Classification: Code
Component: code (show other issues)
Version: DEV300m42
Hardware: All Linux, all
: P3 Trivial (vote)
Target Milestone: OOo 3.2
Assignee: caolanm
QA Contact: issues@gsl
URL:
Keywords:
Depends on:
Blocks: 96084
  Show dependency tree
 
Reported: 2009-03-02 10:27 UTC by caolanm
Modified: 2009-04-14 13:00 UTC (History)
2 users (show)

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


Attachments
patch that keeps things as they are (7.03 KB, patch)
2009-03-02 10:28 UTC, caolanm
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description caolanm 2009-03-02 10:27:31 UTC
Attached is a patch that addresses the last gcc 4.4 warnings in vcl.

It keeps the existing logic in all cases, but should be reviewed to see if
that's what was originally meant, e.g. the atktext.cxx && || looks suspicious
and from the comments maybe should instead be ...

if (
     -2 == offset && 
     (ATK_TEXT_BOUNDARY_LINE_START == boundary_type ||
ATK_TEXT_BOUNDARY_LINE_END == boundary_type)
   )

and the && || in source/window/decoview.cxx also looks a little suspicious as well.
Comment 1 caolanm 2009-03-02 10:28:00 UTC
Created attachment 60585 [details]
patch that keeps things as they are
Comment 2 philipp.lohmann 2009-03-02 12:31:14 UTC
committed in CWS vcl100, thanks for the patch
Comment 3 philipp.lohmann 2009-03-02 12:32:15 UTC
target
Comment 4 caolanm 2009-03-02 12:46:27 UTC
And we're happy that the code in atktext.cxx is correct ?, I know this patch
doesn't change the logic, but just like to be sure we're happy with that logic.
Comment 5 philipp.lohmann 2009-03-02 12:55:16 UTC
the decoview.cxx thingy is OK IMHO and from the comment in atktext.cxx I think,
that, too, is what it should be: the "at end of line" position is either
"linestart plus offset -2" or "line end"
Comment 6 nospam4obr 2009-03-02 14:23:49 UTC
I think the replacement code in the issue is correct, not the one in the patch:
the way it is now, the code always returns the current line for any given index
in the text if the boundary type is ATK_TEXT_BOUNDARY_LINE_END. This is not the
expected behavior.

Good catch actually, must have been confused by the extra brackets.



Comment 7 philipp.lohmann 2009-03-02 14:55:13 UTC
committed an according change. Thanks for having a second look.
Comment 8 nospam4obr 2009-03-02 15:40:49 UTC
back to FIXED.
Comment 9 philipp.lohmann 2009-03-13 17:24:45 UTC
please verify in CWS vcl100
Comment 10 caolanm 2009-03-13 18:03:32 UTC
all good
Comment 11 caolanm 2009-04-14 13:00:16 UTC
closed, seen in m46