Bug 94310 - [PATCH] Fix -Werror build for clang
Summary: [PATCH] Fix -Werror build for clang
Status: RESOLVED FIXED
Alias: None
Product: Telepathy
Classification: Unclassified
Component: mission-control (show other bugs)
Version: unspecified
Hardware: Other FreeBSD
: medium normal
Assignee: Telepathy bugs list
QA Contact: Telepathy bugs list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-02-26 14:33 UTC by Ting-Wei Lan
Modified: 2016-07-03 17:17 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Don't initialize function pointers with G_TYPE_INVALID (1.91 KB, patch)
2016-02-26 14:41 UTC, Ting-Wei Lan
Details | Splinter Review

Description Ting-Wei Lan 2016-02-26 14:33:57 UTC
Please see the attached patch. It fixes the following error:
mcd-account.c:101:7: error: expression which evaluates to zero treated as a null pointer constant of type 'GType (*)(void)' [-Werror,-Wnon-literal-null-conversion]
    { G_TYPE_INVALID, }
      ^~~~~~~~~~~~~~
/home/lantw44/gnome/devinstall/include/glib-2.0/gobject/gtype.h:55:26: note: expanded from macro 'G_TYPE_INVALID'
#define G_TYPE_INVALID                  G_TYPE_MAKE_FUNDAMENTAL (0)
                                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/lantw44/gnome/devinstall/include/glib-2.0/gobject/gtype.h:219:36: note: expanded from macro 'G_TYPE_MAKE_FUNDAMENTAL'
#define G_TYPE_MAKE_FUNDAMENTAL(x)      ((GType) ((x) << G_TYPE_FUNDAMENTAL_SHIFT))
                                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
Comment 1 Ting-Wei Lan 2016-02-26 14:40:01 UTC
The attached patch is made for branch telepathy-mission-control-5.16. I cannot find that version on bugzilla.
Comment 2 Ting-Wei Lan 2016-02-26 14:41:07 UTC
Created attachment 121986 [details] [review]
Don't initialize function pointers with G_TYPE_INVALID
Comment 3 George Kiagiadakis 2016-07-03 17:17:18 UTC
commit 20dc94875afecacf086e57f67447e9384fb85d90
Author: Ting-Wei Lan <lantw@src.gnome.org>
Date:   Fri Feb 26 22:32:28 2016 +0800

    Don't initialize function pointers with G_TYPE_INVALID
    
    https://bugs.freedesktop.org/show_bug.cgi?id=94310
    Reviewed-by: George Kiagiadakis


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.