After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 698179 - Uninitialized variables because find_pref() retval not checked
Uninitialized variables because find_pref() retval not checked
Status: RESOLVED FIXED
Product: mutter
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
Depends on:
Blocks:
 
 
Reported: 2013-04-17 08:04 UTC by Stef Walter
Modified: 2013-04-17 09:59 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix use of uninitialized variables (1.69 KB, patch)
2013-04-17 08:06 UTC, Stef Walter
committed Details | Review

Description Stef Walter 2013-04-17 08:04:40 UTC
CC       prefs.lo
core/prefs.c: In function 'meta_prefs_set_num_workspaces':
core/prefs.c:1714:37: error: 'pref' may be used uninitialized in this function [-Werror=maybe-uninitialized]
   g_settings_set_int (SETTINGS (pref->schema),
                                     ^
core/prefs.c: In function 'meta_prefs_set_no_tab_popup':
core/prefs.c:2221:41: error: 'pref' may be used uninitialized in this function [-Werror=maybe-uninitialized]
   g_settings_set_boolean (SETTINGS (pref->schema), KEY_NO_TAB_POPUP, whether);
                                         ^
cc1: all warnings being treated as errors
make[4]: *** [prefs.lo] Error 1
make[4]: Leaving directory `/data/projects/mutter/src'
Comment 1 Stef Walter 2013-04-17 08:06:19 UTC
Created attachment 241715 [details] [review]
Fix use of uninitialized variables

If mutter is going to -Werror by default, then it can play footloose
and fancy free with this sorta stuff.

Patch against gnome-3-8 branch.
Comment 2 Rui Matos 2013-04-17 08:38:16 UTC
Review of attachment 241715 [details] [review]:

Looks fine.
Comment 3 Stef Walter 2013-04-17 09:59:13 UTC
Attachment 241715 [details] pushed as 4608cb6 - Fix use of uninitialized variables

Also pushed to gnome-3-8 branch