@@ -59,21 +59,21 @@ enum {
5959static const unsigned char base32_encode_table [] =
6060 "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567" ;
6161
62- static const char base32_decode_table [] = {
62+ static const signed char base32_decode_table [] = {
6363 -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 ,
6464 -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 ,
6565 -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , 26 ,
6666 27 , 28 , 29 , 30 , 31 , -1 , -1 , -1 , -1 , -1 , -2 , -1 , -1 , -1 , 0 , 1 , 2 ,
6767 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 , 11 , 12 , 13 , 14 , 15 , 16 , 17 , 18 , 19 ,
6868 20 , 21 , 22 , 23 , 24 , 25
6969};
70- static const ssize_t base32_decode_table_size = sizeof ( base32_decode_table )
71- / sizeof (* base32_decode_table );
70+ static const ssize_t base32_decode_table_size =
71+ sizeof ( base32_decode_table ) / sizeof (* base32_decode_table );
7272
7373static const unsigned char base32hex_encode_table [] =
7474 "0123456789ABCDEFGHIJKLMNOPQRSTUV" ;
7575
76- static const char base32hex_decode_table [] = {
76+ static const signed char base32hex_decode_table [] = {
7777 -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 ,
7878 -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 ,
7979 -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , 0 , 1 , 2 ,
@@ -87,7 +87,7 @@ static const ssize_t base32hex_decode_table_size =
8787static const unsigned char base64_encode_table [] =
8888 "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" ;
8989
90- static const char base64_decode_table [] = {
90+ static const signed char base64_decode_table [] = {
9191 -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 ,
9292 -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 ,
9393 -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 ,
@@ -99,8 +99,8 @@ static const char base64_decode_table[] = {
9999 41 , 42 , 43 , 44 , 45 , 46 , 47 , 48 , 49 , 50 , 51
100100};
101101
102- static const ssize_t base64_decode_table_size = sizeof ( base64_decode_table )
103- / sizeof (* base64_decode_table );
102+ static const ssize_t base64_decode_table_size =
103+ sizeof ( base64_decode_table ) / sizeof (* base64_decode_table );
104104
105105#pragma mark -
106106#pragma mark dispatch_transform_buffer
@@ -555,7 +555,7 @@ _dispatch_transform_to_utf16be(dispatch_data_t data)
555555
556556static dispatch_data_t
557557_dispatch_transform_from_base32_with_table (dispatch_data_t data ,
558- const char * table , ssize_t table_size )
558+ const signed char * table , ssize_t table_size )
559559{
560560 __block uint64_t x = 0 , count = 0 , pad = 0 ;
561561
@@ -585,7 +585,7 @@ _dispatch_transform_from_base32_with_table(dispatch_data_t data,
585585 }
586586 count ++ ;
587587
588- char value = table [index ];
588+ signed char value = table [index ];
589589 if (value == -2 ) {
590590 value = 0 ;
591591 pad ++ ;
@@ -830,7 +830,7 @@ _dispatch_transform_from_base64(dispatch_data_t data)
830830 }
831831 count ++ ;
832832
833- char value = base64_decode_table [index ];
833+ signed char value = base64_decode_table [index ];
834834 if (value == -2 ) {
835835 value = 0 ;
836836 pad ++ ;
0 commit comments