@@ -1210,23 +1210,23 @@ static void copy(State* s, const unsigned char* src, int len) {
12101210 * dest ++ = * src ++ ;
12111211}
12121212
1213- static int build (State * s , unsigned * tree , unsigned char * lens , int symcount ) {
1214- unsigned n , codes [16 ], first [16 ], counts [16 ] = { 0 };
1213+ static int build (State * s , unsigned * tree , unsigned char * lens , unsigned int symcount ) {
1214+ unsigned int codes [16 ], first [16 ], counts [16 ] = { 0 };
12151215
12161216 // Frequency count.
1217- for (n = 0 ; n < symcount ; n ++ )
1217+ for (unsigned int n = 0 ; n < symcount ; n ++ )
12181218 counts [lens [n ]]++ ;
12191219
12201220 // Distribute codes.
12211221 counts [0 ] = codes [0 ] = first [0 ] = 0 ;
1222- for (n = 1 ; n <= 15 ; n ++ ) {
1222+ for (unsigned int n = 1 ; n <= 15 ; n ++ ) {
12231223 codes [n ] = (codes [n - 1 ] + counts [n - 1 ]) << 1 ;
12241224 first [n ] = first [n - 1 ] + counts [n - 1 ];
12251225 }
12261226 CHECK (first [15 ] + counts [15 ] <= symcount );
12271227
12281228 // Insert keys into the tree for each symbol.
1229- for (n = 0 ; n < symcount ; n ++ ) {
1229+ for (unsigned int n = 0 ; n < symcount ; n ++ ) {
12301230 int len = lens [n ];
12311231 if (len != 0 ) {
12321232 unsigned code = codes [len ]++ , slot = first [len ]++ ;
@@ -2826,9 +2826,10 @@ enum {
28262826 NSKeyDownMask = 1 << NSKeyDown ,
28272827 NSKeyUp = 11 ,
28282828 NSKeyUpMask = 1 << NSKeyUp ,
2829- NSAllEventMask = NSUIntegerMax ,
28302829};
28312830
2831+ NSUInteger NSAllEventMask = NSUIntegerMax ;
2832+
28322833extern id NSApp ;
28332834extern id const NSDefaultRunLoopMode ;
28342835
@@ -2839,7 +2840,7 @@ bool terminated = false;
28392840
28402841static uint64_t tigrTimestamp = 0 ;
28412842
2842- void _tigrResetTime () {
2843+ void _tigrResetTime (void ) {
28432844 tigrTimestamp = mach_absolute_time ();
28442845}
28452846
@@ -2857,7 +2858,7 @@ TigrInternal* _tigrInternalCocoa(id window) {
28572858}
28582859
28592860// we gonna construct objective-c class by hand in runtime, so wow, so hacker!
2860- NSUInteger applicationShouldTerminate (id self , SEL _sel , id sender ) {
2861+ NSUInteger applicationShouldTerminate (id self , SEL sel , id sender ) {
28612862 terminated = true;
28622863 return 0 ;
28632864}
@@ -2950,7 +2951,7 @@ static void _showPools(const char* context) {
29502951#define showPools (x )
29512952#endif
29522953
2953- static id pushPool () {
2954+ static id pushPool (void ) {
29542955 id pool = objc_msgSend_id (class ("NSAutoreleasePool" ), sel ("alloc" ));
29552956 return objc_msgSend_id (pool , sel ("init" ));
29562957}
@@ -2959,12 +2960,12 @@ static void popPool(id pool) {
29592960 objc_msgSend_void (pool , sel ("drain" ));
29602961}
29612962
2962- void _tigrCleanupOSX () {
2963+ void _tigrCleanupOSX (void ) {
29632964 showPools ("cleanup" );
29642965 popPool (autoreleasePool );
29652966}
29662967
2967- void tigrInitOSX () {
2968+ void tigrInitOSX (void ) {
29682969 if (tigrOSXInited )
29692970 return ;
29702971
@@ -3821,7 +3822,7 @@ int tigrReadChar(Tigr* bmp) {
38213822 return c ;
38223823}
38233824
3824- float tigrTime () {
3825+ float tigrTime (void ) {
38253826 static mach_timebase_info_data_t timebaseInfo ;
38263827
38273828 if (timebaseInfo .denom == 0 ) {
0 commit comments