mirror of
https://github.com/tfussell/xlnt.git
synced 2024-03-22 13:11:17 +08:00
fix gcc warnings
This commit is contained in:
parent
dfc5983155
commit
e38b1cdd69
|
@ -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")
|
||||
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(cell FILES ${CELL_HEADERS} ${CELL_SOURCES})
|
||||
source_group(detail FILES ${DETAIL_ROOT_HEADERS} ${DETAIL_ROOT_SOURCES})
|
||||
|
|
|
@ -45,7 +45,7 @@ encryption_info generate_encryption_info(const std::u16string &/*password*/)
|
|||
|
||||
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.cipher_algorithm = "AES";
|
||||
|
|
|
@ -3173,6 +3173,7 @@ struct mz_zip_internal_state_tag
|
|||
#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)
|
||||
{
|
||||
(void)pArray;
|
||||
MZ_ASSERT(index < pArray->m_size);
|
||||
return index;
|
||||
}
|
||||
|
|
|
@ -110,11 +110,15 @@ void xlsx_producer::open(std::ostream &destination)
|
|||
|
||||
cell xlsx_producer::add_cell(const cell_reference &ref)
|
||||
{
|
||||
current_cell_->column_ = ref.column();
|
||||
current_cell_->row_ = ref.row();
|
||||
|
||||
return cell(current_cell_);
|
||||
}
|
||||
|
||||
worksheet xlsx_producer::add_worksheet(const std::string &title)
|
||||
{
|
||||
current_worksheet_->title_ = title;
|
||||
return worksheet(current_worksheet_);
|
||||
}
|
||||
|
||||
|
@ -2256,7 +2260,10 @@ void xlsx_producer::write_worksheet(const relationship &rel)
|
|||
|
||||
switch (cell.data_type())
|
||||
{
|
||||
case cell::type::boolean:
|
||||
case cell::type::empty:
|
||||
break;
|
||||
|
||||
case cell::type::boolean:
|
||||
write_attribute("t", "b");
|
||||
break;
|
||||
|
||||
|
@ -2298,6 +2305,9 @@ void xlsx_producer::write_worksheet(const relationship &rel)
|
|||
|
||||
switch (cell.data_type())
|
||||
{
|
||||
case cell::type::empty:
|
||||
break;
|
||||
|
||||
case cell::type::boolean:
|
||||
write_element(xmlns, "v", write_bool(cell.value<bool>()));
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue
Block a user