mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-23 10:54:35 +03:00
Enable -Wwrite-strings
Also, fix leak from ztest_global_vars_to_zdb_args() Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes #13348
This commit is contained in:
@@ -1002,8 +1002,6 @@ kmem_cache_reap_active(void)
|
||||
return (0);
|
||||
}
|
||||
|
||||
void *zvol_tag = "zvol_tag";
|
||||
|
||||
void
|
||||
zvol_create_minor(const char *name)
|
||||
{
|
||||
|
||||
+3
-2
@@ -64,7 +64,8 @@ show_vdev_stats(const char *desc, const char *ctype, nvlist_t *nv, int indent)
|
||||
}
|
||||
|
||||
if (desc != NULL) {
|
||||
char *suffix = "", *bias = NULL;
|
||||
const char *suffix = "";
|
||||
char *bias = NULL;
|
||||
char bias_suffix[32];
|
||||
|
||||
(void) nvlist_lookup_uint64(nv, ZPOOL_CONFIG_IS_LOG, &is_log);
|
||||
@@ -117,7 +118,7 @@ show_vdev_stats(const char *desc, const char *ctype, nvlist_t *nv, int indent)
|
||||
int len;
|
||||
if (nvlist_lookup_string(cnv, ZPOOL_CONFIG_PATH, &cname) &&
|
||||
nvlist_lookup_string(cnv, ZPOOL_CONFIG_TYPE, &cname))
|
||||
cname = "<unknown>";
|
||||
cname = (char *)"<unknown>";
|
||||
len = strlen(cname) + 2;
|
||||
tname = umem_zalloc(len, UMEM_NOFAIL);
|
||||
(void) strlcpy(tname, cname, len);
|
||||
|
||||
Reference in New Issue
Block a user