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
+5 -5
View File
@@ -130,7 +130,7 @@ read_map(const char *filename, nvlist_t **allcfgs)
* for freeing the configuration returned.
*/
static int
read_map_key(const char *filename, char *key, nvlist_t **cfg)
read_map_key(const char *filename, const char *key, nvlist_t **cfg)
{
nvlist_t *allcfgs, *foundcfg = NULL;
int error;
@@ -320,8 +320,8 @@ write_map_key(const char *filename, char *key, draid_map_t *map,
}
static void
dump_map(draid_map_t *map, char *key, double worst_ratio, double avg_ratio,
int verbose)
dump_map(draid_map_t *map, const char *key, double worst_ratio,
double avg_ratio, int verbose)
{
if (verbose == 0) {
return;
@@ -363,7 +363,7 @@ dump_map(draid_map_t *map, char *key, double worst_ratio, double avg_ratio,
}
static void
dump_map_nv(char *key, nvlist_t *cfg, int verbose)
dump_map_nv(const char *key, nvlist_t *cfg, int verbose)
{
draid_map_t map;
uint_t c;
@@ -385,7 +385,7 @@ dump_map_nv(char *key, nvlist_t *cfg, int verbose)
* Print a summary of the mapping.
*/
static int
dump_map_key(const char *filename, char *key, int verbose)
dump_map_key(const char *filename, const char *key, int verbose)
{
nvlist_t *cfg;
int error;