Skip to content

Commit

Permalink
crengine: fix more warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
benoit-pierre committed Mar 10, 2024
1 parent dea6578 commit dd70b2c
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 17 deletions.
2 changes: 2 additions & 0 deletions subprojects/crengine/crengine/src/cp_stats.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -563,6 +563,7 @@ static const dbl_char_stat_t dbl_ch_stat_cp1250_cs1[256] = {



#if 0
static const short ch_stat_iso8859_2_cs2[256]={
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,// 0..15
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,// 16..31
Expand Down Expand Up @@ -600,6 +601,7 @@ static const dbl_char_stat_t dbl_ch_stat_iso8859_2_cs2[256] = {
{0xbe,0x69,0x001f}, {0xe1,0x20,0x0063}, {0xe1,0x64,0x001f}, {0xe1,0x6c,0x002e}, {0xe1,0x6d,0x0029}, {0xe1,0x6e,0x004a}, {0xe1,0x73,0x0020}, {0xe1,0x74,0x0023}, {0xe1,0x76,0x001f}, {0xe8,0x65,0x0032}, {0xe8,0x69,0x0021}, {0xe8,0x6e,0x0027}, {0xe9,0x20,0x0074}, {0xe9,0x68,0x0025}, {0xec,0x20,0x00a0}, {0xec,0x63,0x001c}, // 224..239
{0xec,0x6a,0x0025}, {0xec,0x6b,0x0023}, {0xec,0x6c,0x0051}, {0xec,0x74,0x001d}, {0xed,0x20,0x00d8}, {0xed,0x63,0x0029}, {0xed,0x6b,0x002f}, {0xed,0x6d,0x0041}, {0xed,0x74,0x0024}, {0xf8,0x65,0x0087}, {0xf8,0x69,0x0045}, {0xf8,0xed,0x003c}, {0xf9,0x20,0x0027}, {0xfd,0x20,0x0060}, {0xfd,0x63,0x001d}, {0xfd,0x6d,0x0020}, // 240..255
};
#endif



Expand Down
7 changes: 1 addition & 6 deletions subprojects/crengine/crengine/src/docxfmt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -215,10 +215,6 @@ const struct item_def_t footnotes_elements[] = {
DOCX_LAST_ITEM
};

const struct item_def_t no_elements[] = {
DOCX_LAST_ITEM
};

const struct item_def_t jc_attr_values[] = {
{ css_ta_left, U"left"},
{ css_ta_right, U"right" },
Expand Down Expand Up @@ -337,7 +333,6 @@ typedef LVFastRef< docxNumLevel > docxNumLevelRef;
class docxAbstractNum : public LVRefCounter
{
private:
docx_multilevel_type m_multilevel;
css_length_t m_abstractNumId;
LVHashTable<lUInt32, docxNumLevelRef> m_levels;
public:
Expand Down Expand Up @@ -2249,7 +2244,7 @@ void docxAbstractNum::addLevel(docxNumLevelRef docxLevel)
m_levels.set(docxLevel->getLevel().value, docxLevel);
}

docxAbstractNum::docxAbstractNum() : m_multilevel(docx_singlelevel),
docxAbstractNum::docxAbstractNum() :
m_abstractNumId(css_val_unspecified, 0), m_levels(10)
{
}
Expand Down
4 changes: 0 additions & 4 deletions subprojects/crengine/crengine/src/lvdrawbuf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1606,10 +1606,6 @@ inline static lUInt32 BB(lUInt32 color) {
return color & 0xFF;
}

inline static lUInt32 RRGGBB(lUInt32 r, lUInt32 g, lUInt32 b) {
return ((r & 0xFF) << 16) | ((g & 0xFF) << 8) | (b & 0xFF);
}

inline static lUInt32 AARRGGBB(lUInt32 a, lUInt32 r, lUInt32 g, lUInt32 b) {
return ((a & 0xFF) << 24) | ((r & 0xFF) << 16) | ((g & 0xFF) << 8) | (b & 0xFF);
}
Expand Down
2 changes: 1 addition & 1 deletion subprojects/crengine/crengine/src/lvimg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -939,7 +939,7 @@ bool LVPngImageSource::Decode( LVImageDecoderCallback * callback )
png_set_packing(png_ptr);

//if (color_type == PNG_COLOR_TYPE_RGB)
png_set_filler(png_ptr, 0, PNG_FILLER_AFTER);
png_set_filler(png_ptr, 0, PNG_FILLER_AFTER);

//if (color_type == PNG_COLOR_TYPE_RGB_ALPHA)
// png_set_swap_alpha(png_ptr);
Expand Down
7 changes: 3 additions & 4 deletions subprojects/crengine/crengine/src/lvtinydom.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,7 @@ lUInt32 calcGlobalSettingsHash(int documentId, bool already_rendered)
return hash;
}

#if 0
static void dumpRendMethods( ldomNode * node, lString32 prefix )
{
lString32 name = prefix;
Expand All @@ -438,6 +439,7 @@ static void dumpRendMethods( ldomNode * node, lString32 prefix )
dumpRendMethods( node->getChildNode(i), prefix + " ");
}
}
#endif



Expand Down Expand Up @@ -14315,13 +14317,12 @@ class ldomTextCollector : public ldomNodeCallback
private:
bool newBlock;
lChar32 delimiter;
int maxLen;
lChar32 imageReplacement;
LVArray<ldomNode*> * imageNodes;
lString32 text;
public:
ldomTextCollector( lChar32 blockDelimiter, int maxTextLen, lChar32 imageReplacementChar, LVArray<ldomNode*> * imageNodesArray )
: newBlock(true), delimiter( blockDelimiter), maxLen( maxTextLen )
: newBlock(true), delimiter( blockDelimiter)
, imageReplacement(imageReplacementChar), imageNodes(imageNodesArray)
{
}
Expand Down Expand Up @@ -15766,8 +15767,6 @@ void ldomDocumentWriterFilter::OnAttribute( const lChar32 * nsname, const lChar3
return;
}

lUInt16 id = _currNode->_element->getNodeId();

// Add the attribute
lUInt16 attr_ns = (nsname && nsname[0]) ? _document->getNsNameIndex( nsname ) : 0;
lUInt16 attr_id = (attrname && attrname[0]) ? _document->getAttrNameIndex( attrname ) : 0;
Expand Down
4 changes: 2 additions & 2 deletions subprojects/crengine/crengine/src/lvxml.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1253,7 +1253,7 @@ class LVTextLineQueue : public LVPtrVector<LVTextFileLine>
tftDoubleEmptyLineBeforeHeaders = 128,
tftPreFormatted = 256,
tftPML = 512 // Palm Markup Language
} formatFlags_t;
};
public:
LVTextLineQueue( LVTextFileBase * f, int maxLineLen )
: file(f), first_line_index(0), maxLineSize(maxLineLen), lastParaWasTitle(false), inSubSection(false)
Expand Down Expand Up @@ -1819,7 +1819,7 @@ class LVTextLineQueue : public LVPtrVector<LVTextFileLine>
return;
//if ( updateStack )
//if ( !line.empty() )
postText();
postText();
for ( int i=styleTags.length()-1; i>=pos; i-- ) {
const lChar32 * tag = getStyleTagName(styleTags[i]);
if ( updateStack )
Expand Down

0 comments on commit dd70b2c

Please sign in to comment.