Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Tor Tor
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 319
    • Issues 319
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 37
    • Merge requests 37
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • The Tor Project
  • Core
  • TorTor
  • Issues
  • #40380
Closed
Open
Created May 07, 2021 by Nick Mathewson@nickm🥄Owner

"if clause does not match guard" warning.

With gcc 11.1.1 I get:

../../src/core/or/circuituse.c: In function ‘circuit_predict_and_launch_new’:
../../src/core/or/circuituse.c:1306:5: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
 1306 |     if (router_have_consensus_path() == CONSENSUS_PATH_INTERNAL)
      |     ^~
../../src/lib/log/log.h:274:3: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
  274 |   log_fn_(LOG_INFO, domain, __FUNCTION__, args, ##__VA_ARGS__)

This is a false alarm; the logic works as intended. But I'll fix the indent so the warning goes away.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking