Changeset 888 for cpp/common/virtfile


Ignore:
Timestamp:
07/22/19 01:15:38 (5 years ago)
Author:
Maciej Komosinski
Message:

More explicit code to fix compiler warnings

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpp/common/virtfile/virtfile.cpp

    r841 r888  
    6464{
    6565        string s = ssprintf_va(format, args);
    66         return Vwrite(s.c_str(), 1, s.size());
     66        return (int)Vwrite(s.c_str(), 1, s.size());
    6767}
    6868
     
    7878int VirtFILE::getSize()
    7979{
    80         int saved_pos = Vtell();
     80        auto saved_pos = Vtell();
    8181        Vseek(0, SEEK_END);
    82         int size = Vtell();
     82        int size = (int)Vtell();
    8383        Vseek(saved_pos, SEEK_SET);
    8484        return size;
     
    104104
    105105
    106 int fread(void *ptr, size_t size, size_t nmemb, VirtFILE* f) { return f->Vread(ptr, size, nmemb); }
    107 int fwrite(const void *ptr, size_t size, size_t nmemb, VirtFILE* f) { return f->Vwrite(ptr, size, nmemb); }
     106size_t fread(void *ptr, size_t size, size_t nmemb, VirtFILE* f) { return f->Vread(ptr, size, nmemb); }
     107size_t fwrite(const void *ptr, size_t size, size_t nmemb, VirtFILE* f) { return f->Vwrite(ptr, size, nmemb); }
    108108
    109109
     
    132132int fgetc(VirtFILE* f) { return f->Vgetc(); }
    133133int fseek(VirtFILE* f, long offset, int whence) { return f->Vseek(offset, whence); }
    134 int ftell(VirtFILE* f) { return f->Vtell(); }
     134int ftell(VirtFILE* f) { return (int)f->Vtell(); }
    135135void rewind(VirtFILE* f) { f->Vrewind(); }
    136136int fflush(VirtFILE* f) { return f->Vflush(); }
Note: See TracChangeset for help on using the changeset viewer.