diff --git a/daemons/dmfilemapd/dmfilemapd.c b/daemons/dmfilemapd/dmfilemapd.c index 7939c48e1..88f8af2ef 100644 --- a/daemons/dmfilemapd/dmfilemapd.c +++ b/daemons/dmfilemapd/dmfilemapd.c @@ -225,7 +225,7 @@ static int _is_open(const char *path) while ((proc_dp = readdir(proc_d)) != NULL) { if (!isdigit(proc_dp->d_name[0])) continue; - pid = strtol(proc_dp->d_name, NULL, 10); + pid = (pid_t) strtol(proc_dp->d_name, NULL, 10); if (!pid) continue; if (_is_open_in_pid(pid, path)) { @@ -280,7 +280,7 @@ static int _parse_args(int argc, char **argv, struct filemap_monitor *fm) fm->nr_regions = 1; /* parse */ - fm->fd = strtol(argv[0], &endptr, 10); + fm->fd = (int) strtol(argv[0], &endptr, 10); if (*endptr) { _early_log("Could not parse file descriptor: %s", argv[0]); return 0; @@ -334,7 +334,7 @@ static int _parse_args(int argc, char **argv, struct filemap_monitor *fm) /* parse [[]] */ if (argc) { - _foreground = strtol(argv[0], &endptr, 10); + _foreground = (int) strtol(argv[0], &endptr, 10); if (*endptr) { _early_log("Could not parse debug argument: %s.", argv[0]); @@ -343,7 +343,7 @@ static int _parse_args(int argc, char **argv, struct filemap_monitor *fm) argc--; argv++; if (argc) { - _verbose = strtol(argv[0], &endptr, 10); + _verbose = (int) strtol(argv[0], &endptr, 10); if (*endptr) { _early_log("Could not parse verbose " "argument: %s", argv[0]);