mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-13 17:01:16 +00:00
ICU-7586 fix some initializer warnings
X-SVN-Rev: 28157
This commit is contained in:
parent
634c176d87
commit
32b40e3ee2
2 changed files with 4 additions and 2 deletions
|
@ -108,7 +108,7 @@ ucol_looksLikeCollationBinary(const UDataSwapper *ds,
|
|||
const void *inData, int32_t length) {
|
||||
const uint8_t *inBytes;
|
||||
const UCATableHeader *inHeader;
|
||||
UCATableHeader header={ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0,0,0,0}, {0,0,0,0}, {0,0,0,0}, {0,0,0,0}, 0 };
|
||||
UCATableHeader header;
|
||||
|
||||
if(ds==NULL || inData==NULL || length<-1) {
|
||||
return FALSE;
|
||||
|
@ -123,6 +123,7 @@ ucol_looksLikeCollationBinary(const UDataSwapper *ds,
|
|||
* sizeof(UCATableHeader)==42*4 in ICU 2.8
|
||||
* check the length against the header size before reading the size field
|
||||
*/
|
||||
uprv_memset(&header, 0, sizeof(header));
|
||||
if(length<0) {
|
||||
header.size=udata_readInt32(ds, inHeader->size);
|
||||
} else if((length<(42*4) || length<(header.size=udata_readInt32(ds, inHeader->size)))) {
|
||||
|
|
|
@ -128,7 +128,7 @@ utrie2_openFromSerialized(UTrie2ValueBits valueBits,
|
|||
const uint16_t *p16;
|
||||
int32_t actualLength;
|
||||
|
||||
UTrie2 tempTrie={ NULL };
|
||||
UTrie2 tempTrie;
|
||||
UTrie2 *trie;
|
||||
|
||||
if(U_FAILURE(*pErrorCode)) {
|
||||
|
@ -162,6 +162,7 @@ utrie2_openFromSerialized(UTrie2ValueBits valueBits,
|
|||
}
|
||||
|
||||
/* get the length values and offsets */
|
||||
uprv_memset(&tempTrie, 0, sizeof(tempTrie));
|
||||
tempTrie.indexLength=header->indexLength;
|
||||
tempTrie.dataLength=header->shiftedDataLength<<UTRIE2_INDEX_SHIFT;
|
||||
tempTrie.index2NullOffset=header->index2NullOffset;
|
||||
|
|
Loading…
Add table
Reference in a new issue