Fix warnings in CompTimer

Bug #893998 reported by Sam Spilsbury
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Compiz Core
Fix Released
Undecided
Sam Spilsbury
compiz (Ubuntu)
Fix Released
Undecided
Sam Spilsbury

Bug Description

CompTimer and related classes currently generate warnings
because the GLib timeout is a signed integer and that's being compared to an unsigned
timeDiff integer from the CompTimer class.

Related branches

Changed in compiz-core:
assignee: nobody → Sam Spilsbury (smspillaz)
milestone: none → 0.9.6
status: New → In Progress
Changed in compiz (Ubuntu):
assignee: nobody → Sam Spilsbury (smspillaz)
status: New → In Progress
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Maybe try adding this gcc option to prevent similar regressions:

-Werror
           Make all warnings into errors.

Revision history for this message
Sam Spilsbury (smspillaz) wrote : Re: [Bug 893998] Re: Fix warnings in CompTimer

On Thu, Nov 24, 2011 at 10:42 AM, Daniel van Vugt <email address hidden> wrote:
> Maybe try adding this gcc option to prevent similar regressions:
>
> -Werror
>           Make all warnings into errors.
>

Urgh,

Unity uses -Werror and I really don't like it. I have to do a lot of
things during debugging that generate warnings (inline assembly,
printing window id's etc) and this just makes debugging painful. There
are also some header files that we include which generate warnings
because of misuse of #define and friends. Might be better to make it
so that any automated branch merging bot that we'll be deploying in
the future rejects code that generates warnings.

> --
> You received this bug notification because you are a member of Compiz
> Maintainers, which is the registrant for Compiz Core.
> https://bugs.launchpad.net/bugs/893998
>
> Title:
>  Fix warnings in CompTimer
>
> Status in Compiz Core:
>  In Progress
> Status in “compiz” package in Ubuntu:
>  In Progress
>
> Bug description:
>  CompTimer and related classes currently generate warnings
>  because the GLib timeout is a signed integer and that's being compared to an unsigned
>  timeDiff integer from the CompTimer class.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/compiz-core/+bug/893998/+subscriptions
>

--
Sam Spilsbury

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

So you won't like my other suggestion that all projects should use -Wall and -pedantic too :)

I know, often when using other peoples' code that you have no control over, you have to ignore some warnings...

Changed in compiz-core:
status: In Progress → Fix Committed
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Fix released in:
compiz (1:0.9.7.0~bzr2995-0ubuntu1) precise; urgency=low

Changed in compiz (Ubuntu):
status: In Progress → Fix Released
Changed in compiz-core:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.