@@ -180,7 +180,7 @@ struct HeaderTrailer {
180180
181181class LSMTReadOnlyFile ;
182182static LSMTReadOnlyFile *open_file_ro (IFile *file, bool ownership, bool reserve_tag);
183- static HeaderTrailer *verify_ht (IFile *file, char *buf, bool is_trailer = false , size_t st_size = -1 );
183+ static HeaderTrailer *verify_ht (IFile *file, char *buf, bool is_trailer = false , ssize_t st_size = -1 );
184184
185185static const uint32_t ALIGNMENT = 512 ; // same as trim block size.
186186static const uint32_t ALIGNMENT4K = 4096 ;
@@ -1111,7 +1111,7 @@ class LSMTWarpFile : public LSMTFile {
11111111 LOG_DEBUG (" write index to dest_file `, offset: `, size: `*`" , dest_file, index_offset,
11121112 index_size, sizeof (SegmentMapping));
11131113 auto nwrite = dest_file->write (&compact_index[0 ], index_size * sizeof (SegmentMapping));
1114- if (nwrite != (ssize_t )index_size * sizeof (SegmentMapping)) {
1114+ if (nwrite != (ssize_t )( index_size * sizeof (SegmentMapping) )) {
11151115 LOG_ERRNO_RETURN (0 , -1 , " write index failed" );
11161116 }
11171117 nindex = index_size;
@@ -1145,7 +1145,7 @@ class LSMTWarpFile : public LSMTFile {
11451145 }
11461146};
11471147
1148- static HeaderTrailer *verify_ht (IFile *file, char *buf, bool is_trailer, size_t st_size) {
1148+ static HeaderTrailer *verify_ht (IFile *file, char *buf, bool is_trailer, ssize_t st_size) {
11491149 if (file == nullptr ) {
11501150 LOG_ERRNO_RETURN (0 , nullptr , " invalid file ptr (null)." );
11511151 }
0 commit comments