Author: arybchik
Date: Sat Nov 24 16:30:34 2018
New Revision: 340890
URL: https://svnweb.freebsd.org/changeset/base/340890

Log:
  sfxge(4): fix warnings from VS2015 C compiler (C4057)
  
  Fix two level 4 warnings
  "C4057: 'function': 'const uint8_t *' differs in indirection to
  slightly different base types from 'caddr_t'"; 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/D18124

Modified:
  head/sys/dev/sfxge/common/efx.h
  head/sys/dev/sfxge/common/efx_bootcfg.c

Modified: head/sys/dev/sfxge/common/efx.h
==============================================================================
--- head/sys/dev/sfxge/common/efx.h     Sat Nov 24 16:30:22 2018        
(r340889)
+++ head/sys/dev/sfxge/common/efx.h     Sat Nov 24 16:30:34 2018        
(r340890)
@@ -1510,13 +1510,13 @@ efx_bootcfg_copy_sector(
 extern                         efx_rc_t
 efx_bootcfg_read(
        __in                    efx_nic_t *enp,
-       __out_bcount(size)      caddr_t data,
+       __out_bcount(size)      uint8_t *data,
        __in                    size_t size);
 
 extern                         efx_rc_t
 efx_bootcfg_write(
        __in                    efx_nic_t *enp,
-       __in_bcount(size)       caddr_t data,
+       __in_bcount(size)       uint8_t *data,
        __in                    size_t size);
 
 #endif /* EFSYS_OPT_BOOTCFG */

Modified: head/sys/dev/sfxge/common/efx_bootcfg.c
==============================================================================
--- head/sys/dev/sfxge/common/efx_bootcfg.c     Sat Nov 24 16:30:22 2018        
(r340889)
+++ head/sys/dev/sfxge/common/efx_bootcfg.c     Sat Nov 24 16:30:34 2018        
(r340890)
@@ -295,7 +295,7 @@ fail1:
                                efx_rc_t
 efx_bootcfg_read(
        __in                    efx_nic_t *enp,
-       __out_bcount(size)      caddr_t data,
+       __out_bcount(size)      uint8_t *data,
        __in                    size_t size)
 {
        uint8_t *payload = NULL;
@@ -358,7 +358,7 @@ efx_bootcfg_read(
                goto fail7;
 
        /* Verify that the area is correctly formatted and checksummed */
-       rc = efx_bootcfg_verify(enp, (caddr_t)payload, sector_length,
+       rc = efx_bootcfg_verify(enp, payload, sector_length,
            &used_bytes);
        if (rc != 0 || used_bytes == 0) {
                payload[0] = (uint8_t)(~DHCP_END & 0xff);
@@ -435,7 +435,7 @@ fail1:
                                efx_rc_t
 efx_bootcfg_write(
        __in                    efx_nic_t *enp,
-       __in_bcount(size)       caddr_t data,
+       __in_bcount(size)       uint8_t *data,
        __in                    size_t size)
 {
        uint8_t *partn_data;
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to