Project

General

Profile

Bug #8196

captoinfo: misleading-indentation

Added by Toomas Soome over 2 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
cmd - userland programs
Start date:
2017-05-10
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:

Description

Building with gcc 6:

captoinfo.c:227:4: error: this 'if' clause does not guard... [-Werror=misleading-indentation]
    if (type != tbool && type != tcancel)
    ^~
captoinfo.c:232:5: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if'
     continue;
     ^~~~~~~~

And so on, quite many of those. The checktermcap() function is testing termcap raw string table against list of the known types, using capsearch() helper to search from specific type list. If the capability name was matched, but the type is not matching, we should emit the warning and pick next capability.

History

#1

Updated by Toomas Soome about 2 years ago

  • Description updated (diff)

Toomas Soome wrote:

Building with gcc 6:

[...]

And so on, quite many of those.

#2

Updated by Electric Monk about 2 years ago

  • Status changed from In Progress to Closed
  • % Done changed from 90 to 100

git commit e673284edbe30663db4830bfc2c74d629ff279e7

commit  e673284edbe30663db4830bfc2c74d629ff279e7
Author: Toomas Soome <tsoome@me.com>
Date:   2017-07-31T18:51:44.000Z

    8196 captoinfo: misleading-indentation
    Reviewed by: Marcel Telka <marcel@telka.sk>
    Reviewed by: Robert Mustacchi <rm@joyent.com>
    Reviewed by: Yuri Pankov <yuripv@gmx.com>
    Approved by: Richard Lowe <richlowe@richlowe.net>

Also available in: Atom PDF