Commit cdb62c5b authored by Utkarsh Ayachit's avatar Utkarsh Ayachit
Browse files

Merge branch 'fix-diy-warnings' into 'master'

Fix diy warnings

See merge request vtk/vtk-m!1110
parents 996b75b2 66fcf2a7
......@@ -24,8 +24,8 @@ namespace diy
// TODO: add error checking
virtual inline void save_binary(const char* x, size_t count) override { fwrite(x, 1, count, file); head += count; }
virtual inline void load_binary(char* x, size_t count) override { fread(x, 1, count, file); }
virtual inline void load_binary_back(char* x, size_t count) override { fseek(file, static_cast<long>(tail), SEEK_END); fread(x, 1, count, file); tail += count; fseek(file, static_cast<long>(head), SEEK_SET); }
virtual inline void load_binary(char* x, size_t count) override { auto n = fread(x, 1, count, file); (void) n;}
virtual inline void load_binary_back(char* x, size_t count) override { fseek(file, static_cast<long>(tail), SEEK_END); auto n = fread(x, 1, count, file); tail += count; fseek(file, static_cast<long>(head), SEEK_SET); (void) n;}
size_t size() const { return head; }
......@@ -127,7 +127,7 @@ namespace diy
_read(fh, &bb.buffer[0], static_cast<unsigned int>(fr.size));
#else
int fh = open(fr.name.c_str(), O_RDONLY | O_SYNC, 0600);
read(fh, &bb.buffer[0], fr.size);
auto n = read(fh, &bb.buffer[0], fr.size); (void) n;
#endif
io::utils::close(fh);
remove_file(fr);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment