summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorarybchik <arybchik@FreeBSD.org>2016-01-14 15:22:31 +0000
committerarybchik <arybchik@FreeBSD.org>2016-01-14 15:22:31 +0000
commit20128444ffd3d71b7a7555736546bbd9e797422a (patch)
tree2462fb6059d65ee0b6e3b1ae90b82dccf3c60009
parente087672a4ccfbca0f5d1cac22e12f43fb3451030 (diff)
downloadFreeBSD-src-20128444ffd3d71b7a7555736546bbd9e797422a.zip
FreeBSD-src-20128444ffd3d71b7a7555736546bbd9e797422a.tar.gz
MFC r291926
sfxge: fix pointer parameter/value signedness mismatch warnings TLV routines use 'uint8_t *', NVRAM code uses caddr_t. Just cast to required type to fix the warning. Required to build with -Werror=pointer-signg. Reviewed by: gnn Sponsored by: Solarflare Communications, Inc.
-rw-r--r--sys/dev/sfxge/common/hunt_nvram.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/sys/dev/sfxge/common/hunt_nvram.c b/sys/dev/sfxge/common/hunt_nvram.c
index e344259..c25fa10 100644
--- a/sys/dev/sfxge/common/hunt_nvram.c
+++ b/sys/dev/sfxge/common/hunt_nvram.c
@@ -497,7 +497,7 @@ efx_nvram_tlv_validate(
}
/* The partition header must be the first item (at offset zero) */
- if ((rc = tlv_init_cursor_from_size(&cursor, partn_data,
+ if ((rc = tlv_init_cursor_from_size(&cursor, (uint8_t *)partn_data,
partn_size)) != 0) {
rc = EFAULT;
goto fail2;
@@ -607,7 +607,7 @@ hunt_nvram_read_tlv_segment(
}
/* A PARTITION_HEADER tag must be the first item at the given offset */
- if ((rc = tlv_init_cursor_from_size(&cursor, seg_data,
+ if ((rc = tlv_init_cursor_from_size(&cursor, (uint8_t *)seg_data,
max_seg_size)) != 0) {
rc = EFAULT;
goto fail3;
@@ -725,7 +725,7 @@ hunt_nvram_buf_read_tlv(
}
/* Find requested TLV tag in segment data */
- if ((rc = tlv_init_cursor_from_size(&cursor, seg_data,
+ if ((rc = tlv_init_cursor_from_size(&cursor, (uint8_t *)seg_data,
max_seg_size)) != 0) {
rc = EFAULT;
goto fail2;
@@ -734,7 +734,7 @@ hunt_nvram_buf_read_tlv(
rc = ENOENT;
goto fail3;
}
- value = tlv_value(&cursor);
+ value = (caddr_t)tlv_value(&cursor);
length = tlv_length(&cursor);
if (length == 0)
@@ -859,7 +859,7 @@ hunt_nvram_buf_segment_size(
uint32_t segment_length;
/* A PARTITION_HEADER tag must be the first item at the given offset */
- if ((rc = tlv_init_cursor_from_size(&cursor, seg_data,
+ if ((rc = tlv_init_cursor_from_size(&cursor, (uint8_t *)seg_data,
max_seg_size)) != 0) {
rc = EFAULT;
goto fail1;
@@ -993,7 +993,7 @@ hunt_nvram_buf_write_tlv(
efx_rc_t rc;
/* A PARTITION_HEADER tag must be the first item (at offset zero) */
- if ((rc = tlv_init_cursor_from_size(&cursor, seg_data,
+ if ((rc = tlv_init_cursor_from_size(&cursor, (uint8_t *)seg_data,
max_seg_size)) != 0) {
rc = EFAULT;
goto fail1;
@@ -1008,7 +1008,7 @@ hunt_nvram_buf_write_tlv(
if ((rc = tlv_find(&cursor, tag)) == 0) {
/* Modify existing TLV item */
if ((rc = tlv_modify(&cursor, tag,
- tag_data, tag_size)) != 0)
+ (uint8_t *)tag_data, tag_size)) != 0)
goto fail3;
} else {
/* Insert a new TLV item before the PARTITION_TRAILER */
@@ -1018,7 +1018,7 @@ hunt_nvram_buf_write_tlv(
goto fail4;
}
if ((rc = tlv_insert(&cursor, tag,
- tag_data, tag_size)) != 0) {
+ (uint8_t *)tag_data, tag_size)) != 0) {
rc = EINVAL;
goto fail5;
}
OpenPOWER on IntegriCloud