>Number: 144505
>Category: kern
>Synopsis: Error in macro CALC_COEFF2.
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Sat Mar 06 09:40:01 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator: Henning Petersen
>Release: Freebsd-current
>Organization:
>Environment:
>Description:
Error in macro CALC_COEFF2, rename tmp[3] to _v. Found by cppcheck.
>How-To-Repeat:
>Fix:
diff -u -r1.10 if_bwn.c
--- sys/dev/bwn/if_bwn.c 3 Mar 2010 20:06:09 -0000 1.10
+++ sys/dev/bwn/if_bwn.c 6 Mar 2010 09:06:04 -0000
@@ -12910,9 +12910,9 @@
int _t; \
_t = _x - 11; \
if (_t >= 0) \
- tmp[3] = (_y << (31 - _x)) / (_z >> _t); \
+ _v = (_y << (31 - _x)) / (_z >> _t); \
else \
- tmp[3] = (_y << (31 - _x)) / (_z << -_t); \
+ _v = (_y << (31 - _x)) / (_z << -_t); \
} while (0)
struct bwn_phy_lp_iq_est ie;
uint16_t v0, v1;
Patch attached with submission follows:
diff -u -r1.10 if_bwn.c
--- sys/dev/bwn/if_bwn.c 3 Mar 2010 20:06:09 -0000 1.10
+++ sys/dev/bwn/if_bwn.c 6 Mar 2010 09:06:04 -0000
@@ -12910,9 +12910,9 @@
int _t; \
_t = _x - 11; \
if (_t >= 0) \
- tmp[3] = (_y << (31 - _x)) / (_z >> _t); \
+ _v = (_y << (31 - _x)) / (_z >> _t); \
else \
- tmp[3] = (_y << (31 - _x)) / (_z << -_t); \
+ _v = (_y << (31 - _x)) / (_z << -_t); \
} while (0)
struct bwn_phy_lp_iq_est ie;
uint16_t v0, v1;
>Release-Note:
>Audit-Trail:
>Unformatted:
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "[email protected]"