warning: overflow in implicit constant conversion in KoShape.cpp

C. Boemann cbo at boemann.dk
Sun Aug 19 22:45:23 BST 2012


On Sunday 19 August 2012 15:40:25 André Wöbbeking wrote:
> On Sunday 19 August 2012 11:38:52 Boudewijn Rempt wrote:
> > On Saturday 18 August 2012 Aug, André Wöbbeking wrote:
> > > P.S.: Please CC me.
> > 
> > Like this? I don't get the warnings myself so I am not sure.
> 
> Don't know whether I get it because I'm using GCC 4.7 or due to some flags.
> 
> > diff --git a/libs/flake/KoShape_p.h b/libs/flake/KoShape_p.h
> > index c32a165..36a6f9b 100644
> > --- a/libs/flake/KoShape_p.h
> > +++ b/libs/flake/KoShape_p.h
> > 
> > @@ -80,16 +80,16 @@ public:
> >      qreal transparency; ///< the shapes transparency
> >      QString hyperLink; //hyperlink for this shape
> > 
> > -    static const int MaxZIndex = 32767;
> > -    int zIndex : 16; // keep maxZIndex in sync!
> > -    int runThrough : 16;
> > -    int visible : 1;
> > -    int printable : 1;
> > -    int geometryProtected : 1;
> > -    int keepAspect : 1;
> > -    int selectable : 1;
> > -    int detectCollision : 1;
> > -    int protectContent : 1;
> > +    static const uint MaxZIndex = 32767;
> > +    uint zIndex : 16; // keep maxZIndex in sync!
> > +    uint runThrough : 16;
> 
> Not sure about this whether they need to be signed or not.
> 
> > +    uint visible : 1;
> > +    uint printable : 1;
> > +    uint geometryProtected : 1;
> > +    uint keepAspect : 1;
> > +    uint selectable : 1;
> > +    uint detectCollision : 1;
> > +    uint protectContent : 1;
> 
> Yes.
> 
> I already asked on IRC and cbo meant it was maybe changed to int:1 by
> purpose and I should ask about it here.
right, but i've now checked the commit logs and it doesn't seem to be on 
purpose so ok to change from my point of view

Boemann



More information about the calligra-devel mailing list