@@ -59,21 +59,21 @@ enum {
59
59
static const unsigned char base32_encode_table [] =
60
60
"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567" ;
61
61
62
- static const char base32_decode_table [] = {
62
+ static const signed char base32_decode_table [] = {
63
63
-1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 ,
64
64
-1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 ,
65
65
-1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , 26 ,
66
66
27 , 28 , 29 , 30 , 31 , -1 , -1 , -1 , -1 , -1 , -2 , -1 , -1 , -1 , 0 , 1 , 2 ,
67
67
3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 , 11 , 12 , 13 , 14 , 15 , 16 , 17 , 18 , 19 ,
68
68
20 , 21 , 22 , 23 , 24 , 25
69
69
};
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 );
72
72
73
73
static const unsigned char base32hex_encode_table [] =
74
74
"0123456789ABCDEFGHIJKLMNOPQRSTUV" ;
75
75
76
- static const char base32hex_decode_table [] = {
76
+ static const signed char base32hex_decode_table [] = {
77
77
-1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 ,
78
78
-1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 ,
79
79
-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 =
87
87
static const unsigned char base64_encode_table [] =
88
88
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" ;
89
89
90
- static const char base64_decode_table [] = {
90
+ static const signed char base64_decode_table [] = {
91
91
-1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 ,
92
92
-1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 ,
93
93
-1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 ,
@@ -99,8 +99,8 @@ static const char base64_decode_table[] = {
99
99
41 , 42 , 43 , 44 , 45 , 46 , 47 , 48 , 49 , 50 , 51
100
100
};
101
101
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 );
104
104
105
105
#pragma mark -
106
106
#pragma mark dispatch_transform_buffer
@@ -555,7 +555,7 @@ _dispatch_transform_to_utf16be(dispatch_data_t data)
555
555
556
556
static dispatch_data_t
557
557
_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 )
559
559
{
560
560
__block uint64_t x = 0 , count = 0 , pad = 0 ;
561
561
@@ -585,7 +585,7 @@ _dispatch_transform_from_base32_with_table(dispatch_data_t data,
585
585
}
586
586
count ++ ;
587
587
588
- char value = table [index ];
588
+ signed char value = table [index ];
589
589
if (value == -2 ) {
590
590
value = 0 ;
591
591
pad ++ ;
@@ -830,7 +830,7 @@ _dispatch_transform_from_base64(dispatch_data_t data)
830
830
}
831
831
count ++ ;
832
832
833
- char value = base64_decode_table [index ];
833
+ signed char value = base64_decode_table [index ];
834
834
if (value == -2 ) {
835
835
value = 0 ;
836
836
pad ++ ;
0 commit comments