Project

General

Profile

Actions

Bug #13790

open

krb5: variable may be used uninitialized

Added by Toomas Soome about 1 month ago. Updated about 1 month ago.

Status:
In Progress
Priority:
Normal
Assignee:
Category:
cmd - userland programs
Start date:
Due date:
% Done:

90%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

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

Actions #1

Updated by Electric Monk about 1 month ago

  • Gerrit CR set to 1477
Actions

Also available in: Atom PDF