Bug 177156 - [patch] Fixing clang warnings at /sys/dev/oce
Summary: [patch] Fixing clang warnings at /sys/dev/oce
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: Unspecified
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-20 20:40 UTC by Hiren Panchasara
Modified: 2019-02-18 02:04 UTC (History)
1 user (show)

See Also:


Attachments
file.diff (853 bytes, patch)
2013-03-20 20:40 UTC, Hiren Panchasara
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Hiren Panchasara 2013-03-20 20:40:00 UTC
===> oce (all)
/usr/src/sys/modules/oce/../../dev/oce/oce_mbox.c:1803:25: warning: comparison of constant 4095 with expression of type 'enum cq_len' is always false [-Wtautological-constant-out-of-range-compare]
                        if (cq->cq_cfg.q_len > (4*1024)-1)
                            ~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~
1 warning generated.

Here q_len looks like this:

enum cq_len {
        CQ_LEN_256  = 256,
        CQ_LEN_512  = 512,
        CQ_LEN_1024 = 1024
};

How-To-Repeat: cd sys/modules/oce/ and do "make" to see clang warning.
Comment 1 Hiren Panchasara 2013-03-20 20:42:40 UTC
+ luigi to make sure that the fix is correct.

On Wed, Mar 20, 2013 at 1:40 PM,  <FreeBSD-gnats-submit@freebsd.org> wrote:
> Thank you very much for your problem report.
> It has the internal identification `kern/177156'.
> The individual assigned to look at your
> report is: freebsd-bugs.
>
> You can access the state of your problem report at any time
> via this link:
>
> http://www.freebsd.org/cgi/query-pr.cgi?pr=177156
>
>>Category:       kern
>>Responsible:    freebsd-bugs
>>Synopsis:       [patch] Fixing clang warnings at /sys/dev/oce
>>Arrival-Date:   Wed Mar 20 20:40:00 UTC 2013
Comment 2 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 07:58:54 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped
Comment 3 Andriy Voskoboinyk freebsd_committer freebsd_triage 2019-02-18 02:04:45 UTC
Should be fixed in base r269693