fix compile warning

Summary: as subject

Test Plan: compile

Reviewers: dhruba

Reviewed By: dhruba

Differential Revision: https://reviews.facebook.net/D3957
main
heyongqiang 13 years ago
parent daa816c4a0
commit 7600228072
  1. 8
      port/port_posix.h
  2. 2
      util/options.cc

@ -169,7 +169,7 @@ inline bool Zlib_Compress(const char* input, size_t length,
// No output space. Increase the output space by 20%. // No output space. Increase the output space by 20%.
// (Should we fail the compression since it expands the size?) // (Should we fail the compression since it expands the size?)
old_sz = output->size(); old_sz = output->size();
new_sz = output->size() * 1.2; new_sz = (int)(output->size() * 1.2);
output->resize(new_sz); output->resize(new_sz);
// Set more output. // Set more output.
_stream.next_out = (Bytef *)&(*output)[old_sz]; _stream.next_out = (Bytef *)&(*output)[old_sz];
@ -225,7 +225,7 @@ inline char* Zlib_Uncompress(const char* input_data, size_t input_length,
case Z_OK: case Z_OK:
// No output space. Increase the output space by 20%. // No output space. Increase the output space by 20%.
old_sz = output_len; old_sz = output_len;
output_len = output_len * 1.2; output_len = (int)(output_len * 1.2);
tmp = new char[output_len]; tmp = new char[output_len];
memcpy(tmp, output, old_sz); memcpy(tmp, output, old_sz);
delete[] output; delete[] output;
@ -287,7 +287,7 @@ inline bool BZip2_Compress(const char* input, size_t length,
// No output space. Increase the output space by 20%. // No output space. Increase the output space by 20%.
// (Should we fail the compression since it expands the size?) // (Should we fail the compression since it expands the size?)
old_sz = output->size(); old_sz = output->size();
new_sz = output->size() * 1.2; new_sz = (int)(output->size() * 1.2);
output->resize(new_sz); output->resize(new_sz);
// Set more output. // Set more output.
_stream.next_out = (char *)&(*output)[old_sz]; _stream.next_out = (char *)&(*output)[old_sz];
@ -340,7 +340,7 @@ inline char* BZip2_Uncompress(const char* input_data, size_t input_length,
case Z_OK: case Z_OK:
// No output space. Increase the output space by 20%. // No output space. Increase the output space by 20%.
old_sz = output_len; old_sz = output_len;
output_len = output_len * 1.2; output_len = (int)(output_len * 1.2);
tmp = new char[output_len]; tmp = new char[output_len];
memcpy(tmp, output, old_sz); memcpy(tmp, output, old_sz);
delete[] output; delete[] output;

@ -29,7 +29,7 @@ Options::Options()
max_mem_compaction_level(2), max_mem_compaction_level(2),
target_file_size_base(2 * 1048576), target_file_size_base(2 * 1048576),
target_file_size_multiplier(10), target_file_size_multiplier(10),
max_bytes_for_level_base(10 * 1048576.0), max_bytes_for_level_base(10 * 1048576),
max_bytes_for_level_multiplier(10), max_bytes_for_level_multiplier(10),
expanded_compaction_factor(25), expanded_compaction_factor(25),
max_grandparent_overlap_factor(10), max_grandparent_overlap_factor(10),

Loading…
Cancel
Save