Project

General

Profile

Actions

Bug #14328

closed

cscope-fast: this 'if' clause does not guard...

Added by Toomas Soome 5 months ago. Updated 4 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
tools - gate/build tools
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

Build errors with gcc 11:

    cgrep.c:211:37: error: this 'if' clause does not guard... [-Werror=misleading-indentation]
      211 | #define DEL()   { Link *_l = qhead; if ((qhead = qhead->next) == NULL) \
          |                                     ^~
    cgrep.c:1424:17: note: in expansion of macro 'DEL'
     1424 |                 DEL();
          |                 ^~~
    cgrep.c:212:39: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
      212 |                         qtail = NULL; _l->next = froot; froot = _l; }
          |                                       ^~
    cgrep.c:1424:17: note: in expansion of macro 'DEL'
     1424 |                 DEL();
          |                 ^~~
    cgrep.c: In function 'shift':
    cgrep.c:211:37: error: this 'if' clause does not guard... [-Werror=misleading-indentation]
      211 | #define DEL()   { Link *_l = qhead; if ((qhead = qhead->next) == NULL) \
          |                                     ^~
    cgrep.c:1485:17: note: in expansion of macro 'DEL'
     1485 |                 DEL();
          |                 ^~~
    cgrep.c:212:39: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
      212 |                         qtail = NULL; _l->next = froot; froot = _l; }
          |                                       ^~
    cgrep.c:1485:17: note: in expansion of macro 'DEL'
     1485 |                 DEL();
          |                 ^~~
    cc1: all warnings being treated as errors

Testing done: build/install/boot, wsdiff is showing only ascii differences.

Actions #1

Updated by Electric Monk 5 months ago

  • Gerrit CR set to 1885
Actions #2

Updated by Toomas Soome 4 months ago

  • Description updated (diff)
Actions #3

Updated by Electric Monk 4 months ago

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

git commit dc1259b65efc626c37cd057774d3e3393e84c33c

commit  dc1259b65efc626c37cd057774d3e3393e84c33c
Author: Toomas Soome <tsoome@me.com>
Date:   2022-01-17T21:16:57.000Z

    14328 cscope-fast: this 'if' clause does not guard...
    Reviewed by: Robert Mustacchi <rm@fingolfin.org>
    Approved by: Dan McDonald <danmcd@joyent.com>

Actions

Also available in: Atom PDF