Actions
Bug #13790
closedkrb5: variable may be used uninitialized
Start date:
Due date:
% Done:
100%
Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
External Bug:
Description
Build errors with gcc10/shadow gcc 7:
kprop.c: In function 'open_connection': kprop.c:427:3: error: 'which_err' may be used uninitialized in this function [-Werror=maybe-uninitialized] switch (which_err) { ^~~~~~ kprop.c:444:9: error: 'retval' may be used uninitialized in this function [-Werror=maybe-uninitialized] return(retval); ^ cc1: all warnings being treated as errors *** Error code 1 dmake: Fatal error: Command failed for target `kprop.o' Current working directory /code/illumos-gate/usr/src/cmd/krb5/slave kconf.c: In function 'main': kconf.c:164:7: error: 'file' may be used uninitialized in this function [-Werror=maybe-uninitialized] code = __profile_init(file, &profile); ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ kconf.c:199:7: error: 'domain' may be used uninitialized in this function [-Werror=maybe-uninitialized] code = __profile_add_domain_mapping(profile, domain, realm); ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ kconf.c:191:7: error: 'master' may be used uninitialized in this function [-Werror=maybe-uninitialized] code = __profile_add_realm(profile, realm, master, ret_values, ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ set_change, TRUE); ~~~~~~~~~~~~~~~~~ kconf.c:174:8: error: 'kdcs' may be used uninitialized in this function [-Werror=maybe-uninitialized] token = strtok_r(kdcs, ",", &lasts); ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ kconf.c:199:7: error: 'realm' may be used uninitialized in this function [-Werror=maybe-uninitialized] code = __profile_add_domain_mapping(profile, domain, realm); ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors *** Error code 1 make: Fatal error: Command failed for target `kconf.o' Current working directory /code/illumos-gate/usr/src/cmd/krb5/kadmin/kclient ksetpw.c: In function 'main': ksetpw.c:248:3: error: 'enctypes' may be used uninitialized in this function [-Werror=maybe-uninitialized] 248 | kt_add_entry(ctx, kt, victim, salt, enctypes[i], kvno, newpw); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors klookup.c: In function 'main': klookup.c:199:5: error: 'type' may be used uninitialized in this function [-Werror=maybe-uninitialized] if (type != T_SRV && !(typestr && *typestr == 'I')) ^ cc1: all warnings being treated as errors *** Error code 1 dmake: Fatal error: Command failed for target `klookup.o' Current working directory /code/illumos-gate/usr/src/cmd/krb5/kadmin/kdcmgr
Testing done: build/install/boot
Updated by Electric Monk almost 2 years ago
- Status changed from In Progress to Closed
- % Done changed from 90 to 100
git commit ff67a31b6b184e832f89a53763c02c35bd1a7291
commit ff67a31b6b184e832f89a53763c02c35bd1a7291 Author: Toomas Soome <tsoome@me.com> Date: 2021-08-10T06:13:29.000Z 13790 krb5: variable may be used uninitialized Reviewed by: C Fraire <cfraire@me.com> Reviewed by: Jason King <jason.brian.king@gmail.com> Approved by: Dan McDonald <danmcd@joyent.com>
Actions