ICU-2699 Fix strict mode compiler warnings
X-SVN-Rev: 11906
This commit is contained in:
parent
a005ac95e0
commit
0c1691e1a4
@ -73,7 +73,7 @@ ArabicOpenTypeLayoutEngine::~ArabicOpenTypeLayoutEngine()
|
||||
// Output: characters, char indices, tags
|
||||
// Returns: output character count
|
||||
le_int32 ArabicOpenTypeLayoutEngine::characterProcessing(const LEUnicode chars[], le_int32 offset, le_int32 count, le_int32 max, le_bool rightToLeft,
|
||||
LEUnicode *&outChars, le_int32 *&charIndices, const LETag **&featureTags, LEErrorCode &success)
|
||||
LEUnicode *&/*outChars*/, le_int32 *&/*charIndices*/, const LETag **&featureTags, LEErrorCode &success)
|
||||
{
|
||||
if (LE_FAILURE(success)) {
|
||||
return 0;
|
||||
@ -213,7 +213,7 @@ le_int32 UnicodeArabicOpenTypeLayoutEngine::glyphPostProcessing(LEGlyphID tempGl
|
||||
return tempGlyphCount;
|
||||
}
|
||||
|
||||
void UnicodeArabicOpenTypeLayoutEngine::mapCharsToGlyphs(const LEUnicode chars[], le_int32 offset, le_int32 count, le_bool reverse, le_bool mirror, LEGlyphID *&glyphs, le_int32 *&charIndices, LEErrorCode &success)
|
||||
void UnicodeArabicOpenTypeLayoutEngine::mapCharsToGlyphs(const LEUnicode chars[], le_int32 offset, le_int32 count, le_bool reverse, le_bool /*mirror*/, LEGlyphID *&glyphs, le_int32 *&charIndices, LEErrorCode &success)
|
||||
{
|
||||
if (LE_FAILURE(success)) {
|
||||
return;
|
||||
@ -262,7 +262,7 @@ void UnicodeArabicOpenTypeLayoutEngine::adjustGlyphPositions(const LEUnicode cha
|
||||
return;
|
||||
}
|
||||
|
||||
if (chars == NULL || glyphs == NULL || positions == NULL || offset < 0 || count < 0) {
|
||||
if (chars == NULL || glyphs == NULL || positions == NULL || offset < 0 || count < 0 || glyphCount < 0) {
|
||||
success = LE_ILLEGAL_ARGUMENT_ERROR;
|
||||
return;
|
||||
}
|
||||
|
@ -203,7 +203,7 @@ GlyphShaper::~GlyphShaper()
|
||||
// nothing to do
|
||||
}
|
||||
|
||||
void GlyphShaper::init(LEUnicode ch, le_int32 outIndex, le_bool isloate)
|
||||
void GlyphShaper::init(LEUnicode /*ch*/, le_int32 outIndex, le_bool /*isloate*/)
|
||||
{
|
||||
charTags[outIndex] = tagArray;
|
||||
}
|
||||
|
@ -36,7 +36,7 @@ void ContextualGlyphSubstitutionProcessor::beginStateTable()
|
||||
markGlyph = 0;
|
||||
}
|
||||
|
||||
ByteOffset ContextualGlyphSubstitutionProcessor::processStateEntry(LEGlyphID *glyphs, le_int32 * charIndices, le_int32 &currGlyph, le_int32 glyphCount, EntryTableIndex index)
|
||||
ByteOffset ContextualGlyphSubstitutionProcessor::processStateEntry(LEGlyphID *glyphs, le_int32 * /*charIndices*/, le_int32 &currGlyph, le_int32 /*glyphCount*/, EntryTableIndex index)
|
||||
{
|
||||
const ContextualGlyphSubstitutionStateEntry *entry = &entryTable[index];
|
||||
ByteOffset newState = SWAPW(entry->newStateOffset);
|
||||
|
@ -51,7 +51,7 @@ le_int32 GXLayoutEngine::computeGlyphs(const LEUnicode chars[], le_int32 offset,
|
||||
}
|
||||
|
||||
// apply positional tables
|
||||
void GXLayoutEngine::adjustGlyphPositions(const LEUnicode chars[], le_int32 offset, le_int32 count, le_bool reverse, LEGlyphID glyphs[], le_int32 glyphCount, float positions[], LEErrorCode &success)
|
||||
void GXLayoutEngine::adjustGlyphPositions(const LEUnicode chars[], le_int32 offset, le_int32 count, le_bool /*reverse*/, LEGlyphID glyphs[], le_int32 glyphCount, float positions[], LEErrorCode &success)
|
||||
{
|
||||
if (LE_FAILURE(success)) {
|
||||
return;
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* (C) Copyright IBM Corp. 1998 - 2003 - All Rights Reserved.
|
||||
*
|
||||
* $Source: /xsrl/Nsvn/icu/icu/source/layout/HanLayoutEngine.cpp,v $ $Date: 2003/04/12 00:37:11 $ $Revision: 1.1 $
|
||||
* $Source: /xsrl/Nsvn/icu/icu/source/layout/HanLayoutEngine.cpp,v $ $Date: 2003/05/13 00:44:33 $ $Revision: 1.2 $
|
||||
*/
|
||||
|
||||
#include "LETypes.h"
|
||||
@ -37,8 +37,8 @@ const LETag tradFeatureTag = LE_MAKE_TAG('t', 'r', 'a', 'd');
|
||||
|
||||
const LETag features[] = {loclFeatureTag, emptyTag};
|
||||
|
||||
le_int32 HanOpenTypeLayoutEngine::characterProcessing(const LEUnicode chars[], le_int32 offset, le_int32 count, le_int32 max, le_bool rightToLeft,
|
||||
LEUnicode *&outChars, le_int32 *&charIndices, const LETag **&featureTags, LEErrorCode &success)
|
||||
le_int32 HanOpenTypeLayoutEngine::characterProcessing(const LEUnicode chars[], le_int32 offset, le_int32 count, le_int32 max, le_bool /*rightToLeft*/,
|
||||
LEUnicode *&/*outChars*/, le_int32 *&/*charIndices*/, const LETag **&featureTags, LEErrorCode &success)
|
||||
{
|
||||
if (LE_FAILURE(success)) {
|
||||
return 0;
|
||||
|
@ -19,7 +19,7 @@ const LETag hebrewTags[] =
|
||||
ligaFeatureTag, emptyTag
|
||||
};
|
||||
|
||||
void HebrewShaping::shape(const LEUnicode *chars, le_int32 offset, le_int32 charCount, le_int32 charMax,
|
||||
void HebrewShaping::shape(const LEUnicode * /*chars*/, le_int32 /*offset*/, le_int32 charCount, le_int32 /*charMax*/,
|
||||
le_bool rightToLeft, const LETag **tags)
|
||||
{
|
||||
|
||||
|
@ -51,7 +51,7 @@ le_int32 IndicOpenTypeLayoutEngine::glyphProcessing(const LEUnicode chars[], le_
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (chars == NULL || offset < 0 || count < 0) {
|
||||
if (chars == NULL || offset < 0 || count < 0 || max < 0 || offset >= max || offset + count > max) {
|
||||
success = LE_ILLEGAL_ARGUMENT_ERROR;
|
||||
return 0;
|
||||
}
|
||||
@ -70,7 +70,7 @@ le_int32 IndicOpenTypeLayoutEngine::glyphProcessing(const LEUnicode chars[], le_
|
||||
// Input: characters
|
||||
// Output: characters, char indices, tags
|
||||
// Returns: output character count
|
||||
le_int32 IndicOpenTypeLayoutEngine::characterProcessing(const LEUnicode chars[], le_int32 offset, le_int32 count, le_int32 max, le_bool rightToLeft,
|
||||
le_int32 IndicOpenTypeLayoutEngine::characterProcessing(const LEUnicode chars[], le_int32 offset, le_int32 count, le_int32 max, le_bool /*rightToLeft*/,
|
||||
LEUnicode *&outChars, le_int32 *&charIndices, const LETag **&featureTags, LEErrorCode &success)
|
||||
{
|
||||
if (LE_FAILURE(success)) {
|
||||
|
@ -36,7 +36,7 @@ void IndicRearrangementProcessor::beginStateTable()
|
||||
}
|
||||
|
||||
ByteOffset IndicRearrangementProcessor::processStateEntry(LEGlyphID *glyphs, le_int32 *charIndices, le_int32 &currGlyph,
|
||||
le_int32 glyphCount, EntryTableIndex index)
|
||||
le_int32 /*glyphCount*/, EntryTableIndex index)
|
||||
{
|
||||
const IndicRearrangementStateEntry *entry = &entryTable[index];
|
||||
ByteOffset newState = SWAPW(entry->newStateOffset);
|
||||
|
@ -2,8 +2,8 @@
|
||||
* (C) Copyright IBM Corp. 1998 - 2003 - All Rights Reserved
|
||||
*
|
||||
* $Source: /xsrl/Nsvn/icu/icu/source/layout/IndicReordering.cpp,v $
|
||||
* $Date: 2003/04/12 00:37:11 $
|
||||
* $Revision: 1.10 $
|
||||
* $Date: 2003/05/13 00:44:33 $
|
||||
* $Revision: 1.11 $
|
||||
*
|
||||
*/
|
||||
|
||||
@ -250,7 +250,6 @@ le_int32 IndicReordering::reorder(const LEUnicode *chars, le_int32 charCount, le
|
||||
while (prev < charCount) {
|
||||
le_int32 syllable = findSyllable(classTable, chars, prev, charCount);
|
||||
le_int32 matra, vmabove, vmpost = syllable;
|
||||
le_int16 flags = 0;
|
||||
|
||||
while (vmpost > prev && classTable->isVMpost(chars[vmpost - 1])) {
|
||||
vmpost -= 1;
|
||||
|
@ -425,7 +425,7 @@ inline le_bool LEFontInstance::isComposite() const
|
||||
return false;
|
||||
}
|
||||
|
||||
inline const LEFontInstance *LEFontInstance::getSubFont(const LEUnicode chars[], le_int32 *offset, le_int32 count, le_int32 script) const
|
||||
inline const LEFontInstance *LEFontInstance::getSubFont(const LEUnicode /*chars*/[], le_int32 *offset, le_int32 count, le_int32 /*script*/) const
|
||||
{
|
||||
*offset += count;
|
||||
return this;
|
||||
@ -436,7 +436,7 @@ inline le_bool LEFontInstance::canDisplay(LEUnicode32 ch) const
|
||||
return mapCharToGlyph(ch) != 0;
|
||||
}
|
||||
|
||||
inline le_int32 LEFontInstance::getName(le_uint16 platformID, le_uint16 scriptID, le_uint16 languageID, le_uint16 nameID, LEUnicode *name) const
|
||||
inline le_int32 LEFontInstance::getName(le_uint16 /*platformID*/, le_uint16 /*scriptID*/, le_uint16 /*languageID*/, le_uint16 /*nameID*/, LEUnicode *name) const
|
||||
{
|
||||
if (name != NULL) {
|
||||
*name = 0;
|
||||
|
@ -218,13 +218,13 @@ protected:
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
virtual void adjustGlyphPositions(const LEUnicode chars[], le_int32 offset, le_int32 count, le_bool reverse, LEGlyphID glyphs[], le_int32 glyphCount, float positions[], LEErrorCode &success)
|
||||
virtual void adjustGlyphPositions(const LEUnicode chars[], le_int32 offset, le_int32 count, le_bool /*reverse*/, LEGlyphID glyphs[], le_int32 glyphCount, float positions[], LEErrorCode &success)
|
||||
{
|
||||
if (LE_FAILURE(success)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (chars == NULL || glyphs == NULL || positions == NULL || offset < 0 || count < 0) {
|
||||
if (chars == NULL || glyphs == NULL || positions == NULL || offset < 0 || count < 0 || glyphCount < 0) {
|
||||
success = LE_ILLEGAL_ARGUMENT_ERROR;
|
||||
return;
|
||||
}
|
||||
|
@ -42,7 +42,7 @@ void LigatureSubstitutionProcessor::beginStateTable()
|
||||
m = -1;
|
||||
}
|
||||
|
||||
ByteOffset LigatureSubstitutionProcessor::processStateEntry(LEGlyphID *glyphs, le_int32 *charIndices, le_int32 &currGlyph, le_int32 glyphCount, EntryTableIndex index)
|
||||
ByteOffset LigatureSubstitutionProcessor::processStateEntry(LEGlyphID *glyphs, le_int32 * /*charIndices*/, le_int32 &currGlyph, le_int32 /*glyphCount*/, EntryTableIndex index)
|
||||
{
|
||||
const LigatureSubstitutionStateEntry *entry = &entryTable[index];
|
||||
ByteOffset newState = SWAPW(entry->newStateOffset);
|
||||
|
@ -106,8 +106,8 @@ le_int32 LookupProcessor::selectLookups(const FeatureTable *featureTable, LETag
|
||||
LookupProcessor::LookupProcessor(const char *baseAddress,
|
||||
Offset scriptListOffset, Offset featureListOffset, Offset lookupListOffset,
|
||||
LETag scriptTag, LETag languageTag, const LETag *featureOrder)
|
||||
: lookupListTable(NULL), featureListTable(NULL), lookupOrderArray(NULL), lookupSelectArray(NULL),
|
||||
requiredFeatureTag(notSelected)
|
||||
: lookupListTable(NULL), featureListTable(NULL), lookupSelectArray(NULL),
|
||||
requiredFeatureTag(notSelected), lookupOrderArray(NULL), lookupOrderCount(0)
|
||||
{
|
||||
const ScriptListTable *scriptListTable = NULL;
|
||||
const LangSysTable *langSysTable = NULL;
|
||||
|
@ -27,7 +27,7 @@ const char OpenTypeLayoutEngine::fgClassID=0;
|
||||
OpenTypeLayoutEngine::OpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode,
|
||||
const GlyphSubstitutionTableHeader *gsubTable)
|
||||
: LayoutEngine(fontInstance, scriptCode, languageCode), fFeatureTags(NULL), fGSUBTable(gsubTable),
|
||||
fSubstitutionFilter(NULL), fFeatureOrder(NULL)
|
||||
fFeatureOrder(NULL), fSubstitutionFilter(NULL)
|
||||
{
|
||||
static le_uint32 gdefTableTag = LE_MAKE_TAG('G', 'D', 'E', 'F');
|
||||
static le_uint32 gposTableTag = LE_MAKE_TAG('G', 'P', 'O', 'S');
|
||||
@ -58,7 +58,7 @@ void OpenTypeLayoutEngine::reset()
|
||||
|
||||
OpenTypeLayoutEngine::OpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode)
|
||||
: LayoutEngine(fontInstance, scriptCode, languageCode), fFeatureTags(NULL), fGSUBTable(NULL), fGDEFTable(NULL), fGPOSTable(NULL),
|
||||
fSubstitutionFilter(NULL), fFeatureOrder(NULL)
|
||||
fFeatureOrder(NULL), fSubstitutionFilter(NULL)
|
||||
{
|
||||
setScriptAndLanguageTags();
|
||||
}
|
||||
@ -101,7 +101,7 @@ le_int32 OpenTypeLayoutEngine::glyphProcessing(const LEUnicode chars[], le_int32
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (chars == NULL || offset < 0 || count < 0) {
|
||||
if (chars == NULL || offset < 0 || count < 0 || max < 0 || offset >= max || offset + count > max) {
|
||||
success = LE_ILLEGAL_ARGUMENT_ERROR;
|
||||
return 0;
|
||||
}
|
||||
|
@ -237,8 +237,8 @@ protected:
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
virtual le_int32 characterProcessing(const LEUnicode chars[], le_int32 offset, le_int32 count, le_int32 max, le_bool rightToLeft,
|
||||
LEUnicode *&outChars, le_int32 *&charIndices, const LETag **&featureTags, LEErrorCode &success) /*= 0;*/
|
||||
virtual le_int32 characterProcessing(const LEUnicode /*chars*/[], le_int32 offset, le_int32 count, le_int32 max, le_bool /*rightToLeft*/,
|
||||
LEUnicode *&/*outChars*/, le_int32 *&/*charIndices*/, const LETag **&/*featureTags*/, LEErrorCode &success) /*= 0;*/
|
||||
{
|
||||
if (LE_FAILURE(success)) {
|
||||
return 0;
|
||||
|
@ -33,7 +33,7 @@ SegmentArrayProcessor::~SegmentArrayProcessor()
|
||||
{
|
||||
}
|
||||
|
||||
void SegmentArrayProcessor::process(LEGlyphID *glyphs, le_int32 *charIndices, le_int32 glyphCount)
|
||||
void SegmentArrayProcessor::process(LEGlyphID *glyphs, le_int32 * /*charIndices*/, le_int32 glyphCount)
|
||||
{
|
||||
const LookupSegment *segments = segmentArrayLookupTable->segments;
|
||||
le_int32 glyph;
|
||||
|
@ -33,7 +33,7 @@ SegmentSingleProcessor::~SegmentSingleProcessor()
|
||||
{
|
||||
}
|
||||
|
||||
void SegmentSingleProcessor::process(LEGlyphID *glyphs, le_int32 *charIndices, le_int32 glyphCount)
|
||||
void SegmentSingleProcessor::process(LEGlyphID *glyphs, le_int32 * /*charIndices*/, le_int32 glyphCount)
|
||||
{
|
||||
const LookupSegment *segments = segmentSingleLookupTable->segments;
|
||||
le_int32 glyph;
|
||||
|
@ -33,7 +33,7 @@ SimpleArrayProcessor::~SimpleArrayProcessor()
|
||||
{
|
||||
}
|
||||
|
||||
void SimpleArrayProcessor::process(LEGlyphID *glyphs, le_int32 *charIndices, le_int32 glyphCount)
|
||||
void SimpleArrayProcessor::process(LEGlyphID *glyphs, le_int32 * /*charIndices*/, le_int32 glyphCount)
|
||||
{
|
||||
le_int32 glyph;
|
||||
|
||||
|
@ -33,7 +33,7 @@ SingleTableProcessor::~SingleTableProcessor()
|
||||
{
|
||||
}
|
||||
|
||||
void SingleTableProcessor::process(LEGlyphID *glyphs, le_int32 *charIndices, le_int32 glyphCount)
|
||||
void SingleTableProcessor::process(LEGlyphID *glyphs, le_int32 * /*charIndices*/, le_int32 glyphCount)
|
||||
{
|
||||
const LookupSingle *entries = singleTableLookupTable->entries;
|
||||
le_int32 glyph;
|
||||
|
@ -51,7 +51,7 @@ ThaiLayoutEngine::~ThaiLayoutEngine()
|
||||
// Output: glyphs, char indices
|
||||
// Returns: the glyph count
|
||||
// NOTE: this assumes that ThaiShaping::compose will allocate the outChars array...
|
||||
le_int32 ThaiLayoutEngine::computeGlyphs(const LEUnicode chars[], le_int32 offset, le_int32 count, le_int32 max, le_bool rightToLeft, LEGlyphID *&glyphs, le_int32 *&charIndices, LEErrorCode &success)
|
||||
le_int32 ThaiLayoutEngine::computeGlyphs(const LEUnicode chars[], le_int32 offset, le_int32 count, le_int32 max, le_bool /*rightToLeft*/, LEGlyphID *&glyphs, le_int32 *&charIndices, LEErrorCode &success)
|
||||
{
|
||||
if (LE_FAILURE(success)) {
|
||||
return 0;
|
||||
|
@ -35,7 +35,7 @@ TrimmedArrayProcessor::~TrimmedArrayProcessor()
|
||||
{
|
||||
}
|
||||
|
||||
void TrimmedArrayProcessor::process(LEGlyphID *glyphs, le_int32 *charIndices, le_int32 glyphCount)
|
||||
void TrimmedArrayProcessor::process(LEGlyphID *glyphs, le_int32 * /*charIndices*/, le_int32 glyphCount)
|
||||
{
|
||||
le_int32 glyph;
|
||||
|
||||
|
@ -683,6 +683,8 @@ static const LanguageMap languageMap[] =
|
||||
{"zho_TWN", zhtLanguageCode} // Chinese - Taiwan
|
||||
};
|
||||
|
||||
static const le_int32 languageMapCount = ARRAY_SIZE(languageMap);
|
||||
|
||||
le_int32 ParagraphLayout::getLanguageCode(const Locale *locale)
|
||||
{
|
||||
char code[8] = {0, 0, 0, 0, 0, 0, 0, 0};
|
||||
@ -696,7 +698,7 @@ le_int32 ParagraphLayout::getLanguageCode(const Locale *locale)
|
||||
uprv_strcat(code, country);
|
||||
}
|
||||
|
||||
for (le_int32 i = 0; i < ARRAY_SIZE(languageMap); i += 1) {
|
||||
for (le_int32 i = 0; i < languageMapCount; i += 1) {
|
||||
if (uprv_strcmp(code, languageMap[i].localeCode) == 0) {
|
||||
return languageMap[i].languageCode;
|
||||
}
|
||||
@ -734,7 +736,7 @@ le_int32 ParagraphLayout::previousBreak(le_int32 charIndex)
|
||||
|
||||
// Create the BreakIterator if we don't already have one
|
||||
if (fBreakIterator == NULL) {
|
||||
/*Locale thai("en_us"); //*/Locale thai("th");
|
||||
Locale thai("th");
|
||||
UCharCharacterIterator *iter = new UCharCharacterIterator(fChars, fCharCount);
|
||||
UErrorCode status = U_ZERO_ERROR;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user