mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-24 11:18:52 +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:
@@ -462,7 +462,7 @@ spa_config_lock_destroy(spa_t *spa)
|
||||
}
|
||||
|
||||
int
|
||||
spa_config_tryenter(spa_t *spa, int locks, void *tag, krw_t rw)
|
||||
spa_config_tryenter(spa_t *spa, int locks, const void *tag, krw_t rw)
|
||||
{
|
||||
for (int i = 0; i < SCL_LOCKS; i++) {
|
||||
spa_config_lock_t *scl = &spa->spa_config_lock[i];
|
||||
@@ -877,7 +877,7 @@ spa_next(spa_t *prev)
|
||||
* have the namespace lock held.
|
||||
*/
|
||||
void
|
||||
spa_open_ref(spa_t *spa, void *tag)
|
||||
spa_open_ref(spa_t *spa, const void *tag)
|
||||
{
|
||||
ASSERT(zfs_refcount_count(&spa->spa_refcount) >= spa->spa_minref ||
|
||||
MUTEX_HELD(&spa_namespace_lock));
|
||||
@@ -889,7 +889,7 @@ spa_open_ref(spa_t *spa, void *tag)
|
||||
* have the namespace lock held.
|
||||
*/
|
||||
void
|
||||
spa_close(spa_t *spa, void *tag)
|
||||
spa_close(spa_t *spa, const void *tag)
|
||||
{
|
||||
ASSERT(zfs_refcount_count(&spa->spa_refcount) > spa->spa_minref ||
|
||||
MUTEX_HELD(&spa_namespace_lock));
|
||||
@@ -905,7 +905,7 @@ spa_close(spa_t *spa, void *tag)
|
||||
* so the asserts in spa_close() do not apply.
|
||||
*/
|
||||
void
|
||||
spa_async_close(spa_t *spa, void *tag)
|
||||
spa_async_close(spa_t *spa, const void *tag)
|
||||
{
|
||||
(void) zfs_refcount_remove(&spa->spa_refcount, tag);
|
||||
}
|
||||
@@ -1513,8 +1513,8 @@ void
|
||||
snprintf_blkptr(char *buf, size_t buflen, const blkptr_t *bp)
|
||||
{
|
||||
char type[256];
|
||||
char *checksum = NULL;
|
||||
char *compress = NULL;
|
||||
const char *checksum = NULL;
|
||||
const char *compress = NULL;
|
||||
|
||||
if (bp != NULL) {
|
||||
if (BP_GET_TYPE(bp) & DMU_OT_NEWTYPE) {
|
||||
|
||||
Reference in New Issue
Block a user