Compilation warning in bamf-application.c because of implicit cast of try_create_local_desktop_data return value

Bug #1280110 reported by Michel Lind
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
BAMF
Fix Released
Medium
Michel Lind
bamf (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

try_create_local_desktop_data contains an invocation of the g_return_val_if_fail macro, which in case of failure returns NULL instead of a gboolean value (the return type signature of the try_... function).

This is wrong on two different counts:
- implicit cast warning, which when warnings are treated as errors cause compilation failure
- if NULL is explicitly cast to gboolean, it yields another error as a pointer has differing size as a gboolean (even though in this case it's all-zero)

The correct fix is to have g_return_val_if_fail return FALSE instead of NULL.

Related branches

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

Fix committed into lp:bamf at revision 592, scheduled for release in bamf, milestone Unknown

Changed in bamf:
status: New → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package bamf - 0.5.1+14.04.20140214.1-0ubuntu1

---------------
bamf (0.5.1+14.04.20140214.1-0ubuntu1) trusty; urgency=low

  [ Michel Alexandre Salim ]
  * [Merge] Fix return value of try_create_local_desktop_data. (LP:
    #1280110)

  [ CI bot ]
  * Release trunk to Ubuntu

  [ Marco Trevisan (Treviño) ]
  * BamfLegacyScreen: When in Unity monitor for compiz ClientMessage's
    to show action menu If we get a _COMPIZ_TOOLKIT_ACTION client
    message with the internal value _COMPIZ_TOOLKIT_ACTION_WINDOW_MENU,
    then we are requested by compiz to show the window action menu, and
    thus let's ask the proper BamfLegacyWindow to do that, thanks to
    libwnck. (LP: #1280042)
 -- Ubuntu daily release <email address hidden> Fri, 14 Feb 2014 22:58:48 +0000

Changed in bamf (Ubuntu):
status: New → Fix Released
Changed in bamf:
importance: Undecided → Medium
assignee: nobody → Michel Alexandre Salim (michel-slm)
milestone: none → 0.5.1
Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

Fix Released in bamf BAMF 0.5.1 "The Trusty BAMF".

Changed in bamf:
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.