------- Comment #3 from corinl at gmx dot de 2009-02-12 07:26 ------- Thanks for the info. Unluckily I just found the bug reported first now for sure:
Code: // setuid/setgid only affect the current thread #define FS_PERMS_SET(_uid, _gid) \ bool check_permissions_local = check_permissions; \ uid_t fs_perms_uid_orig; \ gid_t fs_perms_gid_orig; \ if (check_permissions_local) \ { \ fs_perms_uid_orig = setfsuid(_uid); \ fs_perms_gid_orig = setfsgid(_gid); \ } // setuid/setgid only affect the current thread #define FS_PERMS_RESTORE() \ if (check_permissions_local) \ { \ setfsuid(fs_perms_uid_orig); \ setfsgid(fs_perms_gid_orig); \ } #define FOP_ERRNO(R) out->op_errno=((R==0)?0:errno) ... line 934: FS_PERMS_SET(in->uid, in->gid); FOP_ERRNO(statvfs(path, &out->stbuf)); FS_PERMS_RESTORE(); ... Error report: main.cpp:934: Warnung: »fs_perms_gid_orig« könnte in dieser Funktion uninitialisiert verwendet werden main.cpp:934: Warnung: »fs_perms_uid_orig« könnte in dieser Funktion uninitialisiert verwendet werden This is not true, as at this point the variables are only written to. They are only ever read (and even later) if they have first been written to. -- corinl at gmx dot de changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |UNCONFIRMED Resolution|FIXED | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39133