mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-15 12:54:27 +00:00
With clang 3.9.0, compiling cxgb results in the following warning:
sys/dev/cxgb/cxgb_sge.c:2873:44: error: implicit conversion from 'int' to 'char' changes value from 128 to -128 [-Werror,-Wconstant-conversion] *mtod(m, char *) = CPL_ASYNC_NOTIF; ~ ^~~~~~~~~~~~~~~ This is because CPL_ASYNC_NOTIF is 0x80, so the plain char argument is wrapped to a negative value. Fix this by using uint8_t instead. Reviewed by: np MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D7772
This commit is contained in:
parent
5a63431265
commit
2db7b9f259
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=305360
|
@ -2870,7 +2870,7 @@ process_responses(adapter_t *adap, struct sge_qset *qs, int budget)
|
|||
|
||||
memcpy(mtod(m, char *), r, AN_PKT_SIZE);
|
||||
m->m_len = m->m_pkthdr.len = AN_PKT_SIZE;
|
||||
*mtod(m, char *) = CPL_ASYNC_NOTIF;
|
||||
*mtod(m, uint8_t *) = CPL_ASYNC_NOTIF;
|
||||
opcode = CPL_ASYNC_NOTIF;
|
||||
eop = 1;
|
||||
rspq->async_notif++;
|
||||
|
|
Loading…
Reference in a new issue