GNOME Bugzilla – Bug 730572
gdm-session-worker.c:2202:12: warning: 'error_code' may be used uninitialized in this function
Last modified: 2014-05-22 16:52:42 UTC
Hi, When building gdm, I'm getting the following warning: gdm-session-worker.c: In function 'state_change_idle': gdm-session-worker.c:2195:12: warning: 'error_code' may be used uninitialized in this function [-Wmaybe-uninitialized] if (error_code != PAM_SUCCESS) { ^ gdm-session-worker.c:2115:13: note: 'error_code' was declared here int error_code; ^ This is due to the 'goto out;' in the function
Created attachment 276998 [details] [review] worker: Don't uninitialize pam before initialized if PostLogin fails This commit cleans up a problem in an error path in open_session (when PostLogin fails). At that point PAM has not been initialized, so we shouldn't uninitialize it.
Attachment 276998 [details] pushed as 39e66b0 - worker: Don't uninitialize pam before initialized if PostLogin fails