gcc4 warnings -Wuninitialized -Wfloat-equal and -Wconversion

Thiago Macieira thiago at kde.org
Tue Sep 22 23:44:03 BST 2009


Em Terça-feira 22. Setembro 2009, às 22.18.08, Jaime Torres escreveu:
> using a struct like this:
> 
> typedef enum {
>         LeftToRight,
>         RightToLeft
> } LayoutDirection_T;
> 
> typedef struct
> {
>         LayoutDirection_T b:1;
> }
> LayoutDirection;
> 
> test2.cpp compiles cleanly.
> 

How do you plan on placing a value inside that struct?

Are you going to define a constructor, like this?

    LayoutDirection(uint val) : b(val) {}

Won't that generate the same warning?

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
  Senior Product Manager - Nokia, Qt Development Frameworks
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358

Qt Developer Days 2009 | Registration Now Open!
Munich, Germany: Oct 12 - 14     San Francisco, California: Nov 2 - 4
      http://qt.nokia.com/qtdevdays2009
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20090923/553bebc8/attachment.sig>


More information about the kde-core-devel mailing list