Project

General

Profile

Actions

Bug #5278

closed

cleanup gcc warnings for cmd/ps

Added by Igor Kozhukhov almost 7 years ago. Updated almost 7 years ago.

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

100%

Estimated time:
Difficulty:
Medium
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=gnu89 -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.update/proto/root_i386/usr/include -c ../ps.c

../ps.c: In function 'stdmain':
../ps.c:914:3: error: suggest parentheses around assignment used as truth value [-Werror=parentheses]
   while (dentp = readdir(dirp)) {
   ^
cc1: all warnings being treated as errors
*** Error code 1

+ /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=gnu89 -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.update/proto/root_i386/usr/include -c ../ucbps.c 
../ucbps.c: In function 'ucbmain':
../ucbps.c:399:2: error: suggest parentheses around assignment used as truth value [-Werror=parentheses]
  while (dentp = readdir(dirp)) {
  ^
cc1: all warnings being treated as errors
*** Error code 1

+ /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=gnu89 -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.update/proto/root_i386/usr/include -c ../ps.c 
../ps.c: In function 'print_field':
../ps.c:1938:11: error: 'csave' may be used uninitialized in this function [-Werror=maybe-uninitialized]
    *csave = c;
           ^
../ps.c:1938:11: error: 'c' may be used uninitialized in this function [-Werror=maybe-uninitialized]
cc1: all warnings being treated as errors
*** Error code 1
Actions

Also available in: Atom PDF