Skip to content

Commit

Permalink
Fix Mac build error
Browse files Browse the repository at this point in the history
Signed-off-by: Frank Li <[email protected]>
  • Loading branch information
nxpfrankli committed Sep 26, 2022
1 parent 155b324 commit bdea8bd
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions libuuu/buffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -957,7 +957,7 @@ class Bz2FragmentBlock: public FragmentBlock

assert(m_output_size >= m_actual_size);

atomic_fetch_or(&m_dataflags, CONVERT_DONE);
atomic_fetch_or(&m_dataflags, (int)CONVERT_DONE);
return m_ret;
}
};
Expand Down Expand Up @@ -1119,7 +1119,7 @@ int FSCompressStream::Decompress(const string& backfile, shared_ptr<FileBuffer>o
blk->m_ret = 0;
blk->m_actual_size = cs->get_output_pos();

atomic_fetch_or(&blk->m_dataflags, FragmentBlock::CONVERT_PARTIAL);
atomic_fetch_or(&blk->m_dataflags, (int)FragmentBlock::CONVERT_PARTIAL);

ut.type = uuu_notify::NOTIFY_DECOMPRESS_POS;
ut.index = outOffset;
Expand All @@ -1130,7 +1130,7 @@ int FSCompressStream::Decompress(const string& backfile, shared_ptr<FileBuffer>o

if (cs->get_output_pos() == blk->m_output_size)
{
atomic_fetch_or(&blk->m_dataflags, FragmentBlock::CONVERT_DONE);
atomic_fetch_or(&blk->m_dataflags, (int)FragmentBlock::CONVERT_DONE);
if (!(cs->get_input_pos() == buff->size() &&
buff->size() == (inp->size() - offset)))
{
Expand All @@ -1157,7 +1157,7 @@ int FSCompressStream::Decompress(const string& backfile, shared_ptr<FileBuffer>o
}
outp->resize(outOffset);

atomic_fetch_or(&blk->m_dataflags, FragmentBlock::CONVERT_DONE);
atomic_fetch_or(&blk->m_dataflags, (int)FragmentBlock::CONVERT_DONE);
atomic_fetch_or(&outp->m_dataflags, FILEBUFFER_FLAG_LOADED);

outp->m_request_cv.notify_all();
Expand Down Expand Up @@ -1504,7 +1504,7 @@ int64_t FileBuffer::request_data_from_segment(void *data, size_t offset, size_t

if ((blk->m_dataflags & FragmentBlock::CONVERT_DONE))
{
atomic_fetch_or(&blk->m_dataflags, FragmentBlock::USING);
atomic_fetch_or(&blk->m_dataflags, (int)FragmentBlock::USING);
break;
}
}
Expand Down Expand Up @@ -1982,7 +1982,7 @@ int FSBasic::PreloadWorkThread(shared_ptr<FileBuffer>outp)
if (low != outp->m_seg_map.end()) {
if (!(low->second->m_dataflags & FragmentBlock::CONVERT_START))
{
atomic_fetch_or(&low->second->m_dataflags, FragmentBlock::CONVERT_START);
atomic_fetch_or(&low->second->m_dataflags, (int)FragmentBlock::CONVERT_START);
blk = low->second;
}
}
Expand All @@ -2005,7 +2005,7 @@ int FSBasic::PreloadWorkThread(shared_ptr<FileBuffer>outp)
continue;
}

atomic_fetch_or(&blk->m_dataflags, FragmentBlock::CONVERT_DONE);
atomic_fetch_or(&blk->m_dataflags, (int)FragmentBlock::CONVERT_DONE);
outp->m_request_cv.notify_all();
}
return 0;
Expand Down

0 comments on commit bdea8bd

Please sign in to comment.