Project

General

Profile

Bug #5334

cleanup gcc warning for cmd/savecore

Added by Igor Kozhukhov over 5 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Category:
-
Start date:
2014-11-14
Due date:
% Done:

100%

Estimated time:
Difficulty:
Bite-size
Tags:
needs-triage
Gerrit CR:

Description

+ /usr/gcc/4.8/bin/gcc -fident -finline -fno-inline-functions -fno-builtin -fno-asm -fdiagnostics-show-option -nodefaultlibs -D__sun -O -m32 -Wall -Wextra -Werror -Wno-missing-braces -Wno-sign-compare -Wno-unknown-pragmas -Wno-unused-parameter -Wno-missing-field-initializers -Wno-array-bounds -Wno-unused-local-typedefs -std=gnu99 -fno-inline-small-functions -fno-inline-functions-called-once -fno-ipa-cp -DTEXT_DOMAIN="SUNW_OST_OSCMD" -D_TS_ERRNO -I/myshare/builds/ssd02/builds/dilos-illumos.lx/proto/root_i386/usr/include -D_LARGEFILE64_SOURCE=1 -DBZ_NO_STDIO -I/myshare/builds/ssd02/builds/dilos-illumos.lx/usr/src/uts/common -c -I/myshare/builds/ssd02/builds/dilos-illumos.lx/usr/src/common ../savecore.c 
../savecore.c: In function 'build_dump_map':
../savecore.c:474:6: error: 'pfn' may be used uninitialized in this function [-Werror=maybe-uninitialized]
   if (pfn != vtop.m_pfn) {
      ^
../savecore.c:485:8: error: 'middle' may be used uninitialized in this function [-Werror=maybe-uninitialized]
       ((uint64_t)middle << corehdr.dump_pageshift);
        ^
../savecore.c: In function 'decompress_pages':
../savecore.c:846:23: error: 'nout' may be used uninitialized in this function [-Werror=maybe-uninitialized]
 #define PTOB(p)  ((p) << dumphdr.dump_pageshift)
                       ^
../savecore.c:1198:6: note: 'nout' was declared here
  int nout, tag, doflush;
      ^
../savecore.c:1291:16: error: 'curpage' may be used uninitialized in this function [-Werror=maybe-uninitialized]
        isblkbnd(curpage + nout) ||
                ^
cc1: all warnings being treated as errors
*** Error code 1
dmake: Fatal error: Command failed for target `savecore.o'

History

#1

Updated by Igor Kozhukhov over 5 years ago

+ /usr/gcc/4.8/bin/gcc -fident -finline -fno-inline-functions -fno-builtin -fno-asm -fdiagnostics-show-option -nodefaultlibs -D__sun -O -m32 -Wall -Wextra -Werror -Wno-missing-braces -Wno-sign-compare -Wno-unknown-pragmas -Wno-unused-parameter -Wno-missing-field-initializers -Wno-array-bounds -std=gnu99 -fno-inline-small-functions -fno-inline-functions-called-once -fno-ipa-cp -DTEXT_DOMAIN="SUNW_OST_OSCMD" -D_TS_ERRNO -I/myshare/builds/ssd02/builds/dilos-illumos.lx/proto/root_i386/usr/include -D_LARGEFILE64_SOURCE=1 -DBZ_NO_STDIO -I/myshare/builds/ssd02/builds/dilos-illumos.lx/usr/src/uts/common -c ../../../uts/common/os/compress.c 
../../../uts/common/os/compress.c: In function 'compress':
../../../uts/common/os/compress.c:162:13: error: 'copymap' may be used uninitialized in this function [-Werror=maybe-uninitialized]
    *copymap |= copymask;
             ^
../../../uts/common/os/compress.c: In function 'decompress':
../../../uts/common/os/compress.c:199:15: error: 'copymap' may be used uninitialized in this function [-Werror=maybe-uninitialized]
   if (copymap & copymask) {
               ^
cc1: all warnings being treated as errors
*** Error code 1
dmake: Fatal error: Command failed for target `compress.o'

+ /usr/gcc/4.8/bin/gcc -fident -finline -fno-inline-functions -fno-builtin -fno-asm -fdiagnostics-show-option -nodefaultlibs -D__sun -O -m32 -Wall -Wextra -Werror -Wno-missing-braces -Wno-sign-compare -Wno-unknown-pragmas -Wno-unused-parameter -Wno-missing-field-initializers -Wno-array-bounds -std=gnu99 -fno-inline-small-functions -fno-inline-functions-called-once -fno-ipa-cp -DTEXT_DOMAIN="SUNW_OST_OSCMD" -D_TS_ERRNO -I/myshare/builds/ssd02/builds/dilos-illumos.lx/proto/root_i386/usr/include -D_LARGEFILE64_SOURCE=1 -DBZ_NO_STDIO -I/myshare/builds/ssd02/builds/dilos-illumos.lx/usr/src/uts/common -c -o bz2compress.o -I/myshare/builds/ssd02/builds/dilos-illumos.lx/usr/src/common -I/myshare/builds/ssd02/builds/dilos-illumos.lx/usr/src/common/bzip2 ../../../common/bzip2/compress.c 
../../../common/bzip2/compress.c: In function 'sendMTFValues':
../../../common/bzip2/compress.c:243:19: error: variable 'nBytes' set but not used [-Werror=unused-but-set-variable]
    Int32 nGroups, nBytes;
                   ^
cc1: all warnings being treated as errors
*** Error code 1
dmake: Fatal error: Command failed for target `bz2compress.o'
#2

Updated by Igor Kozhukhov over 5 years ago

  • % Done changed from 0 to 90
  • Difficulty changed from Medium to Bite-size
#3

Updated by Igor Kozhukhov over 5 years ago

  • Status changed from In Progress to Pending RTI
  • % Done changed from 90 to 100
#4

Updated by Electric Monk over 5 years ago

  • Status changed from Pending RTI to Closed

git commit 6d89ca534e2138511ecb76c02bcec1bcb83f685b

commit  6d89ca534e2138511ecb76c02bcec1bcb83f685b
Author: Igor Kozhukhov <ikozhukhov@gmail.com>
Date:   2014-11-23T18:07:30.000Z

    5334 cleanup gcc warning for cmd/savecore
    Reviewed by: Keith Wesolowski <keith.wesolowski@joyent.com>
    Approved by: Dan McDonald <danmcd@omniti.com>

Also available in: Atom PDF