mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 10:37:35 +03:00
Fix gcc cast warnings
Gcc -Wall warn: 'lacks a cast' Gcc -Wall warn: 'comparison between pointer and integer' Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
This commit is contained in:
@@ -210,7 +210,7 @@ NVLIST_PRTFUNC(int32, int32_t, int32_t, "%d")
|
||||
NVLIST_PRTFUNC(uint32, uint32_t, uint32_t, "0x%x")
|
||||
NVLIST_PRTFUNC(int64, int64_t, longlong_t, "%lld")
|
||||
NVLIST_PRTFUNC(uint64, uint64_t, u_longlong_t, "0x%llx")
|
||||
NVLIST_PRTFUNC(double, double, double, "0x%llf")
|
||||
NVLIST_PRTFUNC(double, double, double, "0x%f")
|
||||
NVLIST_PRTFUNC(string, char *, char *, "%s")
|
||||
NVLIST_PRTFUNC(hrtime, hrtime_t, hrtime_t, "0x%llx")
|
||||
|
||||
@@ -1216,7 +1216,7 @@ nvpair_value_match_regex(nvpair_t *nvp, int ai,
|
||||
boolean_t val, val_arg;
|
||||
|
||||
/* scanf boolean_t from value and check for match */
|
||||
sr = sscanf(value, "%"SCNi32, &val_arg);
|
||||
sr = sscanf(value, "%"SCNi32, (int32_t *)&val_arg);
|
||||
if ((sr == 1) &&
|
||||
(nvpair_value_boolean_value(nvp, &val) == 0) &&
|
||||
(val == val_arg))
|
||||
@@ -1227,7 +1227,7 @@ nvpair_value_match_regex(nvpair_t *nvp, int ai,
|
||||
boolean_t *val_array, val_arg;
|
||||
|
||||
/* check indexed value of array for match */
|
||||
sr = sscanf(value, "%"SCNi32, &val_arg);
|
||||
sr = sscanf(value, "%"SCNi32, (int32_t *)&val_arg);
|
||||
if ((sr == 1) &&
|
||||
(nvpair_value_boolean_array(nvp,
|
||||
&val_array, &a_len) == 0) &&
|
||||
|
||||
Reference in New Issue
Block a user