@@ -416,7 +416,7 @@ static int getParentNumber(const char *s, const int len) {
416416 if (len != 2 && len != 3 ) {
417417 return -923 ;
418418 } // solve bad args
419- memcpy (country , s , len );
419+ memcpy (country , s , ( size_t ) len );
420420 country [len ] = 0 ;
421421 makeupper (country );
422422 f = strstr (p , country );
@@ -1541,7 +1541,7 @@ static int decodeAutoHeader(decodeRec *dec, int m) {
15411541static int decoderEngine (decodeRec * dec ) {
15421542
15431543 int ccode ;
1544- int err = -817 ;
1544+ int err ;
15451545 int codex ;
15461546 char * s ;
15471547
@@ -1916,7 +1916,7 @@ UWORD *convertToAlphabet(UWORD *utf16String, int maxLength, const char *asciiStr
19161916 while (len > 0 && asciiString [len - 1 ] > 0 && asciiString [len - 1 ] <= 32 ) {
19171917 len -- ;
19181918 }
1919- memcpy (targetAsciiString , asciiString , len );
1919+ memcpy (targetAsciiString , asciiString , ( size_t ) len );
19201920 targetAsciiString [len ] = 0 ;
19211921 // re-pack into A-voweled mapcode
19221922 unpack_if_alldigits (targetAsciiString );
@@ -2055,7 +2055,7 @@ parseMapcodeString(MapcodeElements *mapcodeFormat, const char *asciiString, int
20552055 return -7 ;
20562056 }
20572057 if (mapcodeFormat ) {
2058- memcpy (mapcodeFormat -> precisionExtension , exStart , len );
2058+ memcpy (mapcodeFormat -> precisionExtension , exStart , ( size_t ) len );
20592059 mapcodeFormat -> precisionExtension [len ] = 0 ;
20602060 }
20612061 } else if (newstate >= 128 ) { // start of extension
@@ -2065,15 +2065,15 @@ parseMapcodeString(MapcodeElements *mapcodeFormat, const char *asciiString, int
20652065 // end of proper mapcode
20662066 if (mapcodeFormat ) {
20672067 int properMapcodeLength = (int ) (asciiString - mcStart );
2068- memcpy (mapcodeFormat -> properMapcode , mcStart , properMapcodeLength );
2068+ memcpy (mapcodeFormat -> properMapcode , mcStart , ( size_t ) properMapcodeLength );
20692069 mapcodeFormat -> properMapcode [properMapcodeLength ] = 0 ;
20702070 makeupper (mapcodeFormat -> properMapcode );
20712071 }
20722072 } else if (newstate >= 64 ) { // end of territory
20732073 nondigits = vowels = 0 ;
20742074 if (mapcodeFormat ) {
20752075 int len = (int ) (asciiString - mcStart );
2076- memcpy (mapcodeFormat -> territoryISO , mcStart , len );
2076+ memcpy (mapcodeFormat -> territoryISO , mcStart , ( size_t ) len );
20772077 mapcodeFormat -> territoryISO [len ] = 0 ;
20782078 makeupper (mapcodeFormat -> territoryISO );
20792079 }
@@ -2394,7 +2394,7 @@ static char *convertToAbjad(char *targetAsciiString, const char *sourceAsciiStri
23942394 }
23952395
23962396 // copy sourceAsciiString into targetAsciiString
2397- memcpy (targetAsciiString , sourceAsciiString , len );
2397+ memcpy (targetAsciiString , sourceAsciiString , ( size_t ) len );
23982398 targetAsciiString [len ] = 0 ;
23992399 unpack_if_alldigits (targetAsciiString );
24002400
@@ -2424,7 +2424,7 @@ static char *convertToAbjad(char *targetAsciiString, const char *sourceAsciiStri
24242424 if (len >= maxLength ) {
24252425 len = maxLength - 1 ;
24262426 }
2427- memcpy (targetAsciiString , sourceAsciiString , len );
2427+ memcpy (targetAsciiString , sourceAsciiString , ( size_t ) len );
24282428 targetAsciiString [len ] = 0 ;
24292429 return targetAsciiString ;
24302430 } else if (form >= 22 && form <= 54 ) {
@@ -2552,7 +2552,7 @@ static char *convertToAbjad(char *targetAsciiString, const char *sourceAsciiStri
25522552 tocopy = needed ;
25532553 }
25542554 if (tocopy > 0 ) {
2555- memcpy (targetAsciiString + totalLen , rest , tocopy );
2555+ memcpy (targetAsciiString + totalLen , rest , ( size_t ) tocopy );
25562556 targetAsciiString [totalLen + tocopy ] = 0 ;
25572557 }
25582558 }
0 commit comments