Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 7 Sep 2016 19:17:04 +0000 (UTC)
From:      Dimitry Andric <dim@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r305556 - in stable: 10/sys/dev/cxgb 11/sys/dev/cxgb 9/sys/dev/cxgb
Message-ID:  <201609071917.u87JH4fJ033025@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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/10/sys/dev/cxgb/cxgb_sge.c
Directory Properties:
  stable/10/   (props changed)

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

Modified: stable/10/sys/dev/cxgb/cxgb_sge.c
==============================================================================
--- stable/10/sys/dev/cxgb/cxgb_sge.c	Wed Sep  7 19:02:47 2016	(r305555)
+++ stable/10/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++;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201609071917.u87JH4fJ033025>