Uploaded image for project: 'Traffic Server'
  1. Traffic Server
  2. TS-3208

clang warnings on || 1

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • None
    • None
    • Management API
    • None

    Description

      CoreAPI.cc:368:187: warning: use of logical '||' with constant operand [-Wconstant-logical-operand]
        if ((threads).n) for (pid_t *qq__threadid = (pid_t*)0, threadid = (threads).v[0]; ((uintptr_t)(qq__threadid) < (threads).length()) && ((threadid = (threads).v[(intptr_t)qq__threadid]) || 1); qq__threadid = (pid_t*)(((intptr_t)qq__threadid) + 1)) {
                                                                                                                                                                                                ^  ~
      CoreAPI.cc:368:187: note: use '|' for a bitwise operation
        if ((threads).n) for (pid_t *qq__threadid = (pid_t*)0, threadid = (threads).v[0]; ((uintptr_t)(qq__threadid) < (threads).length()) && ((threadid = (threads).v[(intptr_t)qq__threadid]) || 1); qq__threadid = (pid_t*)(((intptr_t)qq__threadid) + 1)) {
                                                                                                                                                                                                ^~
                                                                                                                                                                                                

      Attachments

        Issue Links

          Activity

            People

              amc Alan M. Carroll
              zwoop Leif Hedstrom
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: