svn commit: r305556 - in stable: 10/sys/dev/cxgb 11/sys/dev/cxgb 9/sys/dev/cxgb

Dimitry Andric dim at FreeBSD.org
Wed Sep 7 19:17:05 UTC 2016


Author: dim
Date: Wed Sep  7 19:17:03 2016
New Revision: 305556
URL: https://svnweb.freebsd.org/changeset/base/305556

Log:
  MFC r305360:
  
  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
  Differential Revision: https://reviews.freebsd.org/D7772

Modified:
  stable/9/sys/dev/cxgb/cxgb_sge.c
Directory Properties:
  stable/9/   (props changed)
  stable/9/sys/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/10/sys/dev/cxgb/cxgb_sge.c
  stable/11/sys/dev/cxgb/cxgb_sge.c
Directory Properties:
  stable/10/   (props changed)
  stable/11/   (props changed)

Modified: stable/9/sys/dev/cxgb/cxgb_sge.c
==============================================================================
--- stable/9/sys/dev/cxgb/cxgb_sge.c	Wed Sep  7 19:02:47 2016	(r305555)
+++ stable/9/sys/dev/cxgb/cxgb_sge.c	Wed Sep  7 19:17:03 2016	(r305556)
@@ -2876,7 +2876,7 @@ process_responses(adapter_t *adap, struc
 
                         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++;


More information about the svn-src-stable-9 mailing list