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:
наб
2022-04-19 20:38:30 +02:00
committed by Brian Behlendorf
parent e7d90362e5
commit a926aab902
99 changed files with 633 additions and 717 deletions
+4 -3
View File
@@ -338,8 +338,8 @@ spa_vdev_alloc(spa_t *spa, uint64_t guid)
}
static void
spa_vdev_remove_aux(nvlist_t *config, char *name, nvlist_t **dev, int count,
nvlist_t *dev_to_remove)
spa_vdev_remove_aux(nvlist_t *config, const char *name, nvlist_t **dev,
int count, nvlist_t *dev_to_remove)
{
nvlist_t **newdev = NULL;
@@ -2384,7 +2384,8 @@ spa_vdev_remove(spa_t *spa, uint64_t guid, boolean_t unspare)
int error = 0, error_log;
boolean_t locked = MUTEX_HELD(&spa_namespace_lock);
sysevent_t *ev = NULL;
char *vd_type = NULL, *vd_path = NULL;
const char *vd_type = NULL;
char *vd_path = NULL;
ASSERT(spa_writeable(spa));