svn commit: r340886 - head/sys/dev/sfxge/common

Andrew Rybchenko arybchik at FreeBSD.org
Sat Nov 24 16:29:48 UTC 2018


Author: arybchik
Date: Sat Nov 24 16:29:46 2018
New Revision: 340886
URL: https://svnweb.freebsd.org/changeset/base/340886

Log:
  sfxge(4): fix warnings from VS2015 C compiler (C4244)
  
  Fix level 4 warning
  "C4244: '+=': conversion from 'unsigned int' to 'uint16_t', possible loss
  of data"; no functional changes.
  
  Submitted by:   Andrew Lee <alee at solarflare.com>
  Sponsored by:   Solarflare Communications, Inc.
  MFC after:      1 week
  Differential Revision:  https://reviews.freebsd.org/D18120

Modified:
  head/sys/dev/sfxge/common/efx_vpd.c

Modified: head/sys/dev/sfxge/common/efx_vpd.c
==============================================================================
--- head/sys/dev/sfxge/common/efx_vpd.c	Sat Nov 24 16:29:35 2018	(r340885)
+++ head/sys/dev/sfxge/common/efx_vpd.c	Sat Nov 24 16:29:46 2018	(r340886)
@@ -933,7 +933,7 @@ efx_vpd_hunk_set(
 		}
 
 		/* Modify tag length (large resource type) */
-		taglen += (dest - source);
+		taglen += (uint16_t)(dest - source);
 		EFX_POPULATE_WORD_1(word, EFX_WORD_0, taglen);
 		data[offset - 2] = EFX_WORD_FIELD(word, EFX_BYTE_0);
 		data[offset - 1] = EFX_WORD_FIELD(word, EFX_BYTE_1);


More information about the svn-src-all mailing list