fix gcc warnings

This commit is contained in:
Thomas Fussell 2017-07-09 16:44:00 +00:00
parent dfc5983155
commit e38b1cdd69
4 changed files with 17 additions and 2 deletions

View File

@ -171,6 +171,10 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/detail/serialization/zstream.cpp PROPERTIES COMPILE_FLAGS "-Wno-undef -Wno-shorten-64-to-32") set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/detail/serialization/zstream.cpp PROPERTIES COMPILE_FLAGS "-Wno-undef -Wno-shorten-64-to-32")
endif() endif()
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/detail/serialization/miniz.cpp PROPERTIES COMPILE_FLAGS "-Wno-strict-aliasing")
endif()
source_group(xlnt FILES ${ROOT_HEADERS}) source_group(xlnt FILES ${ROOT_HEADERS})
source_group(cell FILES ${CELL_HEADERS} ${CELL_SOURCES}) source_group(cell FILES ${CELL_HEADERS} ${CELL_SOURCES})
source_group(detail FILES ${DETAIL_ROOT_HEADERS} ${DETAIL_ROOT_SOURCES}) source_group(detail FILES ${DETAIL_ROOT_HEADERS} ${DETAIL_ROOT_SOURCES})

View File

@ -45,7 +45,7 @@ encryption_info generate_encryption_info(const std::u16string &/*password*/)
result.is_agile = true; result.is_agile = true;
result.agile = encryption_info::agile_encryption_info{}; result.agile = encryption_info::agile_encryption_info();
result.agile.key_data.block_size = 16; result.agile.key_data.block_size = 16;
result.agile.key_data.cipher_algorithm = "AES"; result.agile.key_data.cipher_algorithm = "AES";

View File

@ -3173,6 +3173,7 @@ struct mz_zip_internal_state_tag
#if defined(DEBUG) || defined(_DEBUG) || defined(NDEBUG) #if defined(DEBUG) || defined(_DEBUG) || defined(NDEBUG)
static MZ_FORCEINLINE mz_uint mz_zip_array_range_check(const mz_zip_array *pArray, mz_uint index) static MZ_FORCEINLINE mz_uint mz_zip_array_range_check(const mz_zip_array *pArray, mz_uint index)
{ {
(void)pArray;
MZ_ASSERT(index < pArray->m_size); MZ_ASSERT(index < pArray->m_size);
return index; return index;
} }

View File

@ -110,11 +110,15 @@ void xlsx_producer::open(std::ostream &destination)
cell xlsx_producer::add_cell(const cell_reference &ref) cell xlsx_producer::add_cell(const cell_reference &ref)
{ {
current_cell_->column_ = ref.column();
current_cell_->row_ = ref.row();
return cell(current_cell_); return cell(current_cell_);
} }
worksheet xlsx_producer::add_worksheet(const std::string &title) worksheet xlsx_producer::add_worksheet(const std::string &title)
{ {
current_worksheet_->title_ = title;
return worksheet(current_worksheet_); return worksheet(current_worksheet_);
} }
@ -2256,6 +2260,9 @@ void xlsx_producer::write_worksheet(const relationship &rel)
switch (cell.data_type()) switch (cell.data_type())
{ {
case cell::type::empty:
break;
case cell::type::boolean: case cell::type::boolean:
write_attribute("t", "b"); write_attribute("t", "b");
break; break;
@ -2298,6 +2305,9 @@ void xlsx_producer::write_worksheet(const relationship &rel)
switch (cell.data_type()) switch (cell.data_type())
{ {
case cell::type::empty:
break;
case cell::type::boolean: case cell::type::boolean:
write_element(xmlns, "v", write_bool(cell.value<bool>())); write_element(xmlns, "v", write_bool(cell.value<bool>()));
break; break;