Project

General

Profile

Bug #6999

fix 'Use of uninitialized value $picky in numeric eq (==)' in cstyle

Added by Richard PALO over 3 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Start date:
2016-05-26
Due date:
% Done:

100%

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

Description

noticed in their nightly recently:

Use of uninitialized value $picky in numeric eq (==) at /home/richard/src/illumos-gate/usr/src/tools/proto/root_i386-nd/opt/onbld/bin/cstyle line 433, <GEN0> line 177.

simple fix

 diff --git a/usr/src/tools/scripts/cstyle.pl b/usr/src/tools/scripts/cstyle.pl
 index f4d327e..874235e 100644
 --- a/usr/src/tools/scripts/cstyle.pl
 +++ b/usr/src/tools/scripts/cstyle.pl
 @@ -430,7 +430,7 @@ line: while (<$filehandle>) {
                 $function_header_full_indent = 0;
         }
         if ($in_function_header && /{$/ ) {
 -               if ($picky == 1) {
 +               if ($picky) {
                         err("opening brace on same line as function header");
                 }
                 $in_function_header = 0;

History

#1

Updated by Electric Monk over 3 years ago

  • % Done changed from 0 to 100
  • Status changed from New to Closed

git commit 002ec3e4c3efa65890ba89d290fe2cc209838c12

commit  002ec3e4c3efa65890ba89d290fe2cc209838c12
Author: Richard PALO <richard@NetBSD.org>
Date:   2016-06-03T17:08:39.000Z

    6999 fix 'Use of uninitialized value $picky in numeric eq (==)' in cstyle
    Reviewed by: Garrett D'Amore <garrett@damore.org>
    Approved by: Robert Mustacchi <rm@joyent.com>

Also available in: Atom PDF