You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficserver.apache.org by "Alan M. Carroll (JIRA)" <ji...@apache.org> on 2015/12/17 03:44:46 UTC

[jira] [Resolved] (TS-3208) clang warnings on || 1

     [ https://issues.apache.org/jira/browse/TS-3208?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alan M. Carroll resolved TS-3208.
---------------------------------
    Resolution: Duplicate

> clang warnings on || 1
> ----------------------
>
>                 Key: TS-3208
>                 URL: https://issues.apache.org/jira/browse/TS-3208
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: Management API
>            Reporter: Leif Hedstrom
>            Assignee: Alan M. Carroll
>             Fix For: 6.1.0
>
>
> {code}
> 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)) {
>                                                                                                                                                                                           ^~
>                                                                                                                                                                                           {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)