CC src/df.lo
src/df.c:231:15: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32]
len = strlen(disk_name);
~ ^~~~~~~~~~~~~~~~~
1 warning generated.
if (strcmp(mnt_ptr->dir, "/") == 0)
sstrncpy(disk_name, "root", sizeof(disk_name));
else {
- int len;
-
sstrncpy(disk_name, mnt_ptr->dir + 1, sizeof(disk_name));
- len = strlen(disk_name);
+ size_t len = strlen(disk_name);
- for (int i = 0; i < len; i++)
+ for (size_t i = 0; i < len; i++)
if (disk_name[i] == '/')
disk_name[i] = '-';
}