Project

General

Profile

Bug #5300

cleanup gcc warning for cmd/power

Added by Igor Kozhukhov about 6 years ago. Updated about 6 years ago.

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

100%

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

Description

powerd.c: In function 'autos3_monitor':
powerd.c:400:12: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
   thr_exit((void *) errno);
            ^
powerd.c:410:12: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
   thr_exit((void *) errno);
            ^
powerd.c:425:14: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
     thr_exit((void *) errno);
              ^
powerd.c:433:13: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
    thr_exit((void *) errno);
             ^
cc1: all warnings being treated as errors
*** Error code 1

parse.c: In function 'set_perm':
parse.c:107:3: error: suggest parentheses around assignment used as truth value [-Werror=parentheses]
   for (*tk = '\\0'; tk = strtok(dinfo, ", "); dinfo = NULL) {
   ^
parse.c: In function 'find_line_end':
parse.c:356:2: error: suggest parentheses around assignment used as truth value [-Werror=parentheses]
  while (lf = strchr(next, '\\n')) {
  ^
parse.c: In function 'parse_conf_file':
parse.c:394:2: error: suggest parentheses around assignment used as truth value [-Werror=parentheses]
  while (lend = find_line_end(line, &linc)) {
  ^
parse.c:432:3: error: suggest parentheses around assignment used as truth value [-Werror=parentheses]
   else if (cnt = build_args(cline, cline + llen)) {
   ^
cc1: all warnings being treated as errors
*** Error code 1

handlers.c: In function 'devpath':
handlers.c:588:2: error: suggest parentheses around assignment used as truth value [-Werror=parentheses]
  if (cp = strchr(src, ':')) {
  ^
handlers.c: In function 'vlist_append':
handlers.c:717:2: error: suggest parentheses around assignment used as truth value [-Werror=parentheses]
  if (*vlistp = realloc(*vlistp, *vcntp * sizeof (**vlistp)))
  ^
handlers.c: In function 'get_thresh':
handlers.c:744:4: error: suggest parentheses around assignment used as truth value [-Werror=parentheses]
    if (nerr = vlist_append(vlistp, vcntp, 0))
    ^
cc1: all warnings being treated as errors
*** Error code 1

#1

Updated by Igor Kozhukhov about 6 years ago

  • % Done changed from 0 to 90
#2

Updated by Igor Kozhukhov about 6 years ago

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

Updated by Electric Monk about 6 years ago

  • Status changed from Pending RTI to Closed

git commit 5009f7885e2c6a7e13fe9ad876bd812add4754ef

commit  5009f7885e2c6a7e13fe9ad876bd812add4754ef
Author: Igor Kozhukhov <ikozhukhov@gmail.com>
Date:   2014-11-13T14:14:41.000Z

    5300 cleanup gcc warning for cmd/power
    Reviewed by: Gary Mills <gary_mills@fastmail.fm>
    Reviewed by: Keith Wesolowski <keith.wesolowski@joyent.com>
    Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
    Approved by: Dan McDonald <danmcd@omniti.com>

Also available in: Atom PDF