Skip to content

Commit

Permalink
tweak: Suppressed compiler warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
lovyan03 committed Oct 9, 2020
1 parent 0ae751e commit 7e2f486
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/Fonts/lgfx_fonts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -580,8 +580,8 @@ namespace lgfx
u8g2_font_decode_t decode(getGlyph(uniCode));
if ( decode.decode_ptr == nullptr ) return 0;

std::uint32_t w = decode.get_unsigned_bits(bits_per_char_width());
std::uint32_t h = decode.get_unsigned_bits(bits_per_char_height());
std::int32_t w = decode.get_unsigned_bits(bits_per_char_width());
std::int32_t h = decode.get_unsigned_bits(bits_per_char_height());

auto font_metrics = gfx->_get_font_metrics();
float sx = style->size_x;
Expand Down
6 changes: 3 additions & 3 deletions src/lgfx/LGFXBase.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -240,9 +240,9 @@ namespace lgfx
template<typename T, typename U>
void pushImage( std::int32_t x, std::int32_t y, std::int32_t w, std::int32_t h, const T* data, const U& transparent)
{
uint32_t tr = (std::is_same<T, U>::value)
? transparent
: get_fp_convert_src<U>(get_depth<T>::value, false)(transparent);
std::uint32_t tr = (std::is_same<T, U>::value)
? transparent
: get_fp_convert_src<U>(get_depth<T>::value, false)(transparent);
pixelcopy_t p(data, _write_conv.depth, get_depth<T>::value, hasPalette, nullptr, tr);
if (std::is_same<rgb565_t, T>::value || std::is_same<rgb888_t, T>::value) {
if (std::is_same<rgb565_t, T>::value) {
Expand Down
2 changes: 1 addition & 1 deletion src/lgfx/LGFX_Device.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ namespace lgfx
{
_dma_flip = !_dma_flip;
length = (length + 3) & ~3;
if (_dmabufs[_dma_flip].length < length) {
if (_dmabufs[_dma_flip].length != length) {
_dmabufs[_dma_flip].free();
_dmabufs[_dma_flip].buffer = (std::uint8_t*)heap_alloc_dma(length);
_dmabufs[_dma_flip].length = _dmabufs[_dma_flip].buffer ? length : 0;
Expand Down
7 changes: 6 additions & 1 deletion src/lgfx/utility/miniz.c
Original file line number Diff line number Diff line change
Expand Up @@ -2340,7 +2340,12 @@ static MZ_FORCEINLINE void tdefl_find_match(tdefl_compressor *d, mz_uint lookahe
if ((d->m_dict[probe_pos + match_len] == c0) && (d->m_dict[probe_pos + match_len - 1] == c1)) break;
TDEFL_PROBE; TDEFL_PROBE; TDEFL_PROBE;
}
if (!dist) break; p = s; q = d->m_dict + probe_pos; for (probe_len = 0; probe_len < max_match_len; probe_len++) if (*p++ != *q++) break;
if (!dist) break;
p = s; q = d->m_dict + probe_pos;
for (probe_len = 0; probe_len < max_match_len; probe_len++)
{
if (*p++ != *q++) break;
}
if (probe_len > match_len)
{
*pMatch_dist = dist; if ((*pMatch_len = match_len = probe_len) == max_match_len) return;
Expand Down

0 comments on commit 7e2f486

Please sign in to comment.