Skip to content
Snippets Groups Projects
Commit 4eed7f04 authored by Jan David Mol's avatar Jan David Mol
Browse files

Task #3113: Cleanup compiler warnings

parent 91c17e5d
No related branches found
No related tags found
No related merge requests found
......@@ -52,21 +52,21 @@ public:
string filename;
};
ssize_t filesize(const string &filename)
size_t filesize(const string &filename)
{
int fd = open(filename.c_str(), O_RDONLY);
off_t len;
if (fd < 0)
return -1;
return 0;
len = lseek(fd, 0, SEEK_END);
if (len == (off_t)-1)
return -1;
len = lseek(fd, 0, SEEK_END);
if (close(fd) < 0)
return -1;
return 0;
if (len == (off_t)-1)
return 0;
return len;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment