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 730572 - gdm-session-worker.c:2202:12: warning: 'error_code' may be used uninitialized in this function
gdm-session-worker.c:2202:12: warning: 'error_code' may be used uninitialized...
Status: RESOLVED FIXED
Product: gdm
Classification: Core
Component: general
3.12.x
Other Linux
: Normal normal
: ---
Assigned To: GDM maintainers
GDM maintainers
Depends on:
Blocks:
 
 
Reported: 2014-05-22 10:34 UTC by Laurent Bigonville
Modified: 2014-05-22 16:52 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
worker: Don't uninitialize pam before initialized if PostLogin fails (3.05 KB, patch)
2014-05-22 16:31 UTC, Ray Strode [halfline]
committed Details | Review

Description Laurent Bigonville 2014-05-22 10:34:11 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
Comment 1 Ray Strode [halfline] 2014-05-22 16:31:41 UTC
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.
Comment 2 Ray Strode [halfline] 2014-05-22 16:52:39 UTC
Attachment 276998 [details] pushed as 39e66b0 - worker: Don't uninitialize pam before initialized if PostLogin fails