Actions
Bug #13753
closedsvr4pkg: variable may be used uninitialized
Start date:
Due date:
% Done:
100%
Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
External Bug:
Description
Build errors:
splpkgmap.c: In function 'store': splpkgmap.c:406: error: 'svnodes' may be used uninitialized in this function [-Wuninitialized] *** Error code 1 dmake: Fatal error: Command failed for target `splpkgmap.o' Current working directory /code/illumos-gate/usr/src/cmd/svr4pkg/pkgmk pkgdbmerg.c: In function 'do_like_ent': pkgdbmerg.c:292: error: 'mrg_result' may be used uninitialized in this function [-Wuninitialized] *** Error code 1 dmake: Fatal error: Command failed for target `pkgdbmerg.o' Current working directory /code/illumos-gate/usr/src/cmd/svr4pkg/libinst mntinfo.c: In function 'mount_client': mntinfo.c:440: error: 'errcode' may be used uninitialized in this function [-Wuninitialized] mntinfo.c: In function 'unmount_client': mntinfo.c:320: error: 'errcode' may be used uninitialized in this function [-Wuninitialized] *** Error code 1 dmake: Fatal error: Command failed for target `mntinfo.o' Current working directory /code/illumos-gate/usr/src/cmd/svr4pkg/libinst main.c: In function 'rmclass': main.c:1205:11: error: 'fp' may be used uninitialized in this function [-Werror=maybe-uninitialized] 1205 | (void) fprintf(fp, "%s\n", ept->path); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors main.c: In function 'main': main.c:345:12: error: 'dvalue' may be used uninitialized in this function [-Werror=maybe-uninitialized] 345 | device = flex_device(dvalue, 1); | ^~~~~~~~~~~~~~~~~~~~~~ main.c:338:8: error: 'Rvalue' may be used uninitialized in this function [-Werror=maybe-uninitialized] 338 | if (!set_inst_root(Rvalue)) { | ^~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors ckentry.c: In function 'xdir': ckentry.c:256:27: error: 'pos' may be used uninitialized in this function [-Werror=maybe-uninitialized] 256 | vfpGetCurrCharPtr(vfp) = pos; ocfile.c: In function 'pkgWlock': ocfile.c:614:5: error: 'retval' may be used uninitialized in this function [-Werror=maybe-uninitialized] 614 | if (retval == 0) { | ^ cc1: all warnings being treated as errors lock.c: In function '_lockMatch': lock.c:1488:19: error: 's2Cnt' may be used uninitialized in this function [-Werror=maybe-uninitialized] 1488 | if ((s1Cnt == 0) && (s2Cnt == 0)) { | ~~~~~~~~~~~~~^~~~~~~~~~~~~~~ cc1: all warnings being treated as errors lock.c: In function 'admin_lock': lock.c:453:24: error: 'rs' may be used uninitialized in this function [-Werror=maybe-uninitialized] return (rx == rs ? 0 : 1); ~~~~~~~~~~~~~~^~~~ cc1: all warnings being treated as errors *** Error code 1 dmake: Fatal error: Command failed for target `lock.o' Current working directory /code/illumos-gate/usr/src/cmd/svr4pkg/pkgadm
Got some errors with shadow gcc 7, cleaning it all up.
Related issues
Updated by Toomas Soome about 2 years ago
- Related to Feature #13771: util-tests: create svr4pkg tests added
Updated by Electric Monk about 2 years ago
- Status changed from In Progress to Closed
- % Done changed from 90 to 100
git commit 014740def2fccbcada139c94bad0664bfc172ab5
commit 014740def2fccbcada139c94bad0664bfc172ab5 Author: Toomas Soome <tsoome@me.com> Date: 2021-05-03T15:07:59.000Z 13753 svr4pkg: variable may be used uninitialized Reviewed by: C Fraire <cfraire@me.com> Reviewed by: Peter Tribble <peter.tribble@gmail.com> Approved by: Dan McDonald <danmcd@joyent.com>
Actions