Fix const qualifier discarded warnings in read_persistent_namespaces()
and is_path_included() functions. These warnings are reported by gcc 15
which defaults to the C23 standard.
The strchr() and strstr() functions return pointers into const strings,
so the receiving variables must be declared as const char *.
Signed-off-by: Karel Zak <kzak@redhat.com>
struct libmnt_fs *fs = NULL;
while (mnt_table_next_fs(ls->tab, itr, &fs) == 0) {
- const char *root;
- char *p, *end = NULL;
+ const char *root, *p;
+ char *end = NULL;
ino_t ino;
int fd;
{
size_t elt_len;
size_t path_set_len;
- char *tmp;
+ const char *tmp;
tmp = strstr(path_set, elt);