mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +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:
@@ -328,7 +328,9 @@ zpool_find_import_blkid(libpc_handle_t *hdl, pthread_mutex_t *lock,
|
||||
return (EINVAL);
|
||||
}
|
||||
|
||||
error = blkid_dev_set_search(iter, "TYPE", "zfs_member");
|
||||
/* Only const char *s since 2.32 */
|
||||
error = blkid_dev_set_search(iter,
|
||||
(char *)"TYPE", (char *)"zfs_member");
|
||||
if (error != 0) {
|
||||
blkid_dev_iterate_end(iter);
|
||||
blkid_put_cache(cache);
|
||||
|
||||
@@ -1543,7 +1543,7 @@ discover_cached_paths(libpc_handle_t *hdl, nvlist_t *nv,
|
||||
*/
|
||||
if (nvlist_lookup_string(nv, ZPOOL_CONFIG_PATH, &path) == 0) {
|
||||
if ((dl = zfs_dirnamelen(path)) == -1)
|
||||
path = ".";
|
||||
path = (char *)".";
|
||||
else
|
||||
path[dl] = '\0';
|
||||
return (zpool_find_import_scan_dir(hdl, lock, cache,
|
||||
|
||||
Reference in New Issue
Block a user